metaflow 2.12.6__tar.gz → 2.12.8__tar.gz
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.
- {metaflow-2.12.6/metaflow.egg-info → metaflow-2.12.8}/PKG-INFO +2 -2
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cli.py +3 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/client/core.py +5 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/argo/argo_workflows.py +1 -1
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/pypi/bootstrap.py +1 -1
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/pypi/micromamba.py +1 -1
- metaflow-2.12.8/metaflow/system/__init__.py +5 -0
- metaflow-2.12.8/metaflow/system/system_logger.py +103 -0
- metaflow-2.12.8/metaflow/system/system_monitor.py +132 -0
- metaflow-2.12.8/metaflow/system/system_utils.py +19 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/task.py +240 -194
- metaflow-2.12.8/metaflow/version.py +1 -0
- {metaflow-2.12.6 → metaflow-2.12.8/metaflow.egg-info}/PKG-INFO +2 -2
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow.egg-info/SOURCES.txt +4 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow.egg-info/requires.txt +1 -1
- metaflow-2.12.6/metaflow/version.py +0 -1
- {metaflow-2.12.6 → metaflow-2.12.8}/LICENSE +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/MANIFEST.in +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/README.md +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/R.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/_bashcomplete.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/_compat.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/_termui_impl.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/_textwrap.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/_unicodefun.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/_winconsole.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/core.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/decorators.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/exceptions.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/formatting.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/globals.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/parser.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/termui.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/testing.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/types.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/click/utils.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/importlib_metadata/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/importlib_metadata/_adapters.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/importlib_metadata/_collections.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/importlib_metadata/_compat.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/importlib_metadata/_functools.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/importlib_metadata/_itertools.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/importlib_metadata/_meta.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/importlib_metadata/_text.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/importlib_metadata/py.typed +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/_elffile.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/_manylinux.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/_musllinux.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/_parser.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/_structures.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/_tokenizer.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/markers.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/py.typed +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/requirements.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/specifiers.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/tags.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/utils.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/packaging/version.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_checkers.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_config.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_decorators.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_exceptions.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_functions.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_importhook.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_memo.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_pytest_plugin.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_suppression.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_transformer.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_union_transformer.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/_utils.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typeguard/py.typed +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/typing_extensions.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_5/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_5/importlib_metadata/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_5/importlib_metadata/_compat.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_5/zipp.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/importlib_metadata/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/importlib_metadata/_adapters.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/importlib_metadata/_collections.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/importlib_metadata/_compat.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/importlib_metadata/_functools.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/importlib_metadata/_itertools.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/importlib_metadata/_meta.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/importlib_metadata/_text.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/importlib_metadata/py.typed +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/typing_extensions.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/v3_6/zipp.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/_vendor/zipp.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cards.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cli_args.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/client/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/client/filecache.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/clone_util.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cmd/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cmd/configure_cmd.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cmd/develop/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cmd/develop/stub_generator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cmd/develop/stubs.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cmd/main_cli.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cmd/tutorials_cmd.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cmd/util.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/cmd_with_io.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/datastore/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/datastore/content_addressed_store.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/datastore/datastore_set.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/datastore/datastore_storage.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/datastore/exceptions.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/datastore/flow_datastore.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/datastore/inputs.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/datastore/task_datastore.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/debug.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/decorators.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/event_logger.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/events.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/exception.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/extension_support/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/extension_support/_empty_file.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/extension_support/cmd.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/extension_support/integrations.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/extension_support/plugins.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/flowspec.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/graph.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/includefile.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/integrations.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/lint.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/metadata/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/metadata/heartbeat.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/metadata/metadata.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/metadata/util.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/metaflow_config.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/metaflow_config_funcs.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/metaflow_current.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/metaflow_environment.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/metaflow_profile.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/metaflow_version.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/mflog/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/mflog/mflog.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/mflog/save_logs.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/mflog/save_logs_periodically.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/mflog/tee.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/monitor.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/multicore_utils.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/package.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/parameters.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/airflow.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/airflow_cli.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/airflow_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/airflow_utils.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/dag.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/exception.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/plumbing/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/plumbing/set_parameters.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/sensors/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/sensors/base_sensor.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/sensors/external_task_sensor.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/airflow/sensors/s3_sensor.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/argo/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/argo/argo_client.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/argo/argo_events.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/argo/argo_workflows_cli.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/argo/argo_workflows_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/argo/generate_input_paths.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/aws_client.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/aws_utils.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/batch/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/batch/batch.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/batch/batch_cli.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/batch/batch_client.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/batch/batch_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/secrets_manager/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/step_functions/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/step_functions/dynamo_db_client.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/step_functions/event_bridge_client.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/step_functions/production_token.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/step_functions/schedule_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/step_functions/set_batch_environment.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/step_functions/step_functions.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/step_functions/step_functions_cli.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/step_functions/step_functions_client.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/aws/step_functions/step_functions_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/azure/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/azure/azure_credential.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/azure/azure_exceptions.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/azure/azure_secret_manager_secrets_provider.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/azure/azure_tail.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/azure/azure_utils.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/azure/blob_service_client_factory.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/azure/includefile_support.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_cli.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_client.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_creator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_datastore.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/base.html +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/basic.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/bundle.css +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/card.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/chevron/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/chevron/main.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/chevron/metadata.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/chevron/renderer.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/chevron/tokenizer.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/components.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/convert_to_native_type.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/main.js +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/renderer_tools.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_modules/test_cards.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_resolver.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_server.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/card_viewer/viewer.html +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/component_serializer.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/cards/exception.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/catch_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datastores/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datastores/azure_storage.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datastores/gs_storage.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datastores/local_storage.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datastores/s3_storage.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datatools/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datatools/local.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datatools/s3/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datatools/s3/s3.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datatools/s3/s3op.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datatools/s3/s3tail.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/datatools/s3/s3util.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/debug_logger.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/debug_monitor.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/client.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/client_modules.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/communication/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/communication/bytestream.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/communication/channel.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/communication/socket_bytestream.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/communication/utils.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/configurations/emulate_test_lib/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/configurations/emulate_test_lib/overrides.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/configurations/emulate_test_lib/server_mappings.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/configurations/test_lib_impl/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/configurations/test_lib_impl/test_lib.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/consts.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/data_transferer.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/exception_transferer.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/override_decorators.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/server.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/stub.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/env_escape/utils.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/environment_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/events_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/frameworks/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/frameworks/pytorch.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/gcp/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/gcp/gcp_secret_manager_secrets_provider.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/gcp/gs_exceptions.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/gcp/gs_storage_client_factory.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/gcp/gs_tail.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/gcp/gs_utils.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/gcp/includefile_support.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/kubernetes/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/kubernetes/kubernetes.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/kubernetes/kubernetes_cli.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/kubernetes/kubernetes_client.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/kubernetes/kubernetes_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/kubernetes/kubernetes_job.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/kubernetes/kubernetes_jobsets.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/logs_cli.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/metadata/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/metadata/local.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/metadata/service.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/package_cli.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/parallel_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/project_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/pypi/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/pypi/conda_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/pypi/conda_environment.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/pypi/pip.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/pypi/pypi_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/pypi/pypi_environment.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/pypi/utils.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/resources_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/retry_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/secrets/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/secrets/inline_secrets_provider.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/secrets/secrets_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/storage_executor.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/tag_cli.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/test_unbounded_foreach_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/plugins/timeout_decorator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/procpoll.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/py.typed +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/pylint_wrapper.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/runner/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/runner/click_api.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/runner/metaflow_runner.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/runner/nbrun.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/runner/subprocess_manager.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/runtime.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/sidecar/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/sidecar/sidecar.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/sidecar/sidecar_messages.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/sidecar/sidecar_subprocess.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/sidecar/sidecar_worker.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tagging_util.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tracing/__init__.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tracing/propagator.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tracing/span_exporter.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tracing/tracing_modules.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tuple_util.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/00-helloworld/README.md +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/00-helloworld/helloworld.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/01-playlist/README.md +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/01-playlist/movies.csv +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/01-playlist/playlist.ipynb +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/01-playlist/playlist.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/02-statistics/README.md +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/02-statistics/movies.csv +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/02-statistics/stats.ipynb +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/02-statistics/stats.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/03-playlist-redux/README.md +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/03-playlist-redux/playlist.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/04-playlist-plus/README.md +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/04-playlist-plus/playlist.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/05-hello-cloud/README.md +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/05-hello-cloud/hello-cloud.ipynb +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/05-hello-cloud/hello-cloud.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/06-statistics-redux/README.md +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/06-statistics-redux/stats.ipynb +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/07-worldview/README.md +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/07-worldview/worldview.ipynb +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/08-autopilot/README.md +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/tutorials/08-autopilot/autopilot.ipynb +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/unbounded_foreach.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/util.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow/vendor.py +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow.egg-info/dependency_links.txt +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow.egg-info/entry_points.txt +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/metaflow.egg-info/top_level.txt +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/setup.cfg +0 -0
- {metaflow-2.12.6 → metaflow-2.12.8}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: metaflow
|
3
|
-
Version: 2.12.
|
3
|
+
Version: 2.12.8
|
4
4
|
Summary: Metaflow: More Data Science, Less Engineering
|
5
5
|
Author: Metaflow Developers
|
6
6
|
Author-email: help@metaflow.org
|
@@ -26,7 +26,7 @@ License-File: LICENSE
|
|
26
26
|
Requires-Dist: requests
|
27
27
|
Requires-Dist: boto3
|
28
28
|
Provides-Extra: stubs
|
29
|
-
Requires-Dist: metaflow-stubs==2.12.
|
29
|
+
Requires-Dist: metaflow-stubs==2.12.8; extra == "stubs"
|
30
30
|
|
31
31
|

