truefoundry 0.5.10rc2__py3-none-any.whl → 0.6.1__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 truefoundry might be problematic. Click here for more details.
- truefoundry/__init__.py +19 -0
- truefoundry/_client.py +36 -0
- truefoundry/common/constants.py +16 -2
- truefoundry/common/utils.py +9 -0
- truefoundry/deploy/__init__.py +2 -2
- truefoundry/deploy/_autogen/models.py +1591 -0
- truefoundry/deploy/builder/__init__.py +1 -1
- truefoundry/deploy/builder/builders/dockerfile.py +1 -1
- truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +1 -1
- truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +1 -1
- truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +1 -1
- truefoundry/deploy/lib/clients/servicefoundry_client.py +41 -35
- truefoundry/deploy/v2/lib/deploy.py +7 -7
- truefoundry/deploy/v2/lib/deploy_workflow.py +9 -9
- truefoundry/deploy/v2/lib/deployable_patched_models.py +1 -1
- truefoundry/deploy/v2/lib/patched_models.py +7 -7
- truefoundry/deploy/v2/lib/source.py +1 -1
- truefoundry/ml/__init__.py +2 -2
- truefoundry/ml/_autogen/client/__init__.py +457 -0
- truefoundry/ml/_autogen/client/api/__init__.py +16 -0
- truefoundry/ml/{autogen → _autogen}/client/api/auth_api.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/api/deprecated_api.py +7 -7
- truefoundry/ml/{autogen → _autogen}/client/api/experiments_api.py +12 -12
- truefoundry/ml/{autogen → _autogen}/client/api/generate_code_snippet_api.py +8 -8
- truefoundry/ml/{autogen → _autogen}/client/api/health_api.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/api/metrics_api.py +6 -6
- truefoundry/ml/{autogen → _autogen}/client/api/mlfoundry_artifacts_api.py +61 -59
- truefoundry/ml/{autogen → _autogen}/client/api/run_artifacts_api.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/api/runs_api.py +21 -21
- truefoundry/ml/{autogen → _autogen}/client/api_client.py +6 -6
- truefoundry/ml/{autogen → _autogen}/client/configuration.py +1 -1
- truefoundry/ml/_autogen/client/models/__init__.py +428 -0
- truefoundry/ml/{autogen → _autogen}/client/models/agent_app.py +5 -6
- truefoundry/ml/{autogen → _autogen}/client/models/agent_manifest.py +10 -17
- truefoundry/ml/{autogen → _autogen}/client/models/agent_open_api_tool_manifest.py +12 -18
- truefoundry/ml/{autogen → _autogen}/client/models/agent_open_api_tool_with_fqn.py +15 -23
- truefoundry/ml/{autogen → _autogen}/client/models/agent_with_fqn.py +13 -22
- truefoundry/ml/{autogen → _autogen}/client/models/apply_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/apply_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_dto.py +5 -3
- truefoundry/ml/{autogen/client/models/artifact_version_manifest.py → _autogen/client/models/artifact_manifest.py} +16 -21
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_path.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_dto.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_response_dto.py +3 -1
- truefoundry/ml/{autogen → _autogen}/client/models/assistant_message.py +4 -8
- truefoundry/ml/{autogen → _autogen}/client/models/blob_storage_reference.py +5 -8
- truefoundry/ml/{autogen → _autogen}/client/models/chat_prompt_manifest.py +10 -15
- truefoundry/ml/{autogen → _autogen}/client/models/chat_prompt_manifest_messages_inner.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/content.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/content1.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/content2.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/content2_any_of_inner.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_version_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_dataset_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_experiment_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_for_dataset_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_run_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_run_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/data_directory_manifest.py +5 -7
- truefoundry/ml/{autogen → _autogen}/client/models/dataset_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/dataset_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/experiment_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/experiment_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/export_deployment_files_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/external_blob_storage_source.py +14 -7
- truefoundry/ml/{autogen → _autogen}/client/models/fast_ai_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/file_info_dto.py +4 -1
- truefoundry/ml/{autogen → _autogen}/client/models/finalize_artifact_version_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/framework.py +15 -15
- truefoundry/ml/{autogen → _autogen}/client/models/get_experiment_response_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/get_latest_run_log_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/get_metric_history_response.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_read_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_write_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/gluon_framework.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/h2_o_framework.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/http_validation_error.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/image_content_part.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/image_url.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/infer_method_name.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/keras_framework.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/latest_run_log_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/library_name.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/light_gbm_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifact_versions_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifact_versions_response_dto.py +3 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifacts_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifacts_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_colums_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_datasets_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_experiments_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_artifact_versions_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_dataset_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_latest_run_logs_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_metric_history_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_model_version_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_model_versions_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_models_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_run_artifacts_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_run_logs_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/local_artifact_source.py +3 -5
- truefoundry/ml/{autogen → _autogen}/client/models/local_model_source.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/log_batch_request_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/manifest.py +28 -30
- truefoundry/ml/{autogen → _autogen}/client/models/manifest1.py +26 -28
- truefoundry/ml/{autogen → _autogen}/client/models/manifest2.py +16 -16
- truefoundry/ml/{autogen → _autogen}/client/models/method.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/metric_collection_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/mime_type.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/model_configuration.py +6 -7
- truefoundry/ml/{autogen → _autogen}/client/models/model_dto.py +4 -4
- truefoundry/ml/{autogen/client/models/model_version_manifest.py → _autogen/client/models/model_manifest.py} +18 -23
- truefoundry/ml/{autogen → _autogen}/client/models/model_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/model_version_dto.py +7 -9
- truefoundry/ml/{autogen → _autogen}/client/models/model_version_environment.py +3 -5
- truefoundry/ml/{autogen → _autogen}/client/models/model_version_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/onnx_framework.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/openapi_spec.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/paddle_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/parameters.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/py_torch_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/resolve_agent_app_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/run_data_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/run_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/run_info_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/run_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/search_runs_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/signed_url_dto.py +1 -2
- truefoundry/ml/{autogen → _autogen}/client/models/sklearn_framework.py +7 -8
- truefoundry/ml/{autogen → _autogen}/client/models/sklearn_model_schema.py +5 -8
- truefoundry/ml/{autogen → _autogen}/client/models/sklearn_serialization_format.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/source.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/source1.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/source2.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/spa_cy_framework.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/stats_models_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/store_run_logs_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/subject.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/system_message.py +4 -9
- truefoundry/ml/{autogen → _autogen}/client/models/tensor_flow_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/text.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/text_content_part.py +3 -5
- truefoundry/ml/{autogen → _autogen}/client/models/transformers_framework.py +6 -10
- truefoundry/ml/{autogen → _autogen}/client/models/trigger_job_run_config_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/true_foundry_managed_source.py +16 -10
- truefoundry/ml/{autogen → _autogen}/client/models/update_artifact_version_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/update_dataset_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/update_model_version_request_dto.py +3 -5
- truefoundry/ml/{autogen → _autogen}/client/models/update_run_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/url.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/user_message.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/validation_error.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_framework.py +5 -8
- truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_model_schema.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_serialization_format.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/rest.py +1 -1
- truefoundry/ml/_autogen/client_README.md +359 -0
- truefoundry/ml/_autogen/entities/artifacts.py +558 -0
- truefoundry/ml/artifact/truefoundry_artifact_repo.py +1 -1
- truefoundry/ml/cli/commands/model_init.py +1 -1
- truefoundry/ml/clients/servicefoundry_client.py +4 -0
- truefoundry/ml/entities.py +1 -1
- truefoundry/ml/log_types/artifacts/artifact.py +9 -9
- truefoundry/ml/log_types/artifacts/dataset.py +5 -5
- truefoundry/ml/log_types/artifacts/general_artifact.py +1 -1
- truefoundry/ml/log_types/artifacts/model.py +9 -9
- truefoundry/ml/log_types/image/image.py +1 -1
- truefoundry/ml/log_types/plot.py +1 -1
- truefoundry/ml/mlfoundry_api.py +2 -2
- truefoundry/ml/mlfoundry_run.py +1 -1
- truefoundry/ml/model_framework.py +3 -3
- truefoundry/ml/session.py +7 -4
- truefoundry/ml/validation_utils.py +1 -1
- truefoundry/workflow/map_task.py +5 -2
- {truefoundry-0.5.10rc2.dist-info → truefoundry-0.6.1.dist-info}/METADATA +2 -1
- truefoundry-0.6.1.dist-info/RECORD +377 -0
- truefoundry/deploy/auto_gen/models.py +0 -1915
- truefoundry/ml/autogen/client/__init__.py +0 -453
- truefoundry/ml/autogen/client/api/__init__.py +0 -16
- truefoundry/ml/autogen/client/models/__init__.py +0 -424
- truefoundry/ml/autogen/client_README.md +0 -359
- truefoundry/ml/autogen/entities/artifacts.py +0 -795
- truefoundry-0.5.10rc2.dist-info/RECORD +0 -376
- /truefoundry/ml/{autogen → _autogen}/__init__.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/api_response.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/exceptions.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/artifact_type.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_serialization_format.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_status.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/authorize_user_for_model_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/authorize_user_for_model_version_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/body_get_search_runs_get.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/columns_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/command.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_version_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_experiment_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_model_version_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_for_dataset_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_python_deployment_config_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_python_deployment_config_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_workflow_task_config_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_artifact_versions_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_dataset_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_files_for_dataset_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_model_version_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_run_request.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_tag_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/experiment_id_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/experiment_tag_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_artifact_version_aliases_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_url_for_dataset_write_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_read_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_tenant_id_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/list_datasets_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_artifact_version_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_dataset_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/list_metric_history_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/list_models_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/log_metric_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/log_param_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/metric_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/model_server.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_storage_provider.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/notify_artifact_version_failure_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/param_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/restore_run_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/run_log_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/run_log_input_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/run_tag_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/search_runs_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/set_experiment_tag_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/set_tag_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/stop.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/subject_type.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/trigger_job_run_config_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/update_experiment_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/update_run_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/validate_external_storage_root_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/validate_external_storage_root_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/validation_error_loc_inner.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/models/__init__.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/models/exceptions.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/models/schema.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/models/signature.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/models/utils.py +0 -0
- {truefoundry-0.5.10rc2.dist-info → truefoundry-0.6.1.dist-info}/WHEEL +0 -0
- {truefoundry-0.5.10rc2.dist-info → truefoundry-0.6.1.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: artifacts.json
|
|
3
|
+
# timestamp: 2025-03-03T13:22:20+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Any, Dict, List, Literal, Optional, Union
|
|
9
|
+
|
|
10
|
+
from truefoundry.pydantic_v1 import BaseModel, Field, conint, constr
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Method(str, Enum):
|
|
14
|
+
"""
|
|
15
|
+
HTTP Method for the tool call HTTP request
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
get = "get"
|
|
19
|
+
post = "post"
|
|
20
|
+
put = "put"
|
|
21
|
+
delete = "delete"
|
|
22
|
+
patch = "patch"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class ArtifactPath(BaseModel):
|
|
26
|
+
src: str = Field(..., description="Local file or folder path")
|
|
27
|
+
dest: Optional[str] = Field(
|
|
28
|
+
None,
|
|
29
|
+
description="Relative path where the file or folder will be uploaded to in the artifact",
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class BaseArtifactVersion(BaseModel):
|
|
34
|
+
name: Optional[constr(regex=r"^[A-Za-z0-9_\-]+$", max_length=256)] = Field(
|
|
35
|
+
None, description="Name of the entity"
|
|
36
|
+
)
|
|
37
|
+
description: Optional[constr(max_length=512)] = Field(None, description="")
|
|
38
|
+
metadata: Dict[str, Any] = Field(
|
|
39
|
+
...,
|
|
40
|
+
description='Key value metadata. Should be valid JSON. For e.g. `{"business-unit": "sales", "quality": "good", "rating": 4.5}`',
|
|
41
|
+
)
|
|
42
|
+
version_alias: Optional[
|
|
43
|
+
constr(regex=r"^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$", max_length=128)
|
|
44
|
+
] = Field(
|
|
45
|
+
None,
|
|
46
|
+
description="Version alias is alternate, ideally human readable, version string to reference an artifact version. It should start with `v` followed by alphanumeric and it can include `.` and `-` in between (e.g. `v1.0.0`, `v1-prod`, `v3-dev`, etc)",
|
|
47
|
+
)
|
|
48
|
+
ml_repo: Optional[constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,98}[a-zA-Z0-9]$")] = (
|
|
49
|
+
Field(None, description="Name of the ML Repo")
|
|
50
|
+
)
|
|
51
|
+
version: Optional[conint(ge=1)] = Field(None, description="Version of the entity")
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class MimeType(str, Enum):
|
|
55
|
+
"""
|
|
56
|
+
MIME type of the content
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
text_plain = "text/plain"
|
|
60
|
+
application_json = "application/json"
|
|
61
|
+
image_png = "image/png"
|
|
62
|
+
image_jpeg = "image/jpeg"
|
|
63
|
+
application_x_directory = "application/x-directory"
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class BlobStorageReference(BaseModel):
|
|
67
|
+
"""
|
|
68
|
+
A reference to content offloaded to blob storage
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
type: Literal["blob-storage"] = Field(..., description="")
|
|
72
|
+
path: constr(regex=r"^.{1,}$") = Field(
|
|
73
|
+
..., description="Path to the content in blob storage"
|
|
74
|
+
)
|
|
75
|
+
mime_type: MimeType = Field(..., description="MIME type of the content")
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class Collaborator(BaseModel):
|
|
79
|
+
subject: str = Field(
|
|
80
|
+
...,
|
|
81
|
+
description="Fully Qualified Name of the subject. eg: user:email or team:teamname",
|
|
82
|
+
)
|
|
83
|
+
role_id: str = Field(..., description="Role ID for the resource")
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class ExternalBlobStorageSource(BaseModel):
|
|
87
|
+
type: Literal["external"] = Field(..., description="Type of the source")
|
|
88
|
+
uri: constr(regex=r"^(s3|gs|wasbs)://.*") = Field(
|
|
89
|
+
...,
|
|
90
|
+
description="URI referencing a path in the blob storage bucket linked to the MLRepo",
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class FastAIFramework(BaseModel):
|
|
95
|
+
type: Literal["fastai"] = Field(..., description="Type of the framework")
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class GluonFramework(BaseModel):
|
|
99
|
+
type: Literal["gluon"] = Field(..., description="Type of the framework")
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class H2OFramework(BaseModel):
|
|
103
|
+
type: Literal["h2o"] = Field(..., description="Type of the framework")
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
class ImageUrl(BaseModel):
|
|
107
|
+
"""
|
|
108
|
+
Image URL linking to the image
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
url: Union[
|
|
112
|
+
constr(
|
|
113
|
+
regex=r"^\b((https?://)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?:[-a-zA-Z0-9()@:%_\+.~#?&/=]*)|data:image/[a-zA-Z]+;base64,[a-zA-Z0-9+/=\s]+)$"
|
|
114
|
+
),
|
|
115
|
+
BlobStorageReference,
|
|
116
|
+
] = Field(..., description="Image URL linking to the image")
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class ImageContentPart(BaseModel):
|
|
120
|
+
"""
|
|
121
|
+
Image content for the message
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
type: Literal["image_url"] = Field(..., description="Type of the content part")
|
|
125
|
+
image_url: ImageUrl = Field(..., description="Image URL linking to the image")
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class KerasFramework(BaseModel):
|
|
129
|
+
type: Literal["keras"] = Field(..., description="Type of the framework")
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class LightGBMFramework(BaseModel):
|
|
133
|
+
type: Literal["lightgbm"] = Field(..., description="Type of the framework")
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class LocalArtifactSource(BaseModel):
|
|
137
|
+
type: Literal["local"] = Field(..., description="Type of the source")
|
|
138
|
+
paths: List[ArtifactPath] = Field(
|
|
139
|
+
...,
|
|
140
|
+
description="Array of ArtifactPath objects representing the source and destination paths",
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class LocalModelSource(BaseModel):
|
|
145
|
+
type: Literal["local"] = Field(..., description="Type of the source")
|
|
146
|
+
file_or_folder: str = Field(..., description="Path to the model file or folder")
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class MLRepo(BaseModel):
|
|
150
|
+
"""
|
|
151
|
+
MLRepo is a repository ML training runs that log params, metrics, plots, images and versioned entities like artifacts, models, prompts, tools, agents
|
|
152
|
+
"""
|
|
153
|
+
|
|
154
|
+
type: Literal["ml-repo"] = Field(..., description="")
|
|
155
|
+
name: constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,98}[a-zA-Z0-9]$") = Field(
|
|
156
|
+
..., description="Name of the ML Repo."
|
|
157
|
+
)
|
|
158
|
+
description: Optional[constr(regex=r"^.{0,500}$")] = Field(
|
|
159
|
+
None, description="Description for the ML Repo."
|
|
160
|
+
)
|
|
161
|
+
storage_integration_fqn: str = Field(
|
|
162
|
+
...,
|
|
163
|
+
description="Storage Integration to store artifacts and models. A storage integration represents a connected blob storage like AWS S3 / Azure Blob Storage / Google Cloud Storage.",
|
|
164
|
+
)
|
|
165
|
+
collaborators: List[Collaborator] = Field(
|
|
166
|
+
..., description="Users and Teams that have access to MLRepo"
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
class Parameters(BaseModel):
|
|
171
|
+
"""
|
|
172
|
+
Parameters to pass to the model when generating
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
max_tokens: Optional[int] = None
|
|
176
|
+
temperature: Optional[float] = None
|
|
177
|
+
top_k: Optional[float] = None
|
|
178
|
+
top_p: Optional[float] = None
|
|
179
|
+
stop: Optional[Union[List[str], str]] = None
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
class ModelConfiguration(BaseModel):
|
|
183
|
+
"""
|
|
184
|
+
Add a model from Gateway along with parameters to be used for chat completion
|
|
185
|
+
"""
|
|
186
|
+
|
|
187
|
+
provider: str = Field(
|
|
188
|
+
...,
|
|
189
|
+
description="Name of the provider, must be one of the integration providers configured for the Gateway",
|
|
190
|
+
)
|
|
191
|
+
model: constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,30}[a-zA-Z0-9]$") = Field(
|
|
192
|
+
...,
|
|
193
|
+
description="Name of the model to be used for generations. This model should be available in the provider",
|
|
194
|
+
)
|
|
195
|
+
parameters: Optional[Parameters] = Field(
|
|
196
|
+
None, description="Parameters to pass to the model when generating"
|
|
197
|
+
)
|
|
198
|
+
extra_parameters: Optional[Dict[str, Any]] = Field(
|
|
199
|
+
None,
|
|
200
|
+
description="Arbitrary extra parameters to pass to the model when generating",
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
class ModelVersionEnvironment(BaseModel):
|
|
205
|
+
"""
|
|
206
|
+
Runtime environment describing python version and dependencies for running the model
|
|
207
|
+
"""
|
|
208
|
+
|
|
209
|
+
python_version: Optional[constr(regex=r"^\d+(\.\d+){1,2}([\-\.a-z0-9]+)?$")] = (
|
|
210
|
+
Field(None, description="Python version to use when running the model")
|
|
211
|
+
)
|
|
212
|
+
pip_packages: Optional[List[str]] = Field(
|
|
213
|
+
None, description="pip dependencies needed for running the model"
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
class ONNXFramework(BaseModel):
|
|
218
|
+
type: Literal["onnx"] = Field(..., description="Type of the framework")
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class PaddleFramework(BaseModel):
|
|
222
|
+
type: Literal["paddle"] = Field(..., description="Type of the framework")
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
class PyTorchFramework(BaseModel):
|
|
226
|
+
type: Literal["pytorch"] = Field(..., description="Type of the framework")
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
class InferMethodName(str, Enum):
|
|
230
|
+
"""
|
|
231
|
+
Name of the method used for inference
|
|
232
|
+
"""
|
|
233
|
+
|
|
234
|
+
predict = "predict"
|
|
235
|
+
predict_proba = "predict_proba"
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
class SklearnModelSchema(BaseModel):
|
|
239
|
+
infer_method_name: InferMethodName = Field(
|
|
240
|
+
..., description="Name of the method used for inference"
|
|
241
|
+
)
|
|
242
|
+
inputs: List[Dict[str, Any]] = Field(..., description="Schema of the input")
|
|
243
|
+
outputs: List[Dict[str, Any]] = Field(..., description="Schema of the output")
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
class SklearnSerializationFormat(str, Enum):
|
|
247
|
+
"""
|
|
248
|
+
Serialization format used to save the sklearn model
|
|
249
|
+
"""
|
|
250
|
+
|
|
251
|
+
cloudpickle = "cloudpickle"
|
|
252
|
+
joblib = "joblib"
|
|
253
|
+
pickle = "pickle"
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
class SpaCyFramework(BaseModel):
|
|
257
|
+
type: Literal["spacy"] = Field(..., description="Type of the framework")
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
class StatsModelsFramework(BaseModel):
|
|
261
|
+
type: Literal["statsmodels"] = Field(..., description="Type of the framework")
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
class SystemMessage(BaseModel):
|
|
265
|
+
"""
|
|
266
|
+
System message for the chat
|
|
267
|
+
"""
|
|
268
|
+
|
|
269
|
+
role: Literal["system"] = Field(..., description="Role of the message")
|
|
270
|
+
content: Union[constr(regex=r"^.[\s\S]*$"), BlobStorageReference] = Field(
|
|
271
|
+
..., description="Text content for the system message"
|
|
272
|
+
)
|
|
273
|
+
name: Optional[str] = Field(None, description="Name of the system")
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
class TensorFlowFramework(BaseModel):
|
|
277
|
+
type: Literal["tensorflow"] = Field(..., description="Type of the framework")
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
class TextContentPart(BaseModel):
|
|
281
|
+
"""
|
|
282
|
+
Text content for the message
|
|
283
|
+
"""
|
|
284
|
+
|
|
285
|
+
type: Literal["text"] = Field(..., description="Type of the content part")
|
|
286
|
+
text: Union[constr(regex=r"^.[\s\S]*$"), BlobStorageReference] = Field(
|
|
287
|
+
..., description="Text content for the message"
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
class LibraryName(str, Enum):
|
|
292
|
+
"""
|
|
293
|
+
Name of the library for the framework
|
|
294
|
+
"""
|
|
295
|
+
|
|
296
|
+
transformers = "transformers"
|
|
297
|
+
sentence_transformers = "sentence-transformers"
|
|
298
|
+
diffusers = "diffusers"
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
class TransformersFramework(BaseModel):
|
|
302
|
+
type: Literal["transformers"] = Field(..., description="Type of the framework")
|
|
303
|
+
library_name: Optional[LibraryName] = Field(
|
|
304
|
+
"transformers", description="Name of the library for the framework"
|
|
305
|
+
)
|
|
306
|
+
pipeline_tag: Optional[str] = Field(
|
|
307
|
+
None,
|
|
308
|
+
description="The `pipeline()` task this model can be used with e.g. `text-generation`. See [huggingface docs](https://huggingface.co/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline.task) for all possible values",
|
|
309
|
+
)
|
|
310
|
+
base_model: Optional[str] = Field(
|
|
311
|
+
None,
|
|
312
|
+
description="Base model Id from HuggingFace Hub. If this is a finetuned model, this points to the base model id used for finetuning.",
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
class TrueFoundryManagedSource(BaseModel):
|
|
317
|
+
type: Literal["truefoundry"] = Field(..., description="Type of the source")
|
|
318
|
+
uri: Optional[constr(regex=r"^(s3|gs|wasbs)://.*")] = Field(None, description="")
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
class UserMessage(BaseModel):
|
|
322
|
+
"""
|
|
323
|
+
User message turn
|
|
324
|
+
"""
|
|
325
|
+
|
|
326
|
+
role: Literal["user"] = Field(..., description="Role of the message")
|
|
327
|
+
content: Union[
|
|
328
|
+
constr(regex=r"^.[\s\S]*$"),
|
|
329
|
+
BlobStorageReference,
|
|
330
|
+
List[Union[TextContentPart, ImageContentPart]],
|
|
331
|
+
] = Field(
|
|
332
|
+
..., description="Content of the user message. can be a mix of text and images"
|
|
333
|
+
)
|
|
334
|
+
name: Optional[str] = Field(
|
|
335
|
+
None, description="Name of the user this message is from"
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
class XGBoostModelSchema(BaseModel):
|
|
340
|
+
"""
|
|
341
|
+
Schema of the XGBoost model
|
|
342
|
+
"""
|
|
343
|
+
|
|
344
|
+
infer_method_name: Literal["predict"] = Field(
|
|
345
|
+
..., description="Name of the method used for inference"
|
|
346
|
+
)
|
|
347
|
+
inputs: List[Dict[str, Any]] = Field(..., description="Schema of the input")
|
|
348
|
+
outputs: List[Dict[str, Any]] = Field(..., description="Schema of the output")
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
class XGBoostSerializationFormat(str, Enum):
|
|
352
|
+
"""
|
|
353
|
+
Serialization format used to save the xgboost model
|
|
354
|
+
"""
|
|
355
|
+
|
|
356
|
+
cloudpickle = "cloudpickle"
|
|
357
|
+
joblib = "joblib"
|
|
358
|
+
pickle = "pickle"
|
|
359
|
+
json = "json"
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
class Agent(BaseArtifactVersion):
|
|
363
|
+
type: Literal["agent"] = Field(..., description="Type of the entity")
|
|
364
|
+
available_tools: List[constr(min_length=1)] = Field(
|
|
365
|
+
..., description="Tools available to the agent"
|
|
366
|
+
)
|
|
367
|
+
goal: constr(min_length=1, max_length=128) = Field(
|
|
368
|
+
...,
|
|
369
|
+
description="Short form description. Will be used as `description` when this agent is used as a tool.",
|
|
370
|
+
)
|
|
371
|
+
instruction: constr(min_length=1, max_length=2620) = Field(
|
|
372
|
+
..., description="Instructions for the agent to follow to achieve the goal"
|
|
373
|
+
)
|
|
374
|
+
model_id: constr(min_length=1) = Field(
|
|
375
|
+
..., description="Model to use when running the agent"
|
|
376
|
+
)
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
class AgentOpenAPITool(BaseArtifactVersion):
|
|
380
|
+
type: Literal["openapi-tool"] = Field(..., description="Type of the agent")
|
|
381
|
+
openapi_spec: Union[BlobStorageReference, Dict[str, Any]] = Field(
|
|
382
|
+
...,
|
|
383
|
+
description="OpenAPI Spec for the tool describing the API, endpoints and parameters. [Sample OpenAPI Spec Link](https://assets.production.truefoundry.com/sample-openapi.json)",
|
|
384
|
+
)
|
|
385
|
+
base_url: constr(
|
|
386
|
+
regex=r"^(https?://)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?:[-a-zA-Z0-9()@:%_\+.~#?&/=]*)$"
|
|
387
|
+
) = Field(
|
|
388
|
+
...,
|
|
389
|
+
description="HTTP endpoint where the API is hosted for the tools. E.g. `https://api.example.com/v1`",
|
|
390
|
+
)
|
|
391
|
+
path: constr(min_length=1) = Field(
|
|
392
|
+
...,
|
|
393
|
+
description="API Route Path for the tool call HTTP request. E.g. `GET /weather`",
|
|
394
|
+
)
|
|
395
|
+
method: Method = Field(
|
|
396
|
+
..., description="HTTP Method for the tool call HTTP request"
|
|
397
|
+
)
|
|
398
|
+
headers: Optional[Dict[str, str]] = Field(
|
|
399
|
+
None,
|
|
400
|
+
description="HTTP Headers for the tool call HTTP request. E.g. `Authorization: Bearer <token>`",
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
class AgentOpenAPIToolWithFQN(AgentOpenAPITool):
|
|
405
|
+
id: str = Field(..., description="ID of the agent tool")
|
|
406
|
+
fqn: str = Field(..., description="FQN of the agent tool")
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
class AgentWithFQN(Agent):
|
|
410
|
+
id: str = Field(..., description="ID of the agent")
|
|
411
|
+
fqn: str = Field(..., description="FQN of the agent")
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
class ArtifactVersion(BaseArtifactVersion):
|
|
415
|
+
"""
|
|
416
|
+
Log a new Artifact Version containing files and folders with metadata
|
|
417
|
+
"""
|
|
418
|
+
|
|
419
|
+
type: Literal["artifact-version"] = Field(..., description="Artifact Version")
|
|
420
|
+
source: Union[
|
|
421
|
+
TrueFoundryManagedSource, ExternalBlobStorageSource, LocalArtifactSource
|
|
422
|
+
] = Field(..., description="")
|
|
423
|
+
step: conint(ge=0) = Field(
|
|
424
|
+
0,
|
|
425
|
+
description="Step/Epoch number in an iterative training loop the artifact version was created. Generally useful when logging a model version from a MLRepo Run",
|
|
426
|
+
)
|
|
427
|
+
run_id: Optional[str] = Field(
|
|
428
|
+
None, description="ID of the MLRepo Run that generated the artifact version"
|
|
429
|
+
)
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
class AssistantMessage(BaseModel):
|
|
433
|
+
"""
|
|
434
|
+
Assistant message turn
|
|
435
|
+
"""
|
|
436
|
+
|
|
437
|
+
role: Literal["assistant"] = Field(..., description="Role of the message")
|
|
438
|
+
content: Union[constr(regex=r"^.[\s\S]*$"), BlobStorageReference] = Field(
|
|
439
|
+
..., description="Text content for the assistant message"
|
|
440
|
+
)
|
|
441
|
+
name: Optional[str] = Field(
|
|
442
|
+
None, description="Name of the assistant this message is from"
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
class ChatPrompt(BaseArtifactVersion):
|
|
447
|
+
"""
|
|
448
|
+
Fill in the information for opening a new chat prompt
|
|
449
|
+
"""
|
|
450
|
+
|
|
451
|
+
type: Literal["chat_prompt"] = Field(..., description="Type of the prompt")
|
|
452
|
+
messages: List[Union[SystemMessage, AssistantMessage, UserMessage]] = Field(
|
|
453
|
+
..., description="List of messages in the chat conversation, must be non-empty"
|
|
454
|
+
)
|
|
455
|
+
variables: Optional[Dict[str, Optional[str]]] = Field(
|
|
456
|
+
None,
|
|
457
|
+
description="Variables referenced in messages and that can be replaced when running generation",
|
|
458
|
+
)
|
|
459
|
+
model_configuration: ModelConfiguration
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
class DataDirectory(BaseModel):
|
|
463
|
+
type: Literal["data-dir"] = Field(..., description="")
|
|
464
|
+
name: constr(regex=r"^[A-Za-z0-9_\-]+$", max_length=256) = Field(
|
|
465
|
+
..., description="Name of the data directory"
|
|
466
|
+
)
|
|
467
|
+
ml_repo: constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,98}[a-zA-Z0-9]$") = Field(
|
|
468
|
+
..., description="Name of the ML Repo to create the data directory under"
|
|
469
|
+
)
|
|
470
|
+
description: Optional[constr(max_length=512)] = Field(
|
|
471
|
+
None, description="Description for the data directory"
|
|
472
|
+
)
|
|
473
|
+
metadata: Dict[str, Any] = Field(
|
|
474
|
+
...,
|
|
475
|
+
description='Key Value metadata. Should be valid JSON. For e.g. `{"business-unit": "sales", "quality": "good", "rating": 4.5}`',
|
|
476
|
+
)
|
|
477
|
+
source: Union[TrueFoundryManagedSource, ExternalBlobStorageSource] = Field(
|
|
478
|
+
..., description=""
|
|
479
|
+
)
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
class SklearnFramework(BaseModel):
|
|
483
|
+
type: Literal["sklearn"] = Field(..., description="Type of the framework")
|
|
484
|
+
model_filepath: Optional[str] = Field(
|
|
485
|
+
None,
|
|
486
|
+
description="Relative path to the model file in the model version contents",
|
|
487
|
+
)
|
|
488
|
+
serialization_format: Optional[SklearnSerializationFormat] = None
|
|
489
|
+
model_schema: Optional[SklearnModelSchema] = None
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
class XGBoostFramework(BaseModel):
|
|
493
|
+
type: Literal["xgboost"] = Field(..., description="Type of the framework")
|
|
494
|
+
serialization_format: Optional[XGBoostSerializationFormat] = None
|
|
495
|
+
model_filepath: Optional[str] = Field(
|
|
496
|
+
None,
|
|
497
|
+
description="Relative path to the model file in the model version contents",
|
|
498
|
+
)
|
|
499
|
+
model_schema: Optional[XGBoostModelSchema] = None
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
class AgentApp(BaseModel):
|
|
503
|
+
type: Literal["agent-app"] = Field(..., description="Type of the app")
|
|
504
|
+
tools: List[AgentOpenAPIToolWithFQN] = Field(
|
|
505
|
+
..., description="Tools available to the Agent app"
|
|
506
|
+
)
|
|
507
|
+
agents: List[AgentWithFQN] = Field(
|
|
508
|
+
..., description="Agents available to the Agent app"
|
|
509
|
+
)
|
|
510
|
+
root_agent: constr(min_length=1) = Field(
|
|
511
|
+
..., description="Root Agent for the app. This will be the first agent invoked"
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
class ModelVersion(BaseArtifactVersion):
|
|
516
|
+
"""
|
|
517
|
+
Log a new Model Version containing model files and folders with metadata
|
|
518
|
+
"""
|
|
519
|
+
|
|
520
|
+
type: Literal["model-version"] = Field(..., description="Model Version")
|
|
521
|
+
source: Union[
|
|
522
|
+
TrueFoundryManagedSource, ExternalBlobStorageSource, LocalModelSource
|
|
523
|
+
] = Field(..., description="")
|
|
524
|
+
framework: Optional[
|
|
525
|
+
Union[
|
|
526
|
+
TransformersFramework,
|
|
527
|
+
TensorFlowFramework,
|
|
528
|
+
SklearnFramework,
|
|
529
|
+
PyTorchFramework,
|
|
530
|
+
KerasFramework,
|
|
531
|
+
XGBoostFramework,
|
|
532
|
+
LightGBMFramework,
|
|
533
|
+
FastAIFramework,
|
|
534
|
+
H2OFramework,
|
|
535
|
+
ONNXFramework,
|
|
536
|
+
SpaCyFramework,
|
|
537
|
+
StatsModelsFramework,
|
|
538
|
+
GluonFramework,
|
|
539
|
+
PaddleFramework,
|
|
540
|
+
]
|
|
541
|
+
] = Field(
|
|
542
|
+
None,
|
|
543
|
+
description="Framework for the model version like Transformers, PyTorch, Sklearn, Xgboost etc with framework specific metadata. This will be used to infer model deployment configuration",
|
|
544
|
+
)
|
|
545
|
+
environment: Optional[ModelVersionEnvironment] = None
|
|
546
|
+
step: conint(ge=0) = Field(
|
|
547
|
+
0,
|
|
548
|
+
description="Step/Epoch number in an iterative training loop the model version was created. Generally useful when logging a model version from a MLRepo Run",
|
|
549
|
+
)
|
|
550
|
+
run_id: Optional[str] = Field(
|
|
551
|
+
None, description="ID of the MLRepo Run that generated the model version"
|
|
552
|
+
)
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
class VersionedArtifactType(BaseModel):
|
|
556
|
+
__root__: Union[
|
|
557
|
+
ArtifactVersion, ModelVersion, ChatPrompt, AgentOpenAPITool, Agent, AgentApp
|
|
558
|
+
]
|
|
@@ -43,7 +43,7 @@ from truefoundry.common.storage_provider_utils import (
|
|
|
43
43
|
decide_file_parts,
|
|
44
44
|
s3_compatible_multipart_upload,
|
|
45
45
|
)
|
|
46
|
-
from truefoundry.ml.
|
|
46
|
+
from truefoundry.ml._autogen.client import ( # type: ignore[attr-defined]
|
|
47
47
|
ApiClient,
|
|
48
48
|
CreateMultiPartUploadForDatasetRequestDto,
|
|
49
49
|
CreateMultiPartUploadRequestDto,
|
|
@@ -6,7 +6,7 @@ import rich_click as click
|
|
|
6
6
|
from truefoundry.cli.console import console
|
|
7
7
|
from truefoundry.cli.const import COMMAND_CLS
|
|
8
8
|
from truefoundry.cli.util import handle_exception_wrapper
|
|
9
|
-
from truefoundry.ml.
|
|
9
|
+
from truefoundry.ml._autogen.client import ModelServer # type: ignore[attr-defined]
|
|
10
10
|
from truefoundry.ml.cli.utils import (
|
|
11
11
|
AppName,
|
|
12
12
|
NonEmptyString,
|
|
@@ -13,6 +13,7 @@ from truefoundry.common.request_utils import (
|
|
|
13
13
|
from truefoundry.common.servicefoundry_client import (
|
|
14
14
|
ServiceFoundryServiceClient as BaseServiceFoundryServiceClient,
|
|
15
15
|
)
|
|
16
|
+
from truefoundry.common.utils import get_user_agent
|
|
16
17
|
from truefoundry.ml.exceptions import MlFoundryException
|
|
17
18
|
|
|
18
19
|
|
|
@@ -36,6 +37,9 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
36
37
|
timeout=3,
|
|
37
38
|
params={"id": integration_id, "type": "blob-storage"},
|
|
38
39
|
session=session,
|
|
40
|
+
headers={
|
|
41
|
+
"User-Agent": get_user_agent(),
|
|
42
|
+
},
|
|
39
43
|
)
|
|
40
44
|
|
|
41
45
|
try:
|
truefoundry/ml/entities.py
CHANGED
|
@@ -9,15 +9,11 @@ from pathlib import Path
|
|
|
9
9
|
from typing import TYPE_CHECKING, Any, Dict, NamedTuple, Optional, Union
|
|
10
10
|
|
|
11
11
|
from truefoundry.common.warnings import TrueFoundryDeprecationWarning
|
|
12
|
-
from truefoundry.ml.
|
|
13
|
-
ArtifactIdentifier,
|
|
14
|
-
MlFoundryArtifactsRepository,
|
|
15
|
-
)
|
|
16
|
-
from truefoundry.ml.autogen.client import ( # type: ignore[attr-defined]
|
|
12
|
+
from truefoundry.ml._autogen.client import ( # type: ignore[attr-defined]
|
|
17
13
|
ArtifactDto,
|
|
14
|
+
ArtifactManifest,
|
|
18
15
|
ArtifactType,
|
|
19
16
|
ArtifactVersionDto,
|
|
20
|
-
ArtifactVersionManifest,
|
|
21
17
|
CreateArtifactVersionRequestDto,
|
|
22
18
|
DeleteArtifactVersionsRequestDto,
|
|
23
19
|
ExperimentsApi,
|
|
@@ -28,6 +24,10 @@ from truefoundry.ml.autogen.client import ( # type: ignore[attr-defined]
|
|
|
28
24
|
TrueFoundryManagedSource,
|
|
29
25
|
UpdateArtifactVersionRequestDto,
|
|
30
26
|
)
|
|
27
|
+
from truefoundry.ml.artifact.truefoundry_artifact_repo import (
|
|
28
|
+
ArtifactIdentifier,
|
|
29
|
+
MlFoundryArtifactsRepository,
|
|
30
|
+
)
|
|
31
31
|
from truefoundry.ml.exceptions import MlFoundryException
|
|
32
32
|
from truefoundry.ml.log_types.artifacts.constants import INTERNAL_METADATA_PATH
|
|
33
33
|
from truefoundry.ml.log_types.artifacts.utils import (
|
|
@@ -392,7 +392,7 @@ class ArtifactVersion:
|
|
|
392
392
|
self._ensure_not_deleted()
|
|
393
393
|
if self._artifact_version.manifest:
|
|
394
394
|
manifest = self._artifact_version.manifest.actual_instance
|
|
395
|
-
assert isinstance(manifest,
|
|
395
|
+
assert isinstance(manifest, ArtifactManifest)
|
|
396
396
|
manifest.description = self.description
|
|
397
397
|
manifest.metadata = self.metadata
|
|
398
398
|
manifest.version_alias = self.version_alias
|
|
@@ -504,8 +504,8 @@ def _log_artifact_version_helper(
|
|
|
504
504
|
|
|
505
505
|
artifact_manifest = None
|
|
506
506
|
if artifact_type == ArtifactType.ARTIFACT:
|
|
507
|
-
_source_cls = get_autogen_type(
|
|
508
|
-
artifact_manifest =
|
|
507
|
+
_source_cls = get_autogen_type(ArtifactManifest, "source")
|
|
508
|
+
artifact_manifest = ArtifactManifest(
|
|
509
509
|
name=name,
|
|
510
510
|
ml_repo=ml_repo,
|
|
511
511
|
description=description,
|
|
@@ -5,16 +5,16 @@ import tempfile
|
|
|
5
5
|
from typing import Any, Dict, Iterator, List, NamedTuple, Optional, Tuple, Union
|
|
6
6
|
from warnings import warn
|
|
7
7
|
|
|
8
|
-
from truefoundry.ml.
|
|
9
|
-
ArtifactIdentifier,
|
|
10
|
-
MlFoundryArtifactsRepository,
|
|
11
|
-
)
|
|
12
|
-
from truefoundry.ml.autogen.client import ( # type: ignore[attr-defined]
|
|
8
|
+
from truefoundry.ml._autogen.client import ( # type: ignore[attr-defined]
|
|
13
9
|
DatasetDto,
|
|
14
10
|
DeleteDatasetRequestDto,
|
|
15
11
|
MlfoundryArtifactsApi,
|
|
16
12
|
UpdateDatasetRequestDto,
|
|
17
13
|
)
|
|
14
|
+
from truefoundry.ml.artifact.truefoundry_artifact_repo import (
|
|
15
|
+
ArtifactIdentifier,
|
|
16
|
+
MlFoundryArtifactsRepository,
|
|
17
|
+
)
|
|
18
18
|
from truefoundry.ml.entities import FileInfo
|
|
19
19
|
from truefoundry.ml.exceptions import MlFoundryException
|
|
20
20
|
from truefoundry.ml.log_types.artifacts.utils import (
|
|
@@ -2,7 +2,7 @@ import collections
|
|
|
2
2
|
import tempfile
|
|
3
3
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
|
|
4
4
|
|
|
5
|
-
from truefoundry.ml.
|
|
5
|
+
from truefoundry.ml._autogen.client import ( # type: ignore[attr-defined]
|
|
6
6
|
ArtifactType,
|
|
7
7
|
)
|
|
8
8
|
from truefoundry.ml.exceptions import MlFoundryException
|