ml-management 0.6.3rc10__tar.gz → 0.6.3rc12__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- ml_management-0.6.3rc12/ML_management/__init__.py +1 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/graphql/schema.py +62 -5
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/graphql/send_graphql_request.py +2 -2
- ml_management-0.6.3rc12/ML_management/mlmanagement/active_job.py +74 -0
- ml_management-0.6.3rc12/ML_management/mlmanagement/batcher.py +63 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/log_api.py +32 -20
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/sdk/__init__.py +1 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/sdk/experiment.py +32 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/sdk/job.py +2 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/session.py +4 -4
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/variables.py +4 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/PKG-INFO +1 -1
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/pyproject.toml +3 -3
- ml_management-0.6.3rc10/ML_management/__init__.py +0 -3
- ml_management-0.6.3rc10/ML_management/version.py +0 -6
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/base_exceptions.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/collector_pattern.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/collector_pattern_to_methods_map.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/collectors.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/dummy/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/dummy/dummy_collector.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/s3/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/s3/s3collector.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/topic_markers/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/topic_markers/api_schema.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/topic_markers/topic_markers_collector.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/base_splits_dataset_loader.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/dataset_loader_pattern.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/dataset_loader_pattern_to_methods_map.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/poisoned_images_dataset_loader.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/templates/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/templates/dummy_dataset_loader/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/templates/dummy_dataset_loader/conda.yaml +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/templates/dummy_dataset_loader/dummy_dataset.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/templates/upload.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/base_executor.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/executor_pattern.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/executor_pattern_to_methods_map.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/no_model_executor_pattern.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/patterns.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/eval/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/eval/conda.yaml +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/eval/eval_executor.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/finetune/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/finetune/conda.yaml +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/finetune/finetune_executor.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/train/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/train/conda.yaml +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/train/train_executor.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/upload.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/upload_model_mode.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/graphql/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/backend_api.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/jsonschema_exceptions.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/jsonschema_inference.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/load_api.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/model_type.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/module_finder.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/server_mlmanager_exceptions.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/utils.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/visibility_options.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/model_type_to_methods_map.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/evaluatable_model.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/gradient_model.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/model_pattern.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/model_with_losses.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/model_with_metrics.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/preprocessor.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/retrainable_model.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/target_layer.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/torch_model.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/trainable_model.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/transformer.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/registry/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/registry/exceptions.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/s3/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/s3/manager.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/s3/utils.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/sdk/dataset_loader.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/sdk/executor.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/sdk/model.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/sdk/parameters.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/sdk/sdk.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/singleton_pattern.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/test_sdk/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/test_sdk/local_sdk_test.sh +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/test_sdk/mock_server.js +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/test_sdk/package.json +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/test_sdk/requirements.txt +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/test_sdk/test_sdk.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/tests/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/tests/requirements.txt +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/tests/run_all_tests.sh +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/tests/test_jsonschema_inference.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/uploader_data/__init__.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/uploader_data/s3_uploader.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/uploader_data/utils.py +0 -0
- {ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/README.md +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.6.3rc12"
|
@@ -573,7 +573,7 @@ class ExecutionJob(sgqlc.types.Type):
|
|
573
573
|
|
574
574
|
end_timestamp = sgqlc.types.Field(Long, graphql_name='endTimestamp')
|
575
575
|
|
576
|
-
executor_version = sgqlc.types.Field(
|
576
|
+
executor_version = sgqlc.types.Field('ExecutorVersionInfo', graphql_name='executorVersion')
|
577
577
|
|
578
578
|
experiment = sgqlc.types.Field('Experiment', graphql_name='experiment')
|
579
579
|
|
@@ -610,7 +610,7 @@ class ExecutionJob(sgqlc.types.Type):
|
|
610
610
|
|
611
611
|
owner = sgqlc.types.Field(sgqlc.types.non_null('User'), graphql_name='owner')
|
612
612
|
|
613
|
-
params = sgqlc.types.Field(
|
613
|
+
params = sgqlc.types.Field('JobParams', graphql_name='params')
|
614
614
|
|
615
615
|
periodic_type = sgqlc.types.Field(sgqlc.types.non_null(PeriodicType), graphql_name='periodicType')
|
616
616
|
|
@@ -1099,6 +1099,15 @@ class JobDatasetLoadersSchema(sgqlc.types.Type):
|
|
1099
1099
|
|
1100
1100
|
|
1101
1101
|
|
1102
|
+
class JobInfoResponse(sgqlc.types.Type):
|
1103
|
+
__schema__ = schema
|
1104
|
+
__field_names__ = ('message', 'status')
|
1105
|
+
message = sgqlc.types.Field(String, graphql_name='message')
|
1106
|
+
|
1107
|
+
status = sgqlc.types.Field(sgqlc.types.non_null(JobStatus), graphql_name='status')
|
1108
|
+
|
1109
|
+
|
1110
|
+
|
1102
1111
|
class JobModelsSchema(sgqlc.types.Type):
|
1103
1112
|
__schema__ = schema
|
1104
1113
|
__field_names__ = ('list_role_model_method_schemas',)
|
@@ -1553,7 +1562,7 @@ class ModelVersionPagination(sgqlc.types.Type):
|
|
1553
1562
|
|
1554
1563
|
class Mutation(sgqlc.types.Type):
|
1555
1564
|
__schema__ = schema
|
1556
|
-
__field_names__ = ('add_ml_job', 'cancel_build_job_for_executor_version', 'cancel_build_job_for_model_version', 'cancel_job', 'cancel_venv_build_job_for_model_version', 'delete_dataset_loader', 'delete_dataset_loader_tag', 'delete_dataset_loader_version_from_name_version', 'delete_dataset_loader_version_tag', 'delete_executor', 'delete_executor_tag', 'delete_executor_version_from_name_version', 'delete_executor_version_tag', 'delete_experiment_tag', 'delete_model', 'delete_model_tag', 'delete_model_version_from_name_version', 'delete_model_version_tag', 'log_metric', 'log_metrics', 'log_param', 'log_params', 'rebuild_model_version_image', 'rebuild_no_model_executor_version_image', 'rename_experiment', 'serve_model', 'set_dataset_loader_tag', 'set_dataset_loader_version_tag', 'set_executor_tag', 'set_executor_version_tag', 'set_experiment_tag', 'set_model_tag', 'set_model_version_tag', 'stop_model_serving', 'update_dataset_loader', 'update_dataset_loader_version', 'update_executor', 'update_executor_version', 'update_experiment', 'update_job', 'update_model', 'update_model_version')
|
1565
|
+
__field_names__ = ('add_ml_job', 'cancel_build_job_for_executor_version', 'cancel_build_job_for_model_version', 'cancel_job', 'cancel_venv_build_job_for_model_version', 'create_experiment', 'create_local_job', 'delete_dataset_loader', 'delete_dataset_loader_tag', 'delete_dataset_loader_version_from_name_version', 'delete_dataset_loader_version_tag', 'delete_executor', 'delete_executor_tag', 'delete_executor_version_from_name_version', 'delete_executor_version_tag', 'delete_experiment_tag', 'delete_model', 'delete_model_tag', 'delete_model_version_from_name_version', 'delete_model_version_tag', 'log_metric', 'log_metrics', 'log_param', 'log_params', 'rebuild_model_version_image', 'rebuild_no_model_executor_version_image', 'rename_experiment', 'serve_model', 'set_dataset_loader_tag', 'set_dataset_loader_version_tag', 'set_executor_tag', 'set_executor_version_tag', 'set_experiment_tag', 'set_model_tag', 'set_model_version_tag', 'start_local_job', 'stop_local_job', 'stop_model_serving', 'update_dataset_loader', 'update_dataset_loader_version', 'update_executor', 'update_executor_version', 'update_experiment', 'update_job', 'update_model', 'update_model_version')
|
1557
1566
|
add_ml_job = sgqlc.types.Field(sgqlc.types.non_null(ExecutionJob), graphql_name='addMlJob', args=sgqlc.types.ArgDict((
|
1558
1567
|
('form', sgqlc.types.Arg(sgqlc.types.non_null(JobParameters), graphql_name='form', default=None)),
|
1559
1568
|
))
|
@@ -1605,6 +1614,32 @@ class Mutation(sgqlc.types.Type):
|
|
1605
1614
|
* `version` (`Int!`)None
|
1606
1615
|
'''
|
1607
1616
|
|
1617
|
+
create_experiment = sgqlc.types.Field(sgqlc.types.non_null(Experiment), graphql_name='createExperiment', args=sgqlc.types.ArgDict((
|
1618
|
+
('experiment_description', sgqlc.types.Arg(String, graphql_name='experimentDescription', default='')),
|
1619
|
+
('experiment_name', sgqlc.types.Arg(sgqlc.types.non_null(String), graphql_name='experimentName', default=None)),
|
1620
|
+
('visibility', sgqlc.types.Arg(sgqlc.types.non_null(VisibilityOptions), graphql_name='visibility', default='PRIVATE')),
|
1621
|
+
))
|
1622
|
+
)
|
1623
|
+
'''Arguments:
|
1624
|
+
|
1625
|
+
* `experiment_description` (`String`)None (default: `""`)
|
1626
|
+
* `experiment_name` (`String!`)None
|
1627
|
+
* `visibility` (`VisibilityOptions!`)None (default: `PRIVATE`)
|
1628
|
+
'''
|
1629
|
+
|
1630
|
+
create_local_job = sgqlc.types.Field(sgqlc.types.non_null(ExecutionJob), graphql_name='createLocalJob', args=sgqlc.types.ArgDict((
|
1631
|
+
('experiment_name', sgqlc.types.Arg(sgqlc.types.non_null(String), graphql_name='experimentName', default=None)),
|
1632
|
+
('job_name', sgqlc.types.Arg(String, graphql_name='jobName', default=None)),
|
1633
|
+
('visibility', sgqlc.types.Arg(sgqlc.types.non_null(VisibilityOptions), graphql_name='visibility', default=None)),
|
1634
|
+
))
|
1635
|
+
)
|
1636
|
+
'''Arguments:
|
1637
|
+
|
1638
|
+
* `experiment_name` (`String!`)None
|
1639
|
+
* `job_name` (`String`)None
|
1640
|
+
* `visibility` (`VisibilityOptions!`)None
|
1641
|
+
'''
|
1642
|
+
|
1608
1643
|
delete_dataset_loader = sgqlc.types.Field(sgqlc.types.non_null(Boolean), graphql_name='deleteDatasetLoader', args=sgqlc.types.ArgDict((
|
1609
1644
|
('name', sgqlc.types.Arg(sgqlc.types.non_null(String), graphql_name='name', default=None)),
|
1610
1645
|
))
|
@@ -1909,6 +1944,28 @@ class Mutation(sgqlc.types.Type):
|
|
1909
1944
|
* `value` (`String!`)None
|
1910
1945
|
'''
|
1911
1946
|
|
1947
|
+
start_local_job = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='startLocalJob', args=sgqlc.types.ArgDict((
|
1948
|
+
('job_name', sgqlc.types.Arg(sgqlc.types.non_null(String), graphql_name='jobName', default=None)),
|
1949
|
+
))
|
1950
|
+
)
|
1951
|
+
'''Arguments:
|
1952
|
+
|
1953
|
+
* `job_name` (`String!`)None
|
1954
|
+
'''
|
1955
|
+
|
1956
|
+
stop_local_job = sgqlc.types.Field(sgqlc.types.non_null(Boolean), graphql_name='stopLocalJob', args=sgqlc.types.ArgDict((
|
1957
|
+
('job_run_id', sgqlc.types.Arg(sgqlc.types.non_null(String), graphql_name='jobRunId', default=None)),
|
1958
|
+
('message', sgqlc.types.Arg(String, graphql_name='message', default=None)),
|
1959
|
+
('status', sgqlc.types.Arg(sgqlc.types.non_null(JobStatus), graphql_name='status', default='SUCCESSFUL')),
|
1960
|
+
))
|
1961
|
+
)
|
1962
|
+
'''Arguments:
|
1963
|
+
|
1964
|
+
* `job_run_id` (`String!`)None
|
1965
|
+
* `message` (`String`)None (default: `null`)
|
1966
|
+
* `status` (`JobStatus!`)None (default: `SUCCESSFUL`)
|
1967
|
+
'''
|
1968
|
+
|
1912
1969
|
stop_model_serving = sgqlc.types.Field(sgqlc.types.non_null(Boolean), graphql_name='stopModelServing', args=sgqlc.types.ArgDict((
|
1913
1970
|
('model_version', sgqlc.types.Arg(sgqlc.types.non_null(ObjectVersionInput), graphql_name='modelVersion', default=None)),
|
1914
1971
|
))
|
@@ -2371,7 +2428,7 @@ class RoleModelVersion(sgqlc.types.Type):
|
|
2371
2428
|
class Subscription(sgqlc.types.Type):
|
2372
2429
|
__schema__ = schema
|
2373
2430
|
__field_names__ = ('build_job_status', 'job_status')
|
2374
|
-
build_job_status = sgqlc.types.Field(sgqlc.types.non_null(
|
2431
|
+
build_job_status = sgqlc.types.Field(sgqlc.types.non_null(JobInfoResponse), graphql_name='buildJobStatus', args=sgqlc.types.ArgDict((
|
2375
2432
|
('name', sgqlc.types.Arg(sgqlc.types.non_null(String), graphql_name='name', default=None)),
|
2376
2433
|
))
|
2377
2434
|
)
|
@@ -2380,7 +2437,7 @@ class Subscription(sgqlc.types.Type):
|
|
2380
2437
|
* `name` (`String!`)None
|
2381
2438
|
'''
|
2382
2439
|
|
2383
|
-
job_status = sgqlc.types.Field(sgqlc.types.non_null(
|
2440
|
+
job_status = sgqlc.types.Field(sgqlc.types.non_null(JobInfoResponse), graphql_name='jobStatus', args=sgqlc.types.ArgDict((
|
2384
2441
|
('name', sgqlc.types.Arg(sgqlc.types.non_null(String), graphql_name='name', default=None)),
|
2385
2442
|
))
|
2386
2443
|
)
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/graphql/send_graphql_request.py
RENAMED
@@ -9,9 +9,9 @@ from ML_management.session import AuthSession
|
|
9
9
|
from ML_management.variables import get_server_url
|
10
10
|
|
11
11
|
|
12
|
-
def send_graphql_request(op: Operation, json_response: bool = True) -> Any:
|
12
|
+
def send_graphql_request(op: Operation, json_response: bool = True, timeout=None) -> Any:
|
13
13
|
"""Send request to server and process the response."""
|
14
|
-
json_data = AuthSession().sgqlc_request(op)
|
14
|
+
json_data = AuthSession().sgqlc_request(op, timeout)
|
15
15
|
|
16
16
|
if "data" not in json_data or json_data["data"] is None:
|
17
17
|
server_url = get_server_url()
|
@@ -0,0 +1,74 @@
|
|
1
|
+
from sgqlc.operation import Operation
|
2
|
+
|
3
|
+
from ML_management import variables
|
4
|
+
from ML_management.graphql import schema
|
5
|
+
from ML_management.graphql.schema import ExecutionJob
|
6
|
+
from ML_management.graphql.send_graphql_request import send_graphql_request
|
7
|
+
from ML_management.mlmanagement.batcher import Batcher
|
8
|
+
from ML_management.mlmanagement.visibility_options import VisibilityOptions
|
9
|
+
from ML_management.variables import DEFAULT_EXPERIMENT
|
10
|
+
|
11
|
+
|
12
|
+
class ActiveJob(ExecutionJob):
|
13
|
+
"""
|
14
|
+
A context manager that allows for the execution of a task locally.
|
15
|
+
|
16
|
+
This class provides a convenient way to run a job locally.
|
17
|
+
|
18
|
+
"""
|
19
|
+
|
20
|
+
def __enter__(self):
|
21
|
+
op = Operation(schema.Mutation)
|
22
|
+
op.start_local_job(job_name=self.name)
|
23
|
+
job_run_id = send_graphql_request(op=op, json_response=False).start_local_job
|
24
|
+
variables.job_run_id = job_run_id
|
25
|
+
return self
|
26
|
+
|
27
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
28
|
+
Batcher().wait_log_metrics()
|
29
|
+
if exc_type:
|
30
|
+
status = "FAILED"
|
31
|
+
else:
|
32
|
+
status = "SUCCESSFUL"
|
33
|
+
op = Operation(schema.Mutation)
|
34
|
+
op.stop_local_job(job_run_id=variables.job_run_id, status=status)
|
35
|
+
try:
|
36
|
+
_ = send_graphql_request(op=op, json_response=False).stop_local_job
|
37
|
+
finally:
|
38
|
+
variables.job_run_id = None
|
39
|
+
|
40
|
+
|
41
|
+
def start_local_job(
|
42
|
+
job_name, experiment_name: str = DEFAULT_EXPERIMENT, visibility=VisibilityOptions.PRIVATE
|
43
|
+
) -> ActiveJob:
|
44
|
+
"""
|
45
|
+
Create local job.
|
46
|
+
|
47
|
+
Parameters
|
48
|
+
----------
|
49
|
+
job_name: str | None
|
50
|
+
Name of the new job. If not passed, it will be generated.
|
51
|
+
experiment_name: str = "Default"
|
52
|
+
Name of the experiment. Default: "Default"
|
53
|
+
visibility: VisibilityOptions
|
54
|
+
Visibility of this job to other users. Default: PRIVATE.
|
55
|
+
|
56
|
+
Returns
|
57
|
+
-------
|
58
|
+
ActiveJob
|
59
|
+
Active job.
|
60
|
+
|
61
|
+
Usage:
|
62
|
+
with start_local_job('my-beautiful-job') as job:
|
63
|
+
mlmanagement.log_metric(...)
|
64
|
+
mlmanagement.log_artifacts(...)
|
65
|
+
"""
|
66
|
+
op = Operation(schema.Mutation)
|
67
|
+
create_local_job = op.create_local_job(
|
68
|
+
job_name=job_name, experiment_name=experiment_name, visibility=visibility.name
|
69
|
+
)
|
70
|
+
create_local_job.name()
|
71
|
+
create_local_job.visibility()
|
72
|
+
create_local_job.experiment.name()
|
73
|
+
job = send_graphql_request(op=op, json_response=True)
|
74
|
+
return ActiveJob(job["createLocalJob"])
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import time
|
2
|
+
import warnings
|
3
|
+
from collections import deque
|
4
|
+
from threading import Event, Thread
|
5
|
+
from typing import Dict
|
6
|
+
|
7
|
+
from sgqlc.operation import Operation
|
8
|
+
|
9
|
+
from ML_management import variables
|
10
|
+
from ML_management.graphql import schema
|
11
|
+
from ML_management.graphql.schema import MetricInput
|
12
|
+
from ML_management.graphql.send_graphql_request import send_graphql_request
|
13
|
+
from ML_management.singleton_pattern import Singleton
|
14
|
+
from ML_management.variables import METRIC_ACCUMULATION_DURATION, TIMEOUT_LOG_METRIC_BATCH
|
15
|
+
|
16
|
+
|
17
|
+
class Batcher(metaclass=Singleton):
|
18
|
+
def __init__(self):
|
19
|
+
self.batch = deque()
|
20
|
+
self.thread = None
|
21
|
+
self.stop_event = Event()
|
22
|
+
|
23
|
+
def log_metric(self, key: str, value: float, step: int):
|
24
|
+
self.batch.append((key, value, step))
|
25
|
+
self._start_thread()
|
26
|
+
|
27
|
+
def log_metrics(self, metrics: Dict[str, float], step: int):
|
28
|
+
self.batch.extend((key, value, step) for key, value in metrics.items())
|
29
|
+
self._start_thread()
|
30
|
+
|
31
|
+
def _start_thread(self):
|
32
|
+
if not self.thread:
|
33
|
+
self.stop_event.clear()
|
34
|
+
self.thread = Thread(target=self.log_batch_metric, args=(self.stop_event,), daemon=True)
|
35
|
+
self.thread.start()
|
36
|
+
|
37
|
+
def _stop_batching(self):
|
38
|
+
self.batch = deque()
|
39
|
+
if self.thread:
|
40
|
+
self.stop_event.set()
|
41
|
+
self.thread.join()
|
42
|
+
|
43
|
+
def log_batch_metric(self, stop_event):
|
44
|
+
while not stop_event.is_set():
|
45
|
+
metrics_to_log = self.batch.copy()
|
46
|
+
op = Operation(schema.Mutation)
|
47
|
+
op.log_metrics(
|
48
|
+
metrics=[MetricInput(key=key, value=value, step=step) for key, value, step in metrics_to_log],
|
49
|
+
job_run_id=variables.job_run_id,
|
50
|
+
)
|
51
|
+
try:
|
52
|
+
send_graphql_request(op, json_response=False, timeout=5)
|
53
|
+
for _ in range(len(metrics_to_log)):
|
54
|
+
self.batch.popleft()
|
55
|
+
except Exception as err:
|
56
|
+
warnings.warn(str(err))
|
57
|
+
time.sleep(METRIC_ACCUMULATION_DURATION)
|
58
|
+
|
59
|
+
def wait_log_metrics(self):
|
60
|
+
stop_time = time.time()
|
61
|
+
while self.batch and time.time() - stop_time < TIMEOUT_LOG_METRIC_BATCH:
|
62
|
+
time.sleep(1)
|
63
|
+
self._stop_batching()
|
@@ -19,6 +19,7 @@ from ML_management.base_exceptions import * # noqa: F403
|
|
19
19
|
from ML_management.base_exceptions import MLMClientError, MLMServerError
|
20
20
|
from ML_management.graphql.schema import MetricInput, ParamInput, schema
|
21
21
|
from ML_management.graphql.send_graphql_request import send_graphql_request
|
22
|
+
from ML_management.mlmanagement.batcher import Batcher
|
22
23
|
from ML_management.mlmanagement.jsonschema_inference import infer_jsonschema
|
23
24
|
from ML_management.mlmanagement.model_type import ModelType
|
24
25
|
from ML_management.mlmanagement.server_mlmanager_exceptions import * # noqa: F403
|
@@ -146,8 +147,8 @@ def _log_object_src(
|
|
146
147
|
finally:
|
147
148
|
sys.path = old_python_path
|
148
149
|
for module in set(sys.modules) - set(old_sys_modules):
|
149
|
-
if hasattr(sys.modules[module], __file__):
|
150
|
-
if str(Path(*parts[:-2])) in sys.modules[module].__file__:
|
150
|
+
if hasattr(sys.modules[module], "__file__"):
|
151
|
+
if sys.modules[module].__file__ and str(Path(*parts[:-2])) in sys.modules[module].__file__:
|
151
152
|
sys.modules.pop(module)
|
152
153
|
|
153
154
|
if additional_local_packages:
|
@@ -596,7 +597,7 @@ def _tar_folder(w, model_folder):
|
|
596
597
|
raise MLMClientError("Some error during tar the content.") from err
|
597
598
|
|
598
599
|
|
599
|
-
def log_metric(key: str, value: float, step: int = 0):
|
600
|
+
def log_metric(key: str, value: float, step: int = 0, no_wait=False):
|
600
601
|
"""
|
601
602
|
Log a metric under the current job.
|
602
603
|
|
@@ -617,6 +618,9 @@ def log_metric(key: str, value: float, step: int = 0):
|
|
617
618
|
step: int
|
618
619
|
Metric step (int). Defaults to zero if unspecified.
|
619
620
|
|
621
|
+
no_wait: bool
|
622
|
+
The no_wait flag allows you to log metrics directly, without using optimization (batching).
|
623
|
+
|
620
624
|
Returns
|
621
625
|
=======
|
622
626
|
None
|
@@ -633,15 +637,18 @@ def log_metric(key: str, value: float, step: int = 0):
|
|
633
637
|
f"{key}: {value} is not log."
|
634
638
|
)
|
635
639
|
return
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
640
|
+
if no_wait:
|
641
|
+
op = Operation(schema.Mutation)
|
642
|
+
op.log_metric(metric=MetricInput(key=key, value=value, step=step), job_run_id=variables.job_run_id)
|
643
|
+
try:
|
644
|
+
return send_graphql_request(op, json_response=False).log_metric
|
645
|
+
except Exception as err:
|
646
|
+
warnings.warn(str(err))
|
647
|
+
else:
|
648
|
+
Batcher().log_metric(key, value, step)
|
642
649
|
|
643
650
|
|
644
|
-
def log_metrics(metrics: Dict[str, float], step: int = 0):
|
651
|
+
def log_metrics(metrics: Dict[str, float], step: int = 0, no_wait=False):
|
645
652
|
"""
|
646
653
|
Log a metrics under the current job.
|
647
654
|
|
@@ -660,6 +667,9 @@ def log_metrics(metrics: Dict[str, float], step: int = 0):
|
|
660
667
|
step: int
|
661
668
|
Metric step (int). Defaults to zero if unspecified.
|
662
669
|
|
670
|
+
no_wait: bool
|
671
|
+
The no_wait flag allows you to log metrics directly, without using optimization (batching).
|
672
|
+
|
663
673
|
Returns
|
664
674
|
=======
|
665
675
|
None
|
@@ -679,16 +689,18 @@ def log_metrics(metrics: Dict[str, float], step: int = 0):
|
|
679
689
|
)
|
680
690
|
continue
|
681
691
|
metrics_to_log[key] = value
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
+
if no_wait:
|
693
|
+
op = Operation(schema.Mutation)
|
694
|
+
op.log_metrics(
|
695
|
+
metrics=[MetricInput(key=key, value=value, step=step) for key, value in metrics_to_log.items()],
|
696
|
+
job_run_id=variables.job_run_id,
|
697
|
+
)
|
698
|
+
try:
|
699
|
+
return send_graphql_request(op, json_response=False).log_metrics
|
700
|
+
except Exception as err:
|
701
|
+
warnings.warn(str(err))
|
702
|
+
else:
|
703
|
+
Batcher().log_metrics(metrics_to_log, step)
|
692
704
|
|
693
705
|
|
694
706
|
def _log_param(key: str, value: str):
|
@@ -41,6 +41,7 @@ set_experiment_description = experiment.set_experiment_description
|
|
41
41
|
delete_experiment_tag = experiment.delete_experiment_tag
|
42
42
|
get_experiment_by_id = experiment.get_experiment_by_name
|
43
43
|
get_experiment_by_name = experiment.get_experiment_by_name
|
44
|
+
create_experiment = experiment.create_experiment
|
44
45
|
ModelMethodParams = parameters.ModelMethodParams
|
45
46
|
ModelVersionChoice = parameters.ModelVersionChoice
|
46
47
|
ModelForm = parameters.ModelForm
|
@@ -160,3 +160,35 @@ def get_experiment_by_id(experiment_id: int) -> Experiment:
|
|
160
160
|
|
161
161
|
experiment = send_graphql_request(op=op)
|
162
162
|
return experiment["experimentFromId"]
|
163
|
+
|
164
|
+
|
165
|
+
def create_experiment(
|
166
|
+
experiment_name: str, experiment_description: str = "", visibility: VisibilityOptions = VisibilityOptions.PRIVATE
|
167
|
+
) -> Experiment:
|
168
|
+
"""
|
169
|
+
Create experiment with given name and description.
|
170
|
+
|
171
|
+
Parameters
|
172
|
+
----------
|
173
|
+
experiment_name: str
|
174
|
+
Name of the experiment.
|
175
|
+
experiment_description: str = ""
|
176
|
+
Description of the experiment. Default: "".
|
177
|
+
visibility: VisibilityOptions
|
178
|
+
Visibility of experiment. Default: PRIVATE.
|
179
|
+
|
180
|
+
Returns
|
181
|
+
-------
|
182
|
+
Experiment
|
183
|
+
Instance of an experiment with meta information.
|
184
|
+
"""
|
185
|
+
op = Operation(schema.Mutation)
|
186
|
+
create_experiment = op.create_experiment(
|
187
|
+
experiment_name=experiment_name, experiment_description=experiment_description, visibility=visibility.name
|
188
|
+
)
|
189
|
+
create_experiment.name()
|
190
|
+
create_experiment.description()
|
191
|
+
|
192
|
+
experiment = send_graphql_request(op=op, json_response=False)
|
193
|
+
|
194
|
+
return experiment.create_experiment
|
@@ -16,6 +16,7 @@ from ML_management.graphql import schema
|
|
16
16
|
from ML_management.graphql.schema import ExecutionJob, Param
|
17
17
|
from ML_management.graphql.send_graphql_request import send_graphql_request
|
18
18
|
from ML_management.mlmanagement import get_server_url
|
19
|
+
from ML_management.mlmanagement.log_api import _raise_error
|
19
20
|
from ML_management.mlmanagement.visibility_options import VisibilityOptions
|
20
21
|
from ML_management.sdk.model import get_latest_model_version
|
21
22
|
from ML_management.sdk.parameters import AnyDatasetLoaderForm, AnyModelForm, DatasetLoaderForm, ModelForm
|
@@ -314,6 +315,7 @@ def _get_logs(job_type: JobType, params: Dict[str, Any], stream: bool = True, fi
|
|
314
315
|
return
|
315
316
|
|
316
317
|
with AuthSession().get(url, stream=True) as resp:
|
318
|
+
_raise_error(resp)
|
317
319
|
if file_name:
|
318
320
|
with open(file_name, "a") as f:
|
319
321
|
for line in resp.iter_lines():
|
@@ -81,12 +81,12 @@ class AuthSession(metaclass=Singleton):
|
|
81
81
|
self._update_cookies(response, ["kc-access"])
|
82
82
|
|
83
83
|
# For sdk auth purposes
|
84
|
-
def sgqlc_request(self, operation: Operation) -> dict:
|
84
|
+
def sgqlc_request(self, operation: Operation, timeout=None) -> dict:
|
85
85
|
"""Make request to /graphql for operation."""
|
86
86
|
cookie_header = self._get_cookie_header()
|
87
|
-
return HTTPEndpoint(
|
88
|
-
|
89
|
-
)
|
87
|
+
return HTTPEndpoint(
|
88
|
+
posixpath.join(get_server_url(), "graphql"), base_headers={"Cookie": cookie_header}, timeout=timeout
|
89
|
+
)(operation)
|
90
90
|
|
91
91
|
def instantiate_websocket_connection(self, url: str) -> WebSocket:
|
92
92
|
"""Create websocket connection."""
|
@@ -23,6 +23,10 @@ CONDA_SIZE_LIMIT = 50000
|
|
23
23
|
INFERENCE_CONFIG_LIMIT = 50000
|
24
24
|
|
25
25
|
|
26
|
+
METRIC_ACCUMULATION_DURATION = int(os.environ.get("METRIC_ACCUMULATION_DURATION", 3))
|
27
|
+
TIMEOUT_LOG_METRIC_BATCH = int(os.environ.get("TIMEOUT_LOG_METRIC_BATCH", 20))
|
28
|
+
|
29
|
+
|
26
30
|
EXPERIMENT_NAME_FOR_EXECUTOR = "executors"
|
27
31
|
EXPERIMENT_NAME_FOR_DATASET_LOADER = "dataset_loaders"
|
28
32
|
FILENAME_FOR_INFERENCE_CONFIG = "predict_config.json"
|
@@ -26,7 +26,7 @@ readme = "README.md"
|
|
26
26
|
maintainers = [
|
27
27
|
{ name = "Maxim Ryndin" },
|
28
28
|
]
|
29
|
-
version = "0.6.
|
29
|
+
version = "0.6.3rc12"
|
30
30
|
|
31
31
|
[build-system]
|
32
32
|
requires = [
|
@@ -35,5 +35,5 @@ requires = [
|
|
35
35
|
build-backend = "pdm.backend"
|
36
36
|
|
37
37
|
[tool.pdm.version]
|
38
|
-
source = "
|
39
|
-
|
38
|
+
source = "file"
|
39
|
+
path = "ML_management/__init__.py"
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/collector_pattern.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/dummy/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/collectors/s3/s3collector.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/dataset_loader/templates/upload.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/executor_pattern.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/__init__.py
RENAMED
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/eval/conda.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/templates/upload.py
RENAMED
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/executor/upload_model_mode.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/backend_api.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/model_type.py
RENAMED
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/module_finder.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/mlmanagement/visibility_options.py
RENAMED
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/model_type_to_methods_map.py
RENAMED
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/__init__.py
RENAMED
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/gradient_model.py
RENAMED
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/model_pattern.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/preprocessor.py
RENAMED
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/target_layer.py
RENAMED
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/torch_model.py
RENAMED
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/trainable_model.py
RENAMED
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/model/patterns/transformer.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/test_sdk/local_sdk_test.sh
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/tests/test_jsonschema_inference.py
RENAMED
File without changes
|
File without changes
|
{ml_management-0.6.3rc10 → ml_management-0.6.3rc12}/ML_management/uploader_data/s3_uploader.py
RENAMED
File without changes
|
File without changes
|
File without changes
|