ob-metaflow 2.10.7.3__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.

Files changed (53) hide show
  1. metaflow/cards.py +2 -0
  2. metaflow/decorators.py +1 -1
  3. metaflow/metaflow_config.py +2 -0
  4. metaflow/plugins/__init__.py +4 -0
  5. metaflow/plugins/airflow/airflow_cli.py +1 -1
  6. metaflow/plugins/argo/argo_workflows_cli.py +1 -1
  7. metaflow/plugins/aws/aws_utils.py +1 -1
  8. metaflow/plugins/aws/batch/batch.py +4 -0
  9. metaflow/plugins/aws/batch/batch_cli.py +3 -0
  10. metaflow/plugins/aws/batch/batch_client.py +40 -11
  11. metaflow/plugins/aws/batch/batch_decorator.py +1 -0
  12. metaflow/plugins/aws/step_functions/step_functions.py +1 -0
  13. metaflow/plugins/aws/step_functions/step_functions_cli.py +1 -1
  14. metaflow/plugins/azure/azure_exceptions.py +1 -1
  15. metaflow/plugins/cards/card_cli.py +413 -28
  16. metaflow/plugins/cards/card_client.py +16 -7
  17. metaflow/plugins/cards/card_creator.py +228 -0
  18. metaflow/plugins/cards/card_datastore.py +124 -26
  19. metaflow/plugins/cards/card_decorator.py +40 -86
  20. metaflow/plugins/cards/card_modules/base.html +12 -0
  21. metaflow/plugins/cards/card_modules/basic.py +74 -8
  22. metaflow/plugins/cards/card_modules/bundle.css +1 -170
  23. metaflow/plugins/cards/card_modules/card.py +65 -0
  24. metaflow/plugins/cards/card_modules/components.py +446 -81
  25. metaflow/plugins/cards/card_modules/convert_to_native_type.py +9 -3
  26. metaflow/plugins/cards/card_modules/main.js +250 -21
  27. metaflow/plugins/cards/card_modules/test_cards.py +117 -0
  28. metaflow/plugins/cards/card_resolver.py +0 -2
  29. metaflow/plugins/cards/card_server.py +361 -0
  30. metaflow/plugins/cards/component_serializer.py +506 -42
  31. metaflow/plugins/cards/exception.py +20 -1
  32. metaflow/plugins/datastores/azure_storage.py +1 -2
  33. metaflow/plugins/datastores/gs_storage.py +1 -2
  34. metaflow/plugins/datastores/s3_storage.py +2 -1
  35. metaflow/plugins/datatools/s3/s3.py +24 -11
  36. metaflow/plugins/env_escape/client.py +2 -12
  37. metaflow/plugins/env_escape/client_modules.py +18 -14
  38. metaflow/plugins/env_escape/server.py +18 -11
  39. metaflow/plugins/env_escape/utils.py +12 -0
  40. metaflow/plugins/gcp/gs_exceptions.py +1 -1
  41. metaflow/plugins/gcp/gs_utils.py +1 -1
  42. metaflow/plugins/pypi/conda_environment.py +5 -6
  43. metaflow/plugins/pypi/pip.py +2 -2
  44. metaflow/plugins/pypi/utils.py +15 -0
  45. metaflow/task.py +1 -0
  46. metaflow/tracing/span_exporter.py +2 -2
  47. metaflow/version.py +1 -1
  48. {ob_metaflow-2.10.7.3.dist-info → ob_metaflow-2.10.9.1.dist-info}/METADATA +1 -1
  49. {ob_metaflow-2.10.7.3.dist-info → ob_metaflow-2.10.9.1.dist-info}/RECORD +53 -51
  50. {ob_metaflow-2.10.7.3.dist-info → ob_metaflow-2.10.9.1.dist-info}/LICENSE +0 -0
  51. {ob_metaflow-2.10.7.3.dist-info → ob_metaflow-2.10.9.1.dist-info}/WHEEL +0 -0
  52. {ob_metaflow-2.10.7.3.dist-info → ob_metaflow-2.10.9.1.dist-info}/entry_points.txt +0 -0
  53. {ob_metaflow-2.10.7.3.dist-info → ob_metaflow-2.10.9.1.dist-info}/top_level.txt +0 -0
@@ -44,7 +44,7 @@ def _full_classname(obj):
44
44
 
45
45
 
46
46
  class TaskToDict:
47
- def __init__(self, only_repr=False):
47
+ def __init__(self, only_repr=False, runtime=False):
48
48
  # this dictionary holds all the supported functions
49
49
  import reprlib
50
50
  import pprint
@@ -59,6 +59,7 @@ class TaskToDict:
59
59
  r.maxlist = 100
60
60
  r.maxlevel = 3
61
61
  self._repr = r
62
+ self._runtime = runtime
62
63
  self._only_repr = only_repr
63
64
  self._supported_types = {
64
65
  "tuple": self._parse_tuple,
@@ -90,11 +91,16 @@ class TaskToDict:
90
91
  stderr=task.stderr,
91
92
  stdout=task.stdout,
92
93
  created_at=task.created_at.strftime(TIME_FORMAT),
93
- finished_at=task.finished_at.strftime(TIME_FORMAT),
94
+ finished_at=None,
94
95
  pathspec=task.pathspec,
95
96
  graph=graph,
96
97
  data={},
97
98
  )
99
+ if not self._runtime:
100
+ if task.finished_at is not None:
101
+ task_dict.update(
102
+ dict(finished_at=task.finished_at.strftime(TIME_FORMAT))
103
+ )
98
104
  task_dict["data"], type_infered_objects = self._create_task_data_dict(task)
99
105
  task_dict.update(type_infered_objects)
100
106
  return task_dict
@@ -310,7 +316,7 @@ class TaskToDict:
310
316
  time_format = "%Y-%m-%dT%H:%M:%S%Z"
311
317
  truncate_long_objects = (
312
318
  lambda x: x.astype("string").str.slice(0, 30) + "..."
313
- if x.astype("string").str.len().max() > 30
319
+ if len(x) > 0 and x.astype("string").str.len().max() > 30
314
320
  else x.astype("string")
315
321
  )
316
322
  type_parser = {