truefoundry 0.5.10rc1__py3-none-any.whl → 0.5.11rc1__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/cli/display_util.py +1 -1
- 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/io/output_callback.py +13 -6
- truefoundry/deploy/io/rich_output_callback.py +8 -4
- truefoundry/deploy/lib/clients/servicefoundry_client.py +117 -138
- truefoundry/deploy/lib/dao/apply.py +2 -2
- truefoundry/deploy/lib/dao/delete.py +2 -2
- truefoundry/deploy/lib/model/entity.py +37 -24
- 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 +6 -6
- truefoundry/ml/{autogen → _autogen}/client/api/deprecated_api.py +12 -345
- truefoundry/ml/{autogen → _autogen}/client/api/experiments_api.py +89 -44
- truefoundry/ml/{autogen → _autogen}/client/api/generate_code_snippet_api.py +10 -10
- truefoundry/ml/{autogen → _autogen}/client/api/health_api.py +5 -5
- truefoundry/ml/{autogen → _autogen}/client/api/metrics_api.py +10 -10
- truefoundry/ml/{autogen → _autogen}/client/api/mlfoundry_artifacts_api.py +589 -197
- truefoundry/ml/{autogen → _autogen}/client/api/run_artifacts_api.py +14 -9
- truefoundry/ml/{autogen → _autogen}/client/api/runs_api.py +41 -41
- truefoundry/ml/{autogen → _autogen}/client/api_client.py +8 -8
- truefoundry/ml/{autogen → _autogen}/client/configuration.py +30 -58
- truefoundry/ml/{autogen → _autogen}/client/exceptions.py +2 -2
- truefoundry/ml/_autogen/client/models/__init__.py +428 -0
- truefoundry/ml/{autogen → _autogen}/client/models/agent_app.py +14 -7
- truefoundry/ml/{autogen/client/models/agent.py → _autogen/client/models/agent_manifest.py} +37 -35
- truefoundry/ml/{autogen/client/models/agent_open_api_tool.py → _autogen/client/models/agent_open_api_tool_manifest.py} +50 -37
- truefoundry/ml/{autogen → _autogen}/client/models/agent_open_api_tool_with_fqn.py +45 -32
- truefoundry/ml/{autogen → _autogen}/client/models/agent_with_fqn.py +32 -30
- truefoundry/ml/_autogen/client/models/apply_request_dto.py +75 -0
- truefoundry/ml/_autogen/client/models/apply_response_dto.py +79 -0
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_dto.py +7 -5
- truefoundry/ml/{autogen/client/models/artifact_version_manifest.py → _autogen/client/models/artifact_manifest.py} +39 -31
- truefoundry/ml/_autogen/client/models/artifact_path.py +70 -0
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_type.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_dto.py +10 -18
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_response_dto.py +5 -3
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_serialization_format.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_status.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/assistant_message.py +6 -6
- truefoundry/ml/{autogen → _autogen}/client/models/authorize_user_for_model_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/authorize_user_for_model_version_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/blob_storage_reference.py +6 -9
- truefoundry/ml/{autogen → _autogen}/client/models/body_get_search_runs_get.py +2 -2
- truefoundry/ml/{autogen/client/models/chat_prompt.py → _autogen/client/models/chat_prompt_manifest.py} +39 -37
- truefoundry/ml/{autogen/client/models/chat_prompt_messages_inner.py → _autogen/client/models/chat_prompt_manifest_messages_inner.py} +15 -15
- truefoundry/ml/{autogen → _autogen}/client/models/columns_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/command.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/content.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/content1.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/content2.py +5 -5
- truefoundry/ml/{autogen → _autogen}/client/models/content2_any_of_inner.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_request_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_response_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_version_request_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_version_response_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/create_dataset_request_dto.py +21 -5
- truefoundry/ml/{autogen → _autogen}/client/models/create_experiment_request_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/create_experiment_response_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/create_model_version_request_dto.py +4 -12
- truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_for_dataset_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_for_dataset_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/create_python_deployment_config_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/create_python_deployment_config_response_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/create_run_request_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/create_run_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/create_workflow_task_config_request_dto.py +2 -2
- truefoundry/ml/_autogen/client/models/data_directory_manifest.py +124 -0
- truefoundry/ml/{autogen → _autogen}/client/models/dataset_dto.py +15 -4
- truefoundry/ml/{autogen → _autogen}/client/models/dataset_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/delete_artifact_versions_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/delete_dataset_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/delete_files_for_dataset_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/delete_model_version_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/delete_run_request.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/delete_tag_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/experiment_dto.py +5 -5
- truefoundry/ml/{autogen → _autogen}/client/models/experiment_id_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/experiment_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/experiment_tag_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/export_deployment_files_request_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/external_blob_storage_source.py +17 -9
- truefoundry/ml/{autogen → _autogen}/client/models/fast_ai_framework.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/file_info_dto.py +6 -3
- truefoundry/ml/{autogen → _autogen}/client/models/finalize_artifact_version_request_dto.py +7 -15
- truefoundry/ml/{autogen → _autogen}/client/models/framework.py +17 -17
- truefoundry/ml/{autogen → _autogen}/client/models/get_artifact_version_aliases_response_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/get_experiment_response_dto.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/get_latest_run_log_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/get_metric_history_response.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_url_for_dataset_write_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_read_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_read_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_write_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/get_tenant_id_response_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/gluon_framework.py +4 -6
- truefoundry/ml/{autogen → _autogen}/client/models/h2_o_framework.py +4 -6
- truefoundry/ml/{autogen → _autogen}/client/models/http_validation_error.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/image_content_part.py +6 -7
- truefoundry/ml/{autogen → _autogen}/client/models/image_url.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/infer_method_name.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/keras_framework.py +4 -6
- truefoundry/ml/{autogen → _autogen}/client/models/latest_run_log_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/library_name.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/light_gbm_framework.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifact_versions_request_dto.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifact_versions_response_dto.py +5 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifacts_request_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifacts_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_colums_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_datasets_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/list_datasets_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_experiments_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_artifact_version_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_artifact_versions_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_dataset_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_dataset_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_latest_run_logs_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_metric_history_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/list_metric_history_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_model_version_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_model_versions_request_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_models_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/list_models_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_run_artifacts_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/list_run_logs_response_dto.py +3 -3
- truefoundry/ml/_autogen/client/models/local_artifact_source.py +91 -0
- truefoundry/ml/_autogen/client/models/local_model_source.py +77 -0
- truefoundry/ml/{autogen → _autogen}/client/models/log_batch_request_dto.py +5 -5
- truefoundry/ml/{autogen → _autogen}/client/models/log_metric_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/log_param_request_dto.py +2 -2
- truefoundry/ml/_autogen/client/models/manifest.py +229 -0
- truefoundry/ml/_autogen/client/models/manifest1.py +217 -0
- truefoundry/ml/{autogen/client/models/internal_metadata.py → _autogen/client/models/manifest2.py} +68 -50
- truefoundry/ml/{autogen → _autogen}/client/models/method.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/metric_collection_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/metric_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/mime_type.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/model_configuration.py +8 -9
- truefoundry/ml/{autogen → _autogen}/client/models/model_dto.py +6 -6
- truefoundry/ml/{autogen/client/models/model_version_manifest.py → _autogen/client/models/model_manifest.py} +43 -35
- truefoundry/ml/{autogen → _autogen}/client/models/model_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/model_server.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/model_version_dto.py +9 -11
- truefoundry/ml/{autogen → _autogen}/client/models/model_version_environment.py +5 -7
- truefoundry/ml/{autogen → _autogen}/client/models/model_version_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_dto.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_storage_provider.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/notify_artifact_version_failure_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/onnx_framework.py +4 -6
- truefoundry/ml/{autogen → _autogen}/client/models/openapi_spec.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/paddle_framework.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/param_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/parameters.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/py_torch_framework.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/resolve_agent_app_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/restore_run_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/run_data_dto.py +5 -5
- truefoundry/ml/{autogen → _autogen}/client/models/run_dto.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/run_info_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/run_log_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/run_log_input_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/run_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/run_tag_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/search_runs_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/search_runs_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/set_experiment_tag_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/set_tag_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/signed_url_dto.py +3 -4
- truefoundry/ml/{autogen → _autogen}/client/models/sklearn_framework.py +9 -10
- truefoundry/ml/{autogen → _autogen}/client/models/sklearn_model_schema.py +7 -8
- truefoundry/ml/{autogen → _autogen}/client/models/sklearn_serialization_format.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/source.py +34 -9
- truefoundry/ml/{autogen → _autogen}/client/models/source1.py +5 -5
- truefoundry/ml/_autogen/client/models/source2.py +177 -0
- truefoundry/ml/{autogen → _autogen}/client/models/spa_cy_framework.py +4 -6
- truefoundry/ml/{autogen → _autogen}/client/models/stats_models_framework.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/stop.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/store_run_logs_request_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/subject.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/subject_type.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/system_message.py +6 -8
- truefoundry/ml/{autogen → _autogen}/client/models/tensor_flow_framework.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/text.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/text_content_part.py +5 -5
- truefoundry/ml/{autogen → _autogen}/client/models/transformers_framework.py +8 -12
- truefoundry/ml/{autogen → _autogen}/client/models/trigger_job_run_config_request_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/trigger_job_run_config_response_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/true_foundry_managed_source.py +18 -12
- truefoundry/ml/{autogen → _autogen}/client/models/update_artifact_version_request_dto.py +5 -7
- truefoundry/ml/{autogen → _autogen}/client/models/update_dataset_request_dto.py +13 -3
- truefoundry/ml/{autogen → _autogen}/client/models/update_experiment_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/update_model_version_request_dto.py +5 -7
- truefoundry/ml/{autogen → _autogen}/client/models/update_run_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/update_run_response_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/url.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/user_message.py +6 -6
- truefoundry/ml/{autogen → _autogen}/client/models/validate_external_storage_root_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/validate_external_storage_root_response_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/validation_error.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/validation_error_loc_inner.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_framework.py +7 -10
- truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_model_schema.py +6 -7
- truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_serialization_format.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/rest.py +3 -3
- 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 +7 -2
- truefoundry/ml/entities.py +1 -1
- truefoundry/ml/log_types/artifacts/artifact.py +22 -85
- 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 +12 -13
- truefoundry/ml/log_types/artifacts/utils.py +18 -2
- truefoundry/ml/log_types/image/image.py +1 -1
- truefoundry/ml/log_types/plot.py +1 -1
- truefoundry/ml/mlfoundry_api.py +2 -42
- 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.10rc1.dist-info → truefoundry-0.5.11rc1.dist-info}/METADATA +2 -1
- truefoundry-0.5.11rc1.dist-info/RECORD +377 -0
- truefoundry/deploy/auto_gen/models.py +0 -1915
- truefoundry/ml/autogen/client/__init__.py +0 -445
- truefoundry/ml/autogen/client/api/__init__.py +0 -16
- truefoundry/ml/autogen/client/models/__init__.py +0 -416
- truefoundry/ml/autogen/client/models/add_custom_metrics_to_model_version_request_dto.py +0 -69
- truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py +0 -69
- truefoundry/ml/autogen/client/models/manifest.py +0 -154
- truefoundry/ml/autogen/client_README.md +0 -361
- truefoundry/ml/autogen/entities/artifacts.py +0 -670
- truefoundry-0.5.10rc1.dist-info/RECORD +0 -370
- /truefoundry/ml/{autogen → _autogen}/__init__.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/api_response.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.10rc1.dist-info → truefoundry-0.5.11rc1.dist-info}/WHEEL +0 -0
- {truefoundry-0.5.10rc1.dist-info → truefoundry-0.5.11rc1.dist-info}/entry_points.txt +0 -0
|
@@ -1,670 +0,0 @@
|
|
|
1
|
-
# generated by datamodel-codegen:
|
|
2
|
-
# filename: artifacts.json
|
|
3
|
-
# timestamp: 2025-01-28T10:54:09+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
|
-
+sort=50
|
|
16
|
-
+uiType=Hidden
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
get = "get"
|
|
20
|
-
post = "post"
|
|
21
|
-
put = "put"
|
|
22
|
-
delete = "delete"
|
|
23
|
-
patch = "patch"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class BaseArtifactVersion(BaseModel):
|
|
27
|
-
description: Optional[constr(max_length=512)] = Field(
|
|
28
|
-
None, description="+sort=2\n+label=Description"
|
|
29
|
-
)
|
|
30
|
-
metadata: Dict[str, Any] = Field(
|
|
31
|
-
...,
|
|
32
|
-
description="+label=Metadata\n+docs=Key value pairs to store additional metadata\n+usage=Key value pairs to store additional metadata\n+uiType=JsonInput",
|
|
33
|
-
)
|
|
34
|
-
version_alias: Optional[
|
|
35
|
-
constr(regex=r"^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$", max_length=128)
|
|
36
|
-
] = Field(
|
|
37
|
-
None,
|
|
38
|
-
description="+label=Version Alias\n+usage=The version alias should start with 'v' followed by alphanumeric and it can include '.' and '-' in between (e.g. v1.0.0, v1-prod, v3-dev, etc)\n+docs=The version alias should start with 'v' followed by alphanumeric and it can include '.' and '-' in between (e.g. v1.0.0, v1-prod, v3-dev, etc)\n+message=The version alias should start with 'v' followed by alphanumeric and it can include '.' and '-' in between (e.g. v1.0.0, v1-prod, v3-dev, etc)",
|
|
39
|
-
)
|
|
40
|
-
name: Optional[constr(regex=r"^[A-Za-z0-9_\-]+$", max_length=256)] = Field(
|
|
41
|
-
None,
|
|
42
|
-
description="+sort=1\n+label=Name\n+message=The name should start with lowercase alphabets and can contain alphanumeric and can include '-' in between",
|
|
43
|
-
)
|
|
44
|
-
ml_repo: Optional[constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,98}[a-zA-Z0-9]$")] = (
|
|
45
|
-
Field(
|
|
46
|
-
None,
|
|
47
|
-
description="+label=ML Repo\n+usage=name of the ML Repo\n+docs=name of the ML Repo\n+uiType=Hidden",
|
|
48
|
-
)
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class MimeType(str, Enum):
|
|
53
|
-
"""
|
|
54
|
-
+label=MIME Type
|
|
55
|
-
+usage=MIME type of the content
|
|
56
|
-
"""
|
|
57
|
-
|
|
58
|
-
text_plain = "text/plain"
|
|
59
|
-
application_json = "application/json"
|
|
60
|
-
image_png = "image/png"
|
|
61
|
-
image_jpeg = "image/jpeg"
|
|
62
|
-
application_x_directory = "application/x-directory"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
class BlobStorageReference(BaseModel):
|
|
66
|
-
"""
|
|
67
|
-
+usage=Blob Storage Location
|
|
68
|
-
+label=Blob Storage Location
|
|
69
|
-
+docs=Defines the structure for blob storage content references, including type, path, and mime_type
|
|
70
|
-
"""
|
|
71
|
-
|
|
72
|
-
type: Literal["blob-storage"]
|
|
73
|
-
path: constr(regex=r"^.{1,}$") = Field(
|
|
74
|
-
..., description="+label=Path\n+usage=Path to the content in blob storage"
|
|
75
|
-
)
|
|
76
|
-
mime_type: MimeType = Field(
|
|
77
|
-
..., description="+label=MIME Type\n+usage=MIME type of the content"
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
class ExternalBlobStorageSource(BaseModel):
|
|
82
|
-
"""
|
|
83
|
-
+label=External Blob Storage
|
|
84
|
-
"""
|
|
85
|
-
|
|
86
|
-
type: Literal["external"] = Field(
|
|
87
|
-
..., description="+label=Type\n+usage=Type of the source\n+value=external"
|
|
88
|
-
)
|
|
89
|
-
uri: str = Field(
|
|
90
|
-
..., description="+label=URI\n+usage=URI of the Blob Storage source"
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
class FastAIFramework(BaseModel):
|
|
95
|
-
"""
|
|
96
|
-
+docs=FastAI framework for the model version
|
|
97
|
-
+label=FastAI
|
|
98
|
-
"""
|
|
99
|
-
|
|
100
|
-
type: Literal["fastai"] = Field(
|
|
101
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=fastai"
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
class GluonFramework(BaseModel):
|
|
106
|
-
"""
|
|
107
|
-
+docs=Gluon framework for the model version
|
|
108
|
-
+label=Gluon
|
|
109
|
-
"""
|
|
110
|
-
|
|
111
|
-
type: Literal["gluon"] = Field(
|
|
112
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=gluon"
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
class H2OFramework(BaseModel):
|
|
117
|
-
"""
|
|
118
|
-
+docs=H2O framework for the model version
|
|
119
|
-
+label=H2O
|
|
120
|
-
"""
|
|
121
|
-
|
|
122
|
-
type: Literal["h2o"] = Field(
|
|
123
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=h2o"
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
class ImageUrl(BaseModel):
|
|
128
|
-
"""
|
|
129
|
-
+label=URL for the image
|
|
130
|
-
+usage=The URL for the image, must be a non-empty valid HTTPS URL or a data URL
|
|
131
|
-
"""
|
|
132
|
-
|
|
133
|
-
url: Union[
|
|
134
|
-
constr(
|
|
135
|
-
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]+)$"
|
|
136
|
-
),
|
|
137
|
-
BlobStorageReference,
|
|
138
|
-
] = Field(
|
|
139
|
-
...,
|
|
140
|
-
description="+label=URL for the image\n+usage=The URL for the image, must be a non-empty valid HTTPS URL or a data URL",
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
class ImageContentPart(BaseModel):
|
|
145
|
-
"""
|
|
146
|
-
+usage=Image URL
|
|
147
|
-
+label=Image URL
|
|
148
|
-
"""
|
|
149
|
-
|
|
150
|
-
type: Literal["image_url"]
|
|
151
|
-
image_url: ImageUrl = Field(
|
|
152
|
-
...,
|
|
153
|
-
description="+label=URL for the image\n+usage=The URL for the image, must be a non-empty valid HTTPS URL or a data URL",
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
class KerasFramework(BaseModel):
|
|
158
|
-
"""
|
|
159
|
-
+docs=Keras framework for the model version
|
|
160
|
-
+label=Keras
|
|
161
|
-
"""
|
|
162
|
-
|
|
163
|
-
type: Literal["keras"] = Field(
|
|
164
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=keras"
|
|
165
|
-
)
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
class LightGBMFramework(BaseModel):
|
|
169
|
-
"""
|
|
170
|
-
+docs=LightGBM framework for the model version
|
|
171
|
-
+label=LightGBM
|
|
172
|
-
"""
|
|
173
|
-
|
|
174
|
-
type: Literal["lightgbm"] = Field(
|
|
175
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=lightgbm"
|
|
176
|
-
)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
class Parameters(BaseModel):
|
|
180
|
-
"""
|
|
181
|
-
+usage=Parameters for the provider
|
|
182
|
-
+label=Parameters
|
|
183
|
-
+docs=Key-value pairs to store additional parameters for the provider
|
|
184
|
-
"""
|
|
185
|
-
|
|
186
|
-
max_tokens: Optional[int] = None
|
|
187
|
-
temperature: Optional[float] = None
|
|
188
|
-
top_k: Optional[float] = None
|
|
189
|
-
top_p: Optional[float] = None
|
|
190
|
-
stop: Optional[Union[List[str], str]] = None
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
class ModelConfiguration(BaseModel):
|
|
194
|
-
"""
|
|
195
|
-
+label=Model Configuration
|
|
196
|
-
+icon=fa-cogs:#326ce5
|
|
197
|
-
+message=Configuration details for the provider and corresponding config
|
|
198
|
-
+usage=Define the provider and its configuration
|
|
199
|
-
+docs=Configuration settings specific to the provider, including model settings and other parameters.
|
|
200
|
-
"""
|
|
201
|
-
|
|
202
|
-
provider: str = Field(
|
|
203
|
-
...,
|
|
204
|
-
description='+label=Provider Name\n+usage=Name of the provider, must be non-empty, e.g., "openai", "google_gemini"',
|
|
205
|
-
)
|
|
206
|
-
model: constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,30}[a-zA-Z0-9]$") = Field(
|
|
207
|
-
..., description="+label=Model name\n+usage=Model name, must be non-empty"
|
|
208
|
-
)
|
|
209
|
-
parameters: Optional[Parameters] = Field(
|
|
210
|
-
None,
|
|
211
|
-
description="+usage=Parameters for the provider\n+label=Parameters\n+docs=Key-value pairs to store additional parameters for the provider",
|
|
212
|
-
)
|
|
213
|
-
extra_parameters: Optional[Dict[str, Any]] = Field(
|
|
214
|
-
None,
|
|
215
|
-
description="+usage=Extra parameters for the provider\n+label=Extra Parameters\n+docs=Additional parameters for the provider",
|
|
216
|
-
)
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
class ModelVersionEnvironment(BaseModel):
|
|
220
|
-
"""
|
|
221
|
-
+label=Environment
|
|
222
|
-
"""
|
|
223
|
-
|
|
224
|
-
python_version: Optional[constr(regex=r"^\d+(\.\d+){1,2}([\-\.a-z0-9]+)?$")] = (
|
|
225
|
-
Field(
|
|
226
|
-
None,
|
|
227
|
-
description="+label=Python Version\n+usage=Python version for the model version",
|
|
228
|
-
)
|
|
229
|
-
)
|
|
230
|
-
pip_packages: Optional[List[str]] = Field(
|
|
231
|
-
None,
|
|
232
|
-
description="+label=PIP Packages\n+usage=PIP packages for the model version",
|
|
233
|
-
)
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
class ONNXFramework(BaseModel):
|
|
237
|
-
"""
|
|
238
|
-
+docs=ONNX framework for the model version
|
|
239
|
-
+label=ONNX
|
|
240
|
-
"""
|
|
241
|
-
|
|
242
|
-
type: Literal["onnx"] = Field(
|
|
243
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=onnx"
|
|
244
|
-
)
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
class PaddleFramework(BaseModel):
|
|
248
|
-
"""
|
|
249
|
-
+docs=PaddlePaddle framework for the model version
|
|
250
|
-
+label=Paddle
|
|
251
|
-
"""
|
|
252
|
-
|
|
253
|
-
type: Literal["paddle"] = Field(
|
|
254
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=paddle"
|
|
255
|
-
)
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
class PyTorchFramework(BaseModel):
|
|
259
|
-
"""
|
|
260
|
-
+docs=PyTorch framework for the model version
|
|
261
|
-
+label=PyTorch
|
|
262
|
-
"""
|
|
263
|
-
|
|
264
|
-
type: Literal["pytorch"] = Field(
|
|
265
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=pytorch"
|
|
266
|
-
)
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
class InferMethodName(str, Enum):
|
|
270
|
-
"""
|
|
271
|
-
+label=Inference Method Name
|
|
272
|
-
+usage=Name of the method used for inference
|
|
273
|
-
"""
|
|
274
|
-
|
|
275
|
-
predict = "predict"
|
|
276
|
-
predict_proba = "predict_proba"
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
class SklearnModelSchema(BaseModel):
|
|
280
|
-
"""
|
|
281
|
-
+label=Sklearn Model Schema
|
|
282
|
-
"""
|
|
283
|
-
|
|
284
|
-
infer_method_name: InferMethodName = Field(
|
|
285
|
-
...,
|
|
286
|
-
description="+label=Inference Method Name\n+usage=Name of the method used for inference",
|
|
287
|
-
)
|
|
288
|
-
inputs: List[Dict[str, Any]] = Field(
|
|
289
|
-
..., description="+label= Input Schema\n+usage=Schema of the input"
|
|
290
|
-
)
|
|
291
|
-
outputs: List[Dict[str, Any]] = Field(
|
|
292
|
-
..., description="+label= Output Schema\n+usage=Schema of the output"
|
|
293
|
-
)
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
class SklearnSerializationFormat(str, Enum):
|
|
297
|
-
"""
|
|
298
|
-
+label=Serialization format
|
|
299
|
-
+usage=Serialization format used for sklearn models
|
|
300
|
-
"""
|
|
301
|
-
|
|
302
|
-
cloudpickle = "cloudpickle"
|
|
303
|
-
joblib = "joblib"
|
|
304
|
-
pickle = "pickle"
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
class SpaCyFramework(BaseModel):
|
|
308
|
-
"""
|
|
309
|
-
+docs=spaCy framework for the model version
|
|
310
|
-
+label=SpaCy
|
|
311
|
-
"""
|
|
312
|
-
|
|
313
|
-
type: Literal["spacy"] = Field(
|
|
314
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=spacy"
|
|
315
|
-
)
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
class StatsModelsFramework(BaseModel):
|
|
319
|
-
"""
|
|
320
|
-
+docs=StatsModels framework for the model version
|
|
321
|
-
+label=StatsModels
|
|
322
|
-
"""
|
|
323
|
-
|
|
324
|
-
type: Literal["statsmodels"] = Field(
|
|
325
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=statsmodels"
|
|
326
|
-
)
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
class SystemMessage(BaseModel):
|
|
330
|
-
"""
|
|
331
|
-
+usage=System message
|
|
332
|
-
+docs=Defines the structure of a system message, including role and content
|
|
333
|
-
+label=System Message
|
|
334
|
-
"""
|
|
335
|
-
|
|
336
|
-
role: Literal["system"]
|
|
337
|
-
content: Union[constr(regex=r"^.[\s\S]*$"), BlobStorageReference] = Field(
|
|
338
|
-
..., description="+label=Content\n+usage=Text content for the system message"
|
|
339
|
-
)
|
|
340
|
-
name: Optional[str] = Field(
|
|
341
|
-
None, description="+label=Name\n+usage=Name of the system"
|
|
342
|
-
)
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
class TensorFlowFramework(BaseModel):
|
|
346
|
-
"""
|
|
347
|
-
+docs=TensorFlow framework for the model version
|
|
348
|
-
+label=TensorFlow
|
|
349
|
-
"""
|
|
350
|
-
|
|
351
|
-
type: Literal["tensorflow"] = Field(
|
|
352
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=tensorflow"
|
|
353
|
-
)
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
class TextContentPart(BaseModel):
|
|
357
|
-
"""
|
|
358
|
-
+usage=Text content
|
|
359
|
-
+label=Text content
|
|
360
|
-
"""
|
|
361
|
-
|
|
362
|
-
type: Literal["text"]
|
|
363
|
-
text: Union[constr(regex=r"^.[\s\S]*$"), BlobStorageReference]
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
class LibraryName(str, Enum):
|
|
367
|
-
"""
|
|
368
|
-
+label=Library Name
|
|
369
|
-
+usage=Name of the library for the framework
|
|
370
|
-
"""
|
|
371
|
-
|
|
372
|
-
transformers = "transformers"
|
|
373
|
-
sentence_transformers = "sentence-transformers"
|
|
374
|
-
diffusers = "diffusers"
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
class TransformersFramework(BaseModel):
|
|
378
|
-
"""
|
|
379
|
-
+docs=Transformers framework for the model version
|
|
380
|
-
+label=Transformers
|
|
381
|
-
+value=transformers
|
|
382
|
-
"""
|
|
383
|
-
|
|
384
|
-
type: Literal["transformers"] = Field(
|
|
385
|
-
...,
|
|
386
|
-
description="+label=Type\n+usage=Type of the framework\n+value=transformers",
|
|
387
|
-
)
|
|
388
|
-
library_name: Optional[LibraryName] = Field(
|
|
389
|
-
"transformers",
|
|
390
|
-
description="+label=Library Name\n+usage=Name of the library for the framework",
|
|
391
|
-
)
|
|
392
|
-
pipeline_tag: Optional[str] = Field(
|
|
393
|
-
None,
|
|
394
|
-
description="+label=Pipeline Tag\n+usage=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\n+docs=Pipeline tag for the framework",
|
|
395
|
-
)
|
|
396
|
-
base_model: Optional[str] = Field(
|
|
397
|
-
None,
|
|
398
|
-
description="+label=Base Model\n+usage=Base model Id. If this is a finetuned model, this points to the base model used for finetuning\n+docs=Base model Id. If this is a finetuned model, this points to the base model used for finetuning",
|
|
399
|
-
)
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
class TrueFoundryManagedSource(BaseModel):
|
|
403
|
-
"""
|
|
404
|
-
+usage=Source for the entity
|
|
405
|
-
+label=Upload
|
|
406
|
-
"""
|
|
407
|
-
|
|
408
|
-
type: Literal["truefoundry"] = Field(
|
|
409
|
-
..., description="+label=Type\n+usage=Type of the source\n+value=truefoundry"
|
|
410
|
-
)
|
|
411
|
-
uri: Optional[str] = Field(
|
|
412
|
-
None,
|
|
413
|
-
description='+label=URI\n+uiType=ModelUploadInput\n+uiProps={"hideClear":true}',
|
|
414
|
-
)
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
class UserMessage(BaseModel):
|
|
418
|
-
"""
|
|
419
|
-
+usage=User message
|
|
420
|
-
+docs=Defines the structure of a user message, including role and content
|
|
421
|
-
+label=User Message
|
|
422
|
-
"""
|
|
423
|
-
|
|
424
|
-
role: Literal["user"]
|
|
425
|
-
content: Union[
|
|
426
|
-
constr(regex=r"^.[\s\S]*$"),
|
|
427
|
-
BlobStorageReference,
|
|
428
|
-
List[Union[TextContentPart, ImageContentPart]],
|
|
429
|
-
] = Field(
|
|
430
|
-
..., description="+label=Content\n+usage=Text content for the user message"
|
|
431
|
-
)
|
|
432
|
-
name: Optional[str] = Field(
|
|
433
|
-
None, description="+label=Name\n+usage=Name of the user message"
|
|
434
|
-
)
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
class XGBoostModelSchema(BaseModel):
|
|
438
|
-
"""
|
|
439
|
-
+label=XGBoost Model Schema
|
|
440
|
-
"""
|
|
441
|
-
|
|
442
|
-
infer_method_name: Literal["predict"] = Field(
|
|
443
|
-
...,
|
|
444
|
-
description="+label=Inference Method Name\n+usage=Name of the method used for inference",
|
|
445
|
-
)
|
|
446
|
-
inputs: List[Dict[str, Any]] = Field(
|
|
447
|
-
..., description="+label= Input Schema\n+usage=Schema of the input"
|
|
448
|
-
)
|
|
449
|
-
outputs: List[Dict[str, Any]] = Field(
|
|
450
|
-
..., description="+label= Output Schema\n+usage=Schema of the output"
|
|
451
|
-
)
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
class XGBoostSerializationFormat(str, Enum):
|
|
455
|
-
"""
|
|
456
|
-
+label=Serialization format
|
|
457
|
-
+usage=Serialization format used for XGBoost models
|
|
458
|
-
"""
|
|
459
|
-
|
|
460
|
-
cloudpickle = "cloudpickle"
|
|
461
|
-
joblib = "joblib"
|
|
462
|
-
pickle = "pickle"
|
|
463
|
-
json = "json"
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
class Agent(BaseArtifactVersion):
|
|
467
|
-
type: Literal["agent"] = Field(..., description="+value=agent")
|
|
468
|
-
available_tools: List[constr(min_length=1)] = Field(
|
|
469
|
-
..., description="+sort=30\n+uiType=Hidden"
|
|
470
|
-
)
|
|
471
|
-
goal: constr(min_length=1, max_length=128) = Field(
|
|
472
|
-
..., description="+sort=10\n+uiType=TextArea"
|
|
473
|
-
)
|
|
474
|
-
instruction: constr(min_length=1, max_length=2620) = Field(
|
|
475
|
-
...,
|
|
476
|
-
description='`instruction` is the system prompt for now. (2.5 * 1024)\n+sort=20\n+uiType=AgentInstructions\n+uiProps={"helpText":"Use the syntax ${Tool FQN} to reference a tool, and ${AGENT FQN} to reference another agent"}',
|
|
477
|
-
)
|
|
478
|
-
model_id: constr(min_length=1) = Field(
|
|
479
|
-
...,
|
|
480
|
-
description='+sort=40\n+uiType=EnabledModelSelector\n+uiProps={"searchable":true,"modelType":"chat","providerType":"openai"}',
|
|
481
|
-
)
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
class AgentOpenAPITool(BaseArtifactVersion):
|
|
485
|
-
type: Literal["openapi-tool"] = Field(..., description="+value=openapi-tool")
|
|
486
|
-
openapi_spec: Union[BlobStorageReference, Dict[str, Any]] = Field(
|
|
487
|
-
..., description="+sort=20\n+uiType=OpenapiSchema"
|
|
488
|
-
)
|
|
489
|
-
base_url: constr(
|
|
490
|
-
regex=r"^(https?://)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?:[-a-zA-Z0-9()@:%_\+.~#?&/=]*)$"
|
|
491
|
-
) = Field(..., description="+sort=30")
|
|
492
|
-
path: constr(min_length=1) = Field(
|
|
493
|
-
...,
|
|
494
|
-
description="+sort=40\n+uiType=MethodPathSelector\n+label=Method + Path\n+usage=Select one Method and Path for this tool",
|
|
495
|
-
)
|
|
496
|
-
method: Method = Field(..., description="+sort=50\n+uiType=Hidden")
|
|
497
|
-
headers: Optional[Dict[str, str]] = Field(
|
|
498
|
-
None,
|
|
499
|
-
description='+sort=60\n+uiType=KV\n+uiProps={"allowSecrets":true,"secretConfig":{"enableNew":true,"hideOptions":true}}',
|
|
500
|
-
)
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
class AgentOpenAPIToolWithFQN(AgentOpenAPITool):
|
|
504
|
-
id: str
|
|
505
|
-
fqn: str
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
class AgentWithFQN(Agent):
|
|
509
|
-
id: str
|
|
510
|
-
fqn: str
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
class ArtifactVersion(BaseArtifactVersion):
|
|
514
|
-
type: Literal["artifact-version"] = Field(
|
|
515
|
-
...,
|
|
516
|
-
description='+label=Type\n+usage=Artifact Version\n+value="artifact-version"',
|
|
517
|
-
)
|
|
518
|
-
source: Union[TrueFoundryManagedSource, ExternalBlobStorageSource] = Field(
|
|
519
|
-
...,
|
|
520
|
-
description="+label=Artifact Source\n+usage=Source for the Artifact version\n+uiType=Group",
|
|
521
|
-
)
|
|
522
|
-
step: conint(ge=0) = Field(0, description="+label=Step")
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
class AssistantMessage(BaseModel):
|
|
526
|
-
"""
|
|
527
|
-
+usage=Assistant message
|
|
528
|
-
+docs=Defines the structure of an assistant message, including role and content
|
|
529
|
-
+label=Assistant Message
|
|
530
|
-
"""
|
|
531
|
-
|
|
532
|
-
role: Literal["assistant"]
|
|
533
|
-
content: Union[constr(regex=r"^.[\s\S]*$"), BlobStorageReference] = Field(
|
|
534
|
-
..., description="+label=Content\n+usage=Text content for the assistant message"
|
|
535
|
-
)
|
|
536
|
-
name: Optional[str] = Field(
|
|
537
|
-
None, description="+label=Name\n+usage=Name of the assistant message"
|
|
538
|
-
)
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
class ChatPrompt(BaseArtifactVersion):
|
|
542
|
-
type: Literal["chat_prompt"] = Field(
|
|
543
|
-
...,
|
|
544
|
-
description='+label=Type\n+icon=fa-desktop:#326ce5\n+message=Type of the prompt\n+sort=3000\n+usage=Type of the prompt\n+docs=Type of the prompt, set to "chat_prompt"\n+default="chat_prompt"',
|
|
545
|
-
)
|
|
546
|
-
messages: List[Union[SystemMessage, AssistantMessage, UserMessage]] = Field(
|
|
547
|
-
...,
|
|
548
|
-
description="+sort=4000\n+usage=Chat completion messages\n+label=Messages in the chat conversation\n+message=Chat completion messages\n+usage=List of messages in the chat conversation, must be non-empty\n+docs=Messages that define the chat conversation, including system, assistant, and user messages.",
|
|
549
|
-
)
|
|
550
|
-
variables: Optional[Dict[str, Optional[str]]] = Field(
|
|
551
|
-
None,
|
|
552
|
-
description="+label=Variables\n+usage=Variables for the chat completion messages to be used in the prompt messages\n+sort=5000",
|
|
553
|
-
)
|
|
554
|
-
model_configuration: ModelConfiguration
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
class DataDirectory(BaseModel):
|
|
558
|
-
"""
|
|
559
|
-
+label=Data Directory
|
|
560
|
-
"""
|
|
561
|
-
|
|
562
|
-
type: Literal["data-dir"] = Field(
|
|
563
|
-
...,
|
|
564
|
-
description='+label=Type\n+usage=Data Directory\n+docs=Data Directory\n+value="data-dir"',
|
|
565
|
-
)
|
|
566
|
-
description: Optional[constr(max_length=512)] = Field(
|
|
567
|
-
None,
|
|
568
|
-
description="+label=Description\n+usage=Description of the data directory\n+docs=Description of the data directory",
|
|
569
|
-
)
|
|
570
|
-
metadata: Dict[str, Any] = Field(
|
|
571
|
-
...,
|
|
572
|
-
description="+label=Metadata\n+docs=Metadata for the data directory\n+usage=Metadata for the data directory\n+uiType=JsonInput",
|
|
573
|
-
)
|
|
574
|
-
name: constr(regex=r"^[A-Za-z0-9_\-]+$", max_length=256) = Field(
|
|
575
|
-
...,
|
|
576
|
-
description="+sort=1\n+label=Name\n+usage=Name of the data directory\n+docs=Name of the data directory\n+message=The data directory name should start with lowercase alphabets and can contain alphanumeric and can include '-' in between",
|
|
577
|
-
)
|
|
578
|
-
ml_repo: constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,98}[a-zA-Z0-9]$") = Field(
|
|
579
|
-
...,
|
|
580
|
-
description="+label=ML Repo\n+usage=name of the ML Repo of the data directory\n+docs=name of the ML Repo of the data directory\n+uiType=Hidden",
|
|
581
|
-
)
|
|
582
|
-
source: Union[TrueFoundryManagedSource, ExternalBlobStorageSource] = Field(
|
|
583
|
-
...,
|
|
584
|
-
description="+label=Data Directory Source\n+usage=Source for the Data Directory\n+docs=Source for the Data Directory\n+uiType=Group",
|
|
585
|
-
)
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
class SklearnFramework(BaseModel):
|
|
589
|
-
"""
|
|
590
|
-
+docs=Scikit-learn framework for the model version
|
|
591
|
-
+label=Sklearn
|
|
592
|
-
"""
|
|
593
|
-
|
|
594
|
-
type: Literal["sklearn"] = Field(
|
|
595
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=sklearn"
|
|
596
|
-
)
|
|
597
|
-
model_filepath: Optional[str] = Field(
|
|
598
|
-
None,
|
|
599
|
-
description="+label=Model file path\n+usage=Relative path to the model file",
|
|
600
|
-
)
|
|
601
|
-
serialization_format: Optional[SklearnSerializationFormat] = None
|
|
602
|
-
model_schema: Optional[SklearnModelSchema] = None
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
class XGBoostFramework(BaseModel):
|
|
606
|
-
"""
|
|
607
|
-
+docs=XGBoost framework for the model version
|
|
608
|
-
+label=XGBoost
|
|
609
|
-
"""
|
|
610
|
-
|
|
611
|
-
type: Literal["xgboost"] = Field(
|
|
612
|
-
..., description="+label=Type\n+usage=Type of the framework\n+value=xgboost"
|
|
613
|
-
)
|
|
614
|
-
serialization_format: Optional[XGBoostSerializationFormat] = None
|
|
615
|
-
model_filepath: Optional[str] = Field(
|
|
616
|
-
None,
|
|
617
|
-
description="+label=Model file path\n+usage=Relative path to the model file",
|
|
618
|
-
)
|
|
619
|
-
model_schema: Optional[XGBoostModelSchema] = None
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
class AgentApp(BaseModel):
|
|
623
|
-
type: Literal["agent-app"] = Field(..., description="+value=agent-app")
|
|
624
|
-
tools: List[AgentOpenAPIToolWithFQN]
|
|
625
|
-
agents: List[AgentWithFQN]
|
|
626
|
-
root_agent: constr(min_length=1)
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
class ModelVersion(BaseArtifactVersion):
|
|
630
|
-
type: Literal["model-version"] = Field(
|
|
631
|
-
..., description='+label=Type\n+usage=Model Version\n+value="model-version"'
|
|
632
|
-
)
|
|
633
|
-
source: Union[TrueFoundryManagedSource, ExternalBlobStorageSource] = Field(
|
|
634
|
-
...,
|
|
635
|
-
description="+label=Model Source\n+usage=Source for the model version\n+uiType=Group",
|
|
636
|
-
)
|
|
637
|
-
framework: Optional[
|
|
638
|
-
Union[
|
|
639
|
-
TransformersFramework,
|
|
640
|
-
TensorFlowFramework,
|
|
641
|
-
SklearnFramework,
|
|
642
|
-
PyTorchFramework,
|
|
643
|
-
KerasFramework,
|
|
644
|
-
XGBoostFramework,
|
|
645
|
-
LightGBMFramework,
|
|
646
|
-
FastAIFramework,
|
|
647
|
-
H2OFramework,
|
|
648
|
-
ONNXFramework,
|
|
649
|
-
SpaCyFramework,
|
|
650
|
-
StatsModelsFramework,
|
|
651
|
-
GluonFramework,
|
|
652
|
-
PaddleFramework,
|
|
653
|
-
]
|
|
654
|
-
] = Field(
|
|
655
|
-
None, description="+label=Framework\n+usage=Framework for the model version"
|
|
656
|
-
)
|
|
657
|
-
environment: Optional[ModelVersionEnvironment] = None
|
|
658
|
-
step: conint(ge=0) = Field(0, description="+label=Step")
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
class VersionedArtifactType(BaseModel):
|
|
662
|
-
__root__: Union[
|
|
663
|
-
ChatPrompt,
|
|
664
|
-
AgentOpenAPITool,
|
|
665
|
-
Agent,
|
|
666
|
-
AgentApp,
|
|
667
|
-
ModelVersion,
|
|
668
|
-
ArtifactVersion,
|
|
669
|
-
DataDirectory,
|
|
670
|
-
]
|