|
32
32
|
|
@@ -23,6 +23,7 @@ from .metaflow_config import (
|
|
23
23
|
DEFAULT_PACKAGE_SUFFIXES,
|
24
24
|
)
|
25
25
|
from .metaflow_current import current
|
26
|
+
from metaflow.system import _system_monitor, _system_logger
|
26
27
|
from .metaflow_environment import MetaflowEnvironment
|
27
28
|
from .mflog import LOG_SOURCES, mflog
|
28
29
|
from .package import MetaflowPackage
|
@@ -952,11 +953,13 @@ def start(
|
|
952
953
|
flow=ctx.obj.flow, env=ctx.obj.environment
|
953
954
|
)
|
954
955
|
ctx.obj.event_logger.start()
|
956
|
+
_system_logger.init_system_logger(ctx.obj.flow.name, ctx.obj.event_logger)
|
955
957
|
|
956
958
|
ctx.obj.monitor = MONITOR_SIDECARS[monitor](
|
957
959
|
flow=ctx.obj.flow, env=ctx.obj.environment
|
958
960
|
)
|
959
961
|
ctx.obj.monitor.start()
|
962
|
+
_system_monitor.init_system_monitor(ctx.obj.flow.name, ctx.obj.monitor)
|
960
963
|
|
961
964
|
ctx.obj.metadata = [m for m in METADATA_PROVIDERS if m.TYPE == metadata][0](
|
962
965
|
ctx.obj.environment, ctx.obj.flow, ctx.obj.event_logger, ctx.obj.monitor
|
@@ -276,6 +276,11 @@ class MetaflowObject(object):
|
|
276
276
|
self._attempt = attempt
|
277
277
|
self._current_namespace = _current_namespace or get_namespace()
|
278
278
|
self._namespace_check = _namespace_check
|
279
|
+
# If the current namespace is False, we disable checking for namespace for this
|
280
|
+
# and all children objects. Not setting namespace_check to False has the consequence
|
281
|
+
# of preventing access to children objects after the namespace changes
|
282
|
+
if self._current_namespace is None:
|
283
|
+
self._namespace_check = False
|
279
284
|
|
280
285
|
if self._attempt is not None:
|
281
286
|
if self._NAME not in ["task", "artifact"]:
|
@@ -2158,7 +2158,7 @@ class ArgoWorkflows(object):
|
|
2158
2158
|
# NOTE: We need the conditional logic in order to successfully fall back to the default value
|
2159
2159
|
# when the event payload does not contain a key for a parameter.
|
2160
2160
|
# NOTE: Keys might contain dashes, so use the safer 'get' for fetching the value
|
2161
|
-
data_template='{{ if (hasKey $.Input.body.payload "%s") }}{{- (get $.Input.body.payload "%s" |
|
2161
|
+
data_template='{{ if (hasKey $.Input.body.payload "%s") }}{{- (get $.Input.body.payload "%s" | toRawJson) -}}{{- else -}}{{ (fail "use-default-instead") }}{{- end -}}'
|
2162
2162
|
% (v, v),
|
2163
2163
|
# Unfortunately the sensor needs to
|
2164
2164
|
# record the default values for
|
@@ -90,7 +90,7 @@ if __name__ == "__main__":
|
|
90
90
|
f"""set -e;
|
91
91
|
if ! command -v micromamba >/dev/null 2>&1; then
|
92
92
|
mkdir micromamba;
|
93
|
-
python -c "import requests, bz2, sys; data = requests.get('https://micro.mamba.pm/api/micromamba/{architecture}/
|
93
|
+
python -c "import requests, bz2, sys; data = requests.get('https://micro.mamba.pm/api/micromamba/{architecture}/1.5.7').content; sys.stdout.buffer.write(bz2.decompress(data))" | tar -xv -C $(pwd)/micromamba bin/micromamba --strip-components 1;
|
94
94
|
export PATH=$PATH:$(pwd)/micromamba;
|
95
95
|
if ! command -v micromamba >/dev/null 2>&1; then
|
96
96
|
echo "Failed to install Micromamba!";
|
@@ -284,7 +284,7 @@ def _install_micromamba(installation_location):
|
|
284
284
|
# https://mamba.readthedocs.io/en/latest/micromamba-installation.html#manual-installation
|
285
285
|
# requires bzip2
|
286
286
|
result = subprocess.Popen(
|
287
|
-
f"curl -Ls https://micro.mamba.pm/api/micromamba/{platform}/
|
287
|
+
f"curl -Ls https://micro.mamba.pm/api/micromamba/{platform}/1.5.7 | tar -xvj -C {installation_location} bin/micromamba",
|
288
288
|
shell=True,
|
289
289
|
stderr=subprocess.PIPE,
|
290
290
|
stdout=subprocess.PIPE,
|
@@ -0,0 +1,103 @@
|
|
1
|
+
import os
|
2
|
+
import sys
|
3
|
+
from typing import Dict, Any, Optional, Union
|
4
|
+
|
5
|
+
|
6
|
+
class SystemLogger(object):
|
7
|
+
def __init__(self):
|
8
|
+
self._logger = None
|
9
|
+
self._flow_name = None
|
10
|
+
self._context = {}
|
11
|
+
self._is_context_updated = False
|
12
|
+
|
13
|
+
def __del__(self):
|
14
|
+
if self._flow_name == "not_a_real_flow":
|
15
|
+
self.logger.terminate()
|
16
|
+
|
17
|
+
def update_context(self, context: Dict[str, Any]):
|
18
|
+
"""
|
19
|
+
Update the global context maintained by the system logger.
|
20
|
+
|
21
|
+
Parameters
|
22
|
+
----------
|
23
|
+
context : Dict[str, Any]
|
24
|
+
A dictionary containing the context to update.
|
25
|
+
|
26
|
+
"""
|
27
|
+
self._is_context_updated = True
|
28
|
+
self._context.update(context)
|
29
|
+
|
30
|
+
def init_system_logger(
|
31
|
+
self, flow_name: str, logger: "metaflow.event_logger.NullEventLogger"
|
32
|
+
):
|
33
|
+
self._flow_name = flow_name
|
34
|
+
self._logger = logger
|
35
|
+
|
36
|
+
def _init_logger_outside_flow(self):
|
37
|
+
from .system_utils import DummyFlow
|
38
|
+
from .system_utils import init_environment_outside_flow
|
39
|
+
from metaflow.plugins import LOGGING_SIDECARS
|
40
|
+
from metaflow.metaflow_config import DEFAULT_EVENT_LOGGER
|
41
|
+
|
42
|
+
self._flow_name = "not_a_real_flow"
|
43
|
+
_flow = DummyFlow(self._flow_name)
|
44
|
+
_environment = init_environment_outside_flow(_flow)
|
45
|
+
_logger = LOGGING_SIDECARS[DEFAULT_EVENT_LOGGER](_flow, _environment)
|
46
|
+
return _logger
|
47
|
+
|
48
|
+
@property
|
49
|
+
def logger(self) -> Optional["metaflow.event_logger.NullEventLogger"]:
|
50
|
+
if self._logger is None:
|
51
|
+
# This happens if the logger is being accessed outside of a flow
|
52
|
+
# We start a logger with a dummy flow and a default environment
|
53
|
+
self._debug("Started logger outside of a flow")
|
54
|
+
self._logger = self._init_logger_outside_flow()
|
55
|
+
self._logger.start()
|
56
|
+
return self._logger
|
57
|
+
|
58
|
+
@staticmethod
|
59
|
+
def _debug(msg: str):
|
60
|
+
"""
|
61
|
+
Log a debug message to stderr.
|
62
|
+
|
63
|
+
Parameters
|
64
|
+
----------
|
65
|
+
msg : str
|
66
|
+
Message to log.
|
67
|
+
|
68
|
+
"""
|
69
|
+
if os.environ.get("METAFLOW_DEBUG_SIDECAR", "0").lower() not in (
|
70
|
+
"0",
|
71
|
+
"false",
|
72
|
+
"",
|
73
|
+
):
|
74
|
+
print("system monitor: %s" % msg, file=sys.stderr)
|
75
|
+
|
76
|
+
def log_event(
|
77
|
+
self, level: str, module: str, name: str, payload: Optional[Any] = None
|
78
|
+
):
|
79
|
+
"""
|
80
|
+
Log an event to the event logger.
|
81
|
+
|
82
|
+
Parameters
|
83
|
+
----------
|
84
|
+
level : str
|
85
|
+
Log level of the event. Can be one of "info", "warning", "error", "critical", "debug".
|
86
|
+
module : str
|
87
|
+
Module of the event. Usually the name of the class, function, or module that the event is being logged from.
|
88
|
+
name : str
|
89
|
+
Name of the event. Used to qualify the event type.
|
90
|
+
payload : Optional[Any], default None
|
91
|
+
Payload of the event. Contains the event data.
|
92
|
+
"""
|
93
|
+
self.logger.log(
|
94
|
+
{
|
95
|
+
"level": level,
|
96
|
+
"module": module,
|
97
|
+
"name": name,
|
98
|
+
"payload": payload if payload is not None else {},
|
99
|
+
"context": self._context,
|
100
|
+
"is_context_updated": self._is_context_updated,
|
101
|
+
}
|
102
|
+
)
|
103
|
+
self._is_context_updated = False
|
@@ -0,0 +1,132 @@
|
|
1
|
+
import os
|
2
|
+
import sys
|
3
|
+
from ..debug import debug
|
4
|
+
from contextlib import contextmanager
|
5
|
+
from typing import Optional, Union, Dict, Any
|
6
|
+
|
7
|
+
|
8
|
+
class SystemMonitor(object):
|
9
|
+
def __init__(self):
|
10
|
+
self._monitor = None
|
11
|
+
self._flow_name = None
|
12
|
+
self._context = {}
|
13
|
+
|
14
|
+
def __del__(self):
|
15
|
+
if self._flow_name == "not_a_real_flow":
|
16
|
+
self.monitor.terminate()
|
17
|
+
|
18
|
+
def update_context(self, context: Dict[str, Any]):
|
19
|
+
"""
|
20
|
+
Update the global context maintained by the system monitor.
|
21
|
+
|
22
|
+
Parameters
|
23
|
+
----------
|
24
|
+
context : Dict[str, Any]
|
25
|
+
A dictionary containing the context to update.
|
26
|
+
|
27
|
+
"""
|
28
|
+
from metaflow.sidecar import Message, MessageTypes
|
29
|
+
|
30
|
+
self._context.update(context)
|
31
|
+
self.monitor.send(
|
32
|
+
Message(
|
33
|
+
MessageTypes.MUST_SEND,
|
34
|
+
{
|
35
|
+
"is_context_updated": True,
|
36
|
+
**self._context,
|
37
|
+
},
|
38
|
+
)
|
39
|
+
)
|
40
|
+
|
41
|
+
def init_system_monitor(
|
42
|
+
self, flow_name: str, monitor: "metaflow.monitor.NullMonitor"
|
43
|
+
):
|
44
|
+
self._flow_name = flow_name
|
45
|
+
self._monitor = monitor
|
46
|
+
|
47
|
+
def _init_system_monitor_outside_flow(self):
|
48
|
+
from .system_utils import DummyFlow
|
49
|
+
from .system_utils import init_environment_outside_flow
|
50
|
+
from metaflow.plugins import MONITOR_SIDECARS
|
51
|
+
from metaflow.metaflow_config import DEFAULT_MONITOR
|
52
|
+
|
53
|
+
self._flow_name = "not_a_real_flow"
|
54
|
+
_flow = DummyFlow(self._flow_name)
|
55
|
+
_environment = init_environment_outside_flow(_flow)
|
56
|
+
_monitor = MONITOR_SIDECARS[DEFAULT_MONITOR](_flow, _environment)
|
57
|
+
return _monitor
|
58
|
+
|
59
|
+
@property
|
60
|
+
def monitor(self) -> Optional["metaflow.monitor.NullMonitor"]:
|
61
|
+
if self._monitor is None:
|
62
|
+
# This happens if the monitor is being accessed outside of a flow
|
63
|
+
self._debug("Started monitor outside of a flow")
|
64
|
+
self._monitor = self._init_system_monitor_outside_flow()
|
65
|
+
self._monitor.start()
|
66
|
+
return self._monitor
|
67
|
+
|
68
|
+
@staticmethod
|
69
|
+
def _debug(msg: str):
|
70
|
+
"""
|
71
|
+
Log a debug message to stderr.
|
72
|
+
|
73
|
+
Parameters
|
74
|
+
----------
|
75
|
+
msg : str
|
76
|
+
Message to log.
|
77
|
+
|
78
|
+
"""
|
79
|
+
if os.environ.get("METAFLOW_DEBUG_SIDECAR", "0").lower() not in (
|
80
|
+
"0",
|
81
|
+
"false",
|
82
|
+
"",
|
83
|
+
):
|
84
|
+
print("system monitor: %s" % msg, file=sys.stderr)
|
85
|
+
|
86
|
+
@contextmanager
|
87
|
+
def measure(self, name: str):
|
88
|
+
"""
|
89
|
+
Context manager to measure the execution duration and counter of a block of code.
|
90
|
+
|
91
|
+
Parameters
|
92
|
+
----------
|
93
|
+
name : str
|
94
|
+
The name to associate with the timer and counter.
|
95
|
+
|
96
|
+
Yields
|
97
|
+
------
|
98
|
+
None
|
99
|
+
"""
|
100
|
+
# Delegating the context management to the monitor's measure method
|
101
|
+
with self.monitor.measure(name):
|
102
|
+
yield
|
103
|
+
|
104
|
+
@contextmanager
|
105
|
+
def count(self, name: str):
|
106
|
+
"""
|
107
|
+
Context manager to increment a counter.
|
108
|
+
|
109
|
+
Parameters
|
110
|
+
----------
|
111
|
+
name : str
|
112
|
+
The name of the counter.
|
113
|
+
|
114
|
+
Yields
|
115
|
+
------
|
116
|
+
None
|
117
|
+
"""
|
118
|
+
# Delegating the context management to the monitor's count method
|
119
|
+
with self.monitor.count(name):
|
120
|
+
yield
|
121
|
+
|
122
|
+
def gauge(self, gauge: "metaflow.monitor.Gauge"):
|
123
|
+
"""
|
124
|
+
Log a gauge.
|
125
|
+
|
126
|
+
Parameters
|
127
|
+
----------
|
128
|
+
gauge : metaflow.monitor.Gauge
|
129
|
+
The gauge to log.
|
130
|
+
|
131
|
+
"""
|
132
|
+
self.monitor.gauge(gauge)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
from typing import Union
|
2
|
+
|
3
|
+
|
4
|
+
class DummyFlow(object):
|
5
|
+
def __init__(self, name="not_a_real_flow"):
|
6
|
+
self.name = name
|
7
|
+
|
8
|
+
|
9
|
+
# This function is used to initialize the environment outside a flow.
|
10
|
+
def init_environment_outside_flow(
|
11
|
+
flow: Union["metaflow.flowspec.FlowSpec", "metaflow.sidecar.DummyFlow"]
|
12
|
+
) -> "metaflow.metaflow_environment.MetaflowEnvironment":
|
13
|
+
from metaflow.plugins import ENVIRONMENTS
|
14
|
+
from metaflow.metaflow_config import DEFAULT_ENVIRONMENT
|
15
|
+
from metaflow.metaflow_environment import MetaflowEnvironment
|
16
|
+
|
17
|
+
return [
|
18
|
+
e for e in ENVIRONMENTS + [MetaflowEnvironment] if e.TYPE == DEFAULT_ENVIRONMENT
|
19
|
+
][0](flow)
|