ob-metaflow 2.10.7.4__py2.py3-none-any.whl → 2.10.9.2__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ob-metaflow might be problematic. Click here for more details.
- metaflow/cards.py +2 -0
- metaflow/decorators.py +1 -1
- metaflow/metaflow_config.py +4 -0
- metaflow/plugins/__init__.py +4 -0
- metaflow/plugins/airflow/airflow_cli.py +1 -1
- metaflow/plugins/argo/argo_workflows.py +5 -0
- metaflow/plugins/argo/argo_workflows_cli.py +1 -1
- metaflow/plugins/aws/aws_utils.py +1 -1
- metaflow/plugins/aws/batch/batch.py +4 -0
- metaflow/plugins/aws/batch/batch_cli.py +3 -0
- metaflow/plugins/aws/batch/batch_client.py +40 -11
- metaflow/plugins/aws/batch/batch_decorator.py +1 -0
- metaflow/plugins/aws/step_functions/step_functions.py +1 -0
- metaflow/plugins/aws/step_functions/step_functions_cli.py +1 -1
- metaflow/plugins/azure/azure_exceptions.py +1 -1
- metaflow/plugins/cards/card_cli.py +413 -28
- metaflow/plugins/cards/card_client.py +16 -7
- metaflow/plugins/cards/card_creator.py +228 -0
- metaflow/plugins/cards/card_datastore.py +124 -26
- metaflow/plugins/cards/card_decorator.py +40 -86
- metaflow/plugins/cards/card_modules/base.html +12 -0
- metaflow/plugins/cards/card_modules/basic.py +74 -8
- metaflow/plugins/cards/card_modules/bundle.css +1 -170
- metaflow/plugins/cards/card_modules/card.py +65 -0
- metaflow/plugins/cards/card_modules/components.py +446 -81
- metaflow/plugins/cards/card_modules/convert_to_native_type.py +9 -3
- metaflow/plugins/cards/card_modules/main.js +250 -21
- metaflow/plugins/cards/card_modules/test_cards.py +117 -0
- metaflow/plugins/cards/card_resolver.py +0 -2
- metaflow/plugins/cards/card_server.py +361 -0
- metaflow/plugins/cards/component_serializer.py +506 -42
- metaflow/plugins/cards/exception.py +20 -1
- metaflow/plugins/datastores/azure_storage.py +1 -2
- metaflow/plugins/datastores/gs_storage.py +1 -2
- metaflow/plugins/datastores/s3_storage.py +2 -1
- metaflow/plugins/datatools/s3/s3.py +24 -11
- metaflow/plugins/env_escape/client.py +2 -12
- metaflow/plugins/env_escape/client_modules.py +18 -14
- metaflow/plugins/env_escape/server.py +18 -11
- metaflow/plugins/env_escape/utils.py +12 -0
- metaflow/plugins/gcp/gs_exceptions.py +1 -1
- metaflow/plugins/gcp/gs_utils.py +1 -1
- metaflow/plugins/kubernetes/kubernetes.py +43 -6
- metaflow/plugins/kubernetes/kubernetes_cli.py +40 -1
- metaflow/plugins/kubernetes/kubernetes_decorator.py +73 -6
- metaflow/plugins/kubernetes/kubernetes_job.py +536 -161
- metaflow/plugins/pypi/conda_environment.py +5 -6
- metaflow/plugins/pypi/pip.py +2 -2
- metaflow/plugins/pypi/utils.py +15 -0
- metaflow/task.py +1 -0
- metaflow/version.py +1 -1
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/METADATA +1 -1
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/RECORD +57 -55
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/LICENSE +0 -0
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/WHEEL +0 -0
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/entry_points.txt +0 -0
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/top_level.txt +0 -0
|
@@ -32,12 +32,40 @@ class MetaflowCard(object):
|
|
|
32
32
|
JSON-encodable dictionary containing user-definable options for the class.
|
|
33
33
|
"""
|
|
34
34
|
|
|
35
|
+
# RELOAD_POLICY determines whether UIs should
|
|
36
|
+
# reload intermediate cards produced by render_runtime
|
|
37
|
+
# or whether they can just rely on data updates
|
|
38
|
+
|
|
39
|
+
# the UI may keep using the same card
|
|
40
|
+
# until the final card is produced
|
|
41
|
+
RELOAD_POLICY_NEVER = "never"
|
|
42
|
+
|
|
43
|
+
# the UI should reload card every time
|
|
44
|
+
# render_runtime() has produced a new card
|
|
45
|
+
RELOAD_POLICY_ALWAYS = "always"
|
|
46
|
+
|
|
47
|
+
# derive reload token from data and component
|
|
48
|
+
# content - force reload only when the content
|
|
49
|
+
# changes. The actual policy is card-specific,
|
|
50
|
+
# defined by the method reload_content_token()
|
|
51
|
+
RELOAD_POLICY_ONCHANGE = "onchange"
|
|
52
|
+
|
|
53
|
+
# this token will get replaced in the html with a unique
|
|
54
|
+
# string that is used to ensure that data updates and the
|
|
55
|
+
# card content matches
|
|
56
|
+
RELOAD_POLICY_TOKEN = "[METAFLOW_RELOAD_TOKEN]"
|
|
57
|
+
|
|
35
58
|
type = None
|
|
36
59
|
|
|
37
60
|
ALLOW_USER_COMPONENTS = False
|
|
61
|
+
RUNTIME_UPDATABLE = False
|
|
62
|
+
RELOAD_POLICY = RELOAD_POLICY_NEVER
|
|
38
63
|
|
|
39
64
|
scope = "task" # can be task | run
|
|
40
65
|
|
|
66
|
+
# FIXME document runtime_data
|
|
67
|
+
runtime_data = None
|
|
68
|
+
|
|
41
69
|
def __init__(self, options={}, components=[], graph=None):
|
|
42
70
|
pass
|
|
43
71
|
|
|
@@ -68,8 +96,45 @@ class MetaflowCard(object):
|
|
|
68
96
|
"""
|
|
69
97
|
return NotImplementedError()
|
|
70
98
|
|
|
99
|
+
# FIXME document
|
|
100
|
+
def render_runtime(self, task, data):
|
|
101
|
+
raise NotImplementedError()
|
|
102
|
+
|
|
103
|
+
# FIXME document
|
|
104
|
+
def refresh(self, task, data):
|
|
105
|
+
raise NotImplementedError()
|
|
106
|
+
|
|
107
|
+
# FIXME document
|
|
108
|
+
def reload_content_token(self, task, data):
|
|
109
|
+
return "content-token"
|
|
110
|
+
|
|
71
111
|
|
|
72
112
|
class MetaflowCardComponent(object):
|
|
113
|
+
|
|
114
|
+
# Setting REALTIME_UPDATABLE as True will allow metaflow to update the card
|
|
115
|
+
# during Task runtime.
|
|
116
|
+
REALTIME_UPDATABLE = False
|
|
117
|
+
|
|
118
|
+
_component_id = None
|
|
119
|
+
|
|
120
|
+
_logger = None
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def component_id(self):
|
|
124
|
+
return self._component_id
|
|
125
|
+
|
|
126
|
+
@component_id.setter
|
|
127
|
+
def component_id(self, value):
|
|
128
|
+
if not isinstance(value, str):
|
|
129
|
+
raise TypeError("Component ID must be a string")
|
|
130
|
+
self._component_id = value
|
|
131
|
+
|
|
132
|
+
def update(self, *args, **kwargs):
|
|
133
|
+
"""
|
|
134
|
+
#FIXME document
|
|
135
|
+
"""
|
|
136
|
+
raise NotImplementedError()
|
|
137
|
+
|
|
73
138
|
def render(self):
|
|
74
139
|
"""
|
|
75
140
|
`render` returns a string or dictionary. This class can be called on the client side to dynamically add components to the `MetaflowCard`
|