ob-metaflow 2.10.7.4__py2.py3-none-any.whl → 2.10.9.1__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 +2 -0
- metaflow/plugins/__init__.py +4 -0
- metaflow/plugins/airflow/airflow_cli.py +1 -1
- 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/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.1.dist-info}/METADATA +1 -1
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.1.dist-info}/RECORD +52 -50
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.1.dist-info}/LICENSE +0 -0
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.1.dist-info}/WHEEL +0 -0
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.1.dist-info}/entry_points.txt +0 -0
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.1.dist-info}/top_level.txt +0 -0
metaflow/cards.py
CHANGED
metaflow/decorators.py
CHANGED
|
@@ -129,7 +129,7 @@ class Decorator(object):
|
|
|
129
129
|
|
|
130
130
|
attrs = {}
|
|
131
131
|
# TODO: Do we really want to allow spaces in the names of attributes?!?
|
|
132
|
-
for a in re.split(""",(?=[\s\w]+=)""", deco_spec):
|
|
132
|
+
for a in re.split(r""",(?=[\s\w]+=)""", deco_spec):
|
|
133
133
|
name, val = a.split("=", 1)
|
|
134
134
|
try:
|
|
135
135
|
val_parsed = json.loads(val.strip().replace('\\"', '"'))
|
metaflow/metaflow_config.py
CHANGED
|
@@ -165,6 +165,8 @@ CARD_NO_WARNING = from_conf("CARD_NO_WARNING", False)
|
|
|
165
165
|
|
|
166
166
|
SKIP_CARD_DUALWRITE = from_conf("SKIP_CARD_DUALWRITE", False)
|
|
167
167
|
|
|
168
|
+
RUNTIME_CARD_RENDER_INTERVAL = from_conf("RUNTIME_CARD_RENDER_INTERVAL", 60)
|
|
169
|
+
|
|
168
170
|
# Azure storage account URL
|
|
169
171
|
AZURE_STORAGE_BLOB_SERVICE_ENDPOINT = from_conf("AZURE_STORAGE_BLOB_SERVICE_ENDPOINT")
|
|
170
172
|
|
metaflow/plugins/__init__.py
CHANGED
|
@@ -172,6 +172,8 @@ from .cards.card_modules.test_cards import (
|
|
|
172
172
|
TestNonEditableCard,
|
|
173
173
|
TestPathSpecCard,
|
|
174
174
|
TestTimeoutCard,
|
|
175
|
+
TestRefreshCard,
|
|
176
|
+
TestRefreshComponentCard,
|
|
175
177
|
)
|
|
176
178
|
|
|
177
179
|
CARDS = [
|
|
@@ -188,5 +190,7 @@ CARDS = [
|
|
|
188
190
|
TestNonEditableCard,
|
|
189
191
|
BlankCard,
|
|
190
192
|
DefaultCardJSON,
|
|
193
|
+
TestRefreshCard,
|
|
194
|
+
TestRefreshComponentCard,
|
|
191
195
|
]
|
|
192
196
|
merge_lists(CARDS, MF_EXTERNAL_CARDS, "type")
|
|
@@ -29,7 +29,7 @@ from metaflow.util import get_username, to_bytes, to_unicode, version_parse
|
|
|
29
29
|
|
|
30
30
|
from .argo_workflows import ArgoWorkflows
|
|
31
31
|
|
|
32
|
-
VALID_NAME = re.compile("^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$")
|
|
32
|
+
VALID_NAME = re.compile(r"^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$")
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class IncorrectProductionToken(MetaflowException):
|
|
@@ -185,6 +185,7 @@ class Batch(object):
|
|
|
185
185
|
env={},
|
|
186
186
|
attrs={},
|
|
187
187
|
host_volumes=None,
|
|
188
|
+
efs_volumes=None,
|
|
188
189
|
use_tmpfs=None,
|
|
189
190
|
tmpfs_tempdir=None,
|
|
190
191
|
tmpfs_size=None,
|
|
@@ -232,6 +233,7 @@ class Batch(object):
|
|
|
232
233
|
efa,
|
|
233
234
|
memory=memory,
|
|
234
235
|
host_volumes=host_volumes,
|
|
236
|
+
efs_volumes=efs_volumes,
|
|
235
237
|
use_tmpfs=use_tmpfs,
|
|
236
238
|
tmpfs_tempdir=tmpfs_tempdir,
|
|
237
239
|
tmpfs_size=tmpfs_size,
|
|
@@ -341,6 +343,7 @@ class Batch(object):
|
|
|
341
343
|
inferentia=None,
|
|
342
344
|
efa=None,
|
|
343
345
|
host_volumes=None,
|
|
346
|
+
efs_volumes=None,
|
|
344
347
|
use_tmpfs=None,
|
|
345
348
|
tmpfs_tempdir=None,
|
|
346
349
|
tmpfs_size=None,
|
|
@@ -379,6 +382,7 @@ class Batch(object):
|
|
|
379
382
|
env=env,
|
|
380
383
|
attrs=attrs,
|
|
381
384
|
host_volumes=host_volumes,
|
|
385
|
+
efs_volumes=efs_volumes,
|
|
382
386
|
use_tmpfs=use_tmpfs,
|
|
383
387
|
tmpfs_tempdir=tmpfs_tempdir,
|
|
384
388
|
tmpfs_size=tmpfs_size,
|
|
@@ -153,6 +153,7 @@ def kill(ctx, run_id, user, my_runs):
|
|
|
153
153
|
# TODO: Maybe remove it altogether since it's not used here
|
|
154
154
|
@click.option("--ubf-context", default=None, type=click.Choice([None, "ubf_control"]))
|
|
155
155
|
@click.option("--host-volumes", multiple=True)
|
|
156
|
+
@click.option("--efs-volumes", multiple=True)
|
|
156
157
|
@click.option(
|
|
157
158
|
"--num-parallel",
|
|
158
159
|
default=0,
|
|
@@ -184,6 +185,7 @@ def step(
|
|
|
184
185
|
tmpfs_size=None,
|
|
185
186
|
tmpfs_path=None,
|
|
186
187
|
host_volumes=None,
|
|
188
|
+
efs_volumes=None,
|
|
187
189
|
num_parallel=None,
|
|
188
190
|
**kwargs
|
|
189
191
|
):
|
|
@@ -310,6 +312,7 @@ def step(
|
|
|
310
312
|
env=env,
|
|
311
313
|
attrs=attrs,
|
|
312
314
|
host_volumes=host_volumes,
|
|
315
|
+
efs_volumes=efs_volumes,
|
|
313
316
|
use_tmpfs=use_tmpfs,
|
|
314
317
|
tmpfs_tempdir=tmpfs_tempdir,
|
|
315
318
|
tmpfs_size=tmpfs_size,
|
|
@@ -152,6 +152,7 @@ class BatchJob(object):
|
|
|
152
152
|
efa,
|
|
153
153
|
memory,
|
|
154
154
|
host_volumes,
|
|
155
|
+
efs_volumes,
|
|
155
156
|
use_tmpfs,
|
|
156
157
|
tmpfs_tempdir,
|
|
157
158
|
tmpfs_size,
|
|
@@ -274,19 +275,45 @@ class BatchJob(object):
|
|
|
274
275
|
}
|
|
275
276
|
)
|
|
276
277
|
|
|
277
|
-
if host_volumes:
|
|
278
|
+
if host_volumes or efs_volumes:
|
|
278
279
|
job_definition["containerProperties"]["volumes"] = []
|
|
279
280
|
job_definition["containerProperties"]["mountPoints"] = []
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
281
|
+
|
|
282
|
+
if host_volumes:
|
|
283
|
+
if isinstance(host_volumes, str):
|
|
284
|
+
host_volumes = [host_volumes]
|
|
285
|
+
for host_path in host_volumes:
|
|
286
|
+
container_path = host_path
|
|
287
|
+
if ":" in host_path:
|
|
288
|
+
host_path, container_path = host_path.split(":", 1)
|
|
289
|
+
name = host_path.replace("/", "_").replace(".", "_")
|
|
290
|
+
job_definition["containerProperties"]["volumes"].append(
|
|
291
|
+
{"name": name, "host": {"sourcePath": host_path}}
|
|
292
|
+
)
|
|
293
|
+
job_definition["containerProperties"]["mountPoints"].append(
|
|
294
|
+
{"sourceVolume": name, "containerPath": container_path}
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
if efs_volumes:
|
|
298
|
+
if isinstance(efs_volumes, str):
|
|
299
|
+
efs_volumes = [efs_volumes]
|
|
300
|
+
for efs_id in efs_volumes:
|
|
301
|
+
container_path = "/mnt/" + efs_id
|
|
302
|
+
if ":" in efs_id:
|
|
303
|
+
efs_id, container_path = efs_id.split(":", 1)
|
|
304
|
+
name = "efs_" + efs_id
|
|
305
|
+
job_definition["containerProperties"]["volumes"].append(
|
|
306
|
+
{
|
|
307
|
+
"name": name,
|
|
308
|
+
"efsVolumeConfiguration": {
|
|
309
|
+
"fileSystemId": efs_id,
|
|
310
|
+
"transitEncryption": "ENABLED",
|
|
311
|
+
},
|
|
312
|
+
}
|
|
313
|
+
)
|
|
314
|
+
job_definition["containerProperties"]["mountPoints"].append(
|
|
315
|
+
{"sourceVolume": name, "containerPath": container_path}
|
|
316
|
+
)
|
|
290
317
|
|
|
291
318
|
if use_tmpfs or (tmpfs_size and not use_tmpfs):
|
|
292
319
|
if tmpfs_size:
|
|
@@ -401,6 +428,7 @@ class BatchJob(object):
|
|
|
401
428
|
efa,
|
|
402
429
|
memory,
|
|
403
430
|
host_volumes,
|
|
431
|
+
efs_volumes,
|
|
404
432
|
use_tmpfs,
|
|
405
433
|
tmpfs_tempdir,
|
|
406
434
|
tmpfs_size,
|
|
@@ -419,6 +447,7 @@ class BatchJob(object):
|
|
|
419
447
|
efa,
|
|
420
448
|
memory,
|
|
421
449
|
host_volumes,
|
|
450
|
+
efs_volumes,
|
|
422
451
|
use_tmpfs,
|
|
423
452
|
tmpfs_tempdir,
|
|
424
453
|
tmpfs_size,
|
|
@@ -19,7 +19,7 @@ from metaflow.util import get_username, to_bytes, to_unicode, version_parse
|
|
|
19
19
|
from .step_functions import StepFunctions
|
|
20
20
|
from .production_token import load_token, store_token, new_token
|
|
21
21
|
|
|
22
|
-
VALID_NAME = re.compile("[^a-zA-Z0-9_\-\.]")
|
|
22
|
+
VALID_NAME = re.compile(r"[^a-zA-Z0-9_\-\.]")
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class IncorrectProductionToken(MetaflowException):
|
|
@@ -10,4 +10,4 @@ class MetaflowAzureResourceError(MetaflowException):
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class MetaflowAzurePackageError(MetaflowException):
|
|
13
|
-
headline = "Missing required packages azure-identity and azure-storage-blob"
|
|
13
|
+
headline = "Missing required packages 'azure-identity' and 'azure-storage-blob'"
|