truefoundry 0.3.4rc1__py3-none-any.whl → 0.4.0__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 +2 -0
- truefoundry/autodeploy/agents/developer.py +1 -1
- truefoundry/autodeploy/agents/project_identifier.py +2 -2
- truefoundry/autodeploy/agents/tester.py +1 -1
- truefoundry/autodeploy/cli.py +1 -1
- truefoundry/autodeploy/tools/list_files.py +1 -1
- truefoundry/cli/__main__.py +3 -17
- truefoundry/common/__init__.py +0 -0
- truefoundry/{deploy/lib/auth → common}/auth_service_client.py +50 -40
- truefoundry/common/constants.py +12 -0
- truefoundry/{deploy/lib/auth → common}/credential_file_manager.py +7 -7
- truefoundry/{deploy/lib/auth → common}/credential_provider.py +10 -23
- truefoundry/common/entities.py +124 -0
- truefoundry/common/exceptions.py +12 -0
- truefoundry/common/request_utils.py +84 -0
- truefoundry/common/servicefoundry_client.py +91 -0
- truefoundry/common/utils.py +56 -0
- truefoundry/deploy/auto_gen/models.py +4 -6
- truefoundry/deploy/cli/cli.py +3 -1
- truefoundry/deploy/cli/commands/apply_command.py +1 -1
- truefoundry/deploy/cli/commands/build_command.py +1 -1
- truefoundry/deploy/cli/commands/deploy_command.py +1 -1
- truefoundry/deploy/cli/commands/login_command.py +2 -2
- truefoundry/deploy/cli/commands/patch_application_command.py +1 -1
- truefoundry/deploy/cli/commands/patch_command.py +1 -1
- truefoundry/deploy/cli/commands/terminate_comand.py +1 -1
- truefoundry/deploy/cli/util.py +1 -1
- truefoundry/deploy/function_service/remote/remote.py +1 -1
- truefoundry/deploy/lib/auth/servicefoundry_session.py +2 -2
- truefoundry/deploy/lib/clients/servicefoundry_client.py +120 -159
- truefoundry/deploy/lib/const.py +1 -35
- truefoundry/deploy/lib/exceptions.py +0 -16
- truefoundry/deploy/lib/model/entity.py +1 -112
- truefoundry/deploy/lib/session.py +14 -42
- truefoundry/deploy/lib/util.py +0 -37
- truefoundry/{python_deploy_codegen.py → deploy/python_deploy_codegen.py} +2 -2
- truefoundry/deploy/v2/lib/deploy.py +3 -3
- truefoundry/deploy/v2/lib/deployable_patched_models.py +1 -1
- truefoundry/langchain/truefoundry_chat.py +1 -1
- truefoundry/langchain/truefoundry_embeddings.py +1 -1
- truefoundry/langchain/truefoundry_llm.py +1 -1
- truefoundry/langchain/utils.py +0 -41
- truefoundry/ml/__init__.py +37 -6
- truefoundry/ml/artifact/__init__.py +0 -0
- truefoundry/ml/artifact/truefoundry_artifact_repo.py +1161 -0
- truefoundry/ml/autogen/__init__.py +0 -0
- truefoundry/ml/autogen/client/__init__.py +370 -0
- truefoundry/ml/autogen/client/api/__init__.py +16 -0
- truefoundry/ml/autogen/client/api/auth_api.py +184 -0
- truefoundry/ml/autogen/client/api/deprecated_api.py +605 -0
- truefoundry/ml/autogen/client/api/experiments_api.py +1944 -0
- truefoundry/ml/autogen/client/api/health_api.py +299 -0
- truefoundry/ml/autogen/client/api/metrics_api.py +371 -0
- truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +7213 -0
- truefoundry/ml/autogen/client/api/python_deployment_config_api.py +201 -0
- truefoundry/ml/autogen/client/api/run_artifacts_api.py +231 -0
- truefoundry/ml/autogen/client/api/runs_api.py +2919 -0
- truefoundry/ml/autogen/client/api_client.py +822 -0
- truefoundry/ml/autogen/client/api_response.py +30 -0
- truefoundry/ml/autogen/client/configuration.py +489 -0
- truefoundry/ml/autogen/client/exceptions.py +161 -0
- truefoundry/ml/autogen/client/models/__init__.py +341 -0
- truefoundry/ml/autogen/client/models/add_custom_metrics_to_model_version_request_dto.py +69 -0
- truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py +83 -0
- truefoundry/ml/autogen/client/models/agent.py +125 -0
- truefoundry/ml/autogen/client/models/agent_app.py +118 -0
- truefoundry/ml/autogen/client/models/agent_open_api_tool.py +143 -0
- truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +144 -0
- truefoundry/ml/autogen/client/models/agent_with_fqn.py +127 -0
- truefoundry/ml/autogen/client/models/artifact_dto.py +115 -0
- truefoundry/ml/autogen/client/models/artifact_response_dto.py +75 -0
- truefoundry/ml/autogen/client/models/artifact_type.py +39 -0
- truefoundry/ml/autogen/client/models/artifact_version_dto.py +141 -0
- truefoundry/ml/autogen/client/models/artifact_version_response_dto.py +77 -0
- truefoundry/ml/autogen/client/models/artifact_version_status.py +35 -0
- truefoundry/ml/autogen/client/models/assistant_message.py +89 -0
- truefoundry/ml/autogen/client/models/authorize_user_for_model_request_dto.py +69 -0
- truefoundry/ml/autogen/client/models/authorize_user_for_model_version_request_dto.py +69 -0
- truefoundry/ml/autogen/client/models/blob_storage_reference.py +93 -0
- truefoundry/ml/autogen/client/models/body_get_search_runs_get.py +72 -0
- truefoundry/ml/autogen/client/models/chat_prompt.py +156 -0
- truefoundry/ml/autogen/client/models/chat_prompt_messages_inner.py +171 -0
- truefoundry/ml/autogen/client/models/columns_dto.py +73 -0
- truefoundry/ml/autogen/client/models/content.py +153 -0
- truefoundry/ml/autogen/client/models/content1.py +153 -0
- truefoundry/ml/autogen/client/models/content2.py +174 -0
- truefoundry/ml/autogen/client/models/content2_any_of_inner.py +150 -0
- truefoundry/ml/autogen/client/models/create_artifact_request_dto.py +74 -0
- truefoundry/ml/autogen/client/models/create_artifact_response_dto.py +65 -0
- truefoundry/ml/autogen/client/models/create_artifact_version_request_dto.py +74 -0
- truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +65 -0
- truefoundry/ml/autogen/client/models/create_dataset_request_dto.py +76 -0
- truefoundry/ml/autogen/client/models/create_experiment_request_dto.py +94 -0
- truefoundry/ml/autogen/client/models/create_experiment_response_dto.py +67 -0
- truefoundry/ml/autogen/client/models/create_model_version_request_dto.py +95 -0
- truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_request_dto.py +73 -0
- truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_response_dto.py +79 -0
- truefoundry/ml/autogen/client/models/create_multi_part_upload_request_dto.py +73 -0
- truefoundry/ml/autogen/client/models/create_python_deployment_config_request_dto.py +72 -0
- truefoundry/ml/autogen/client/models/create_python_deployment_config_response_dto.py +67 -0
- truefoundry/ml/autogen/client/models/create_run_request_dto.py +97 -0
- truefoundry/ml/autogen/client/models/create_run_response_dto.py +75 -0
- truefoundry/ml/autogen/client/models/dataset_dto.py +112 -0
- truefoundry/ml/autogen/client/models/dataset_response_dto.py +75 -0
- truefoundry/ml/autogen/client/models/delete_artifact_versions_request_dto.py +65 -0
- truefoundry/ml/autogen/client/models/delete_dataset_request_dto.py +74 -0
- truefoundry/ml/autogen/client/models/delete_model_version_request_dto.py +65 -0
- truefoundry/ml/autogen/client/models/delete_run_request.py +65 -0
- truefoundry/ml/autogen/client/models/delete_tag_request_dto.py +68 -0
- truefoundry/ml/autogen/client/models/experiment_dto.py +127 -0
- truefoundry/ml/autogen/client/models/experiment_id_request_dto.py +67 -0
- truefoundry/ml/autogen/client/models/experiment_response_dto.py +75 -0
- truefoundry/ml/autogen/client/models/experiment_tag_dto.py +69 -0
- truefoundry/ml/autogen/client/models/feature_dto.py +68 -0
- truefoundry/ml/autogen/client/models/feature_value_type.py +35 -0
- truefoundry/ml/autogen/client/models/file_info_dto.py +76 -0
- truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +101 -0
- truefoundry/ml/autogen/client/models/get_experiment_response_dto.py +88 -0
- truefoundry/ml/autogen/client/models/get_latest_run_log_response_dto.py +75 -0
- truefoundry/ml/autogen/client/models/get_metric_history_response.py +79 -0
- truefoundry/ml/autogen/client/models/get_signed_url_for_dataset_write_request_dto.py +68 -0
- truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +68 -0
- truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +81 -0
- truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +69 -0
- truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +83 -0
- truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_request_dto.py +68 -0
- truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_response_dto.py +81 -0
- truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_write_response_dto.py +81 -0
- truefoundry/ml/autogen/client/models/get_tenant_id_response_dto.py +73 -0
- truefoundry/ml/autogen/client/models/http_validation_error.py +82 -0
- truefoundry/ml/autogen/client/models/image_content_part.py +87 -0
- truefoundry/ml/autogen/client/models/image_url.py +75 -0
- truefoundry/ml/autogen/client/models/internal_metadata.py +180 -0
- truefoundry/ml/autogen/client/models/latest_run_log_dto.py +78 -0
- truefoundry/ml/autogen/client/models/list_artifact_versions_request_dto.py +107 -0
- truefoundry/ml/autogen/client/models/list_artifact_versions_response_dto.py +87 -0
- truefoundry/ml/autogen/client/models/list_artifacts_request_dto.py +96 -0
- truefoundry/ml/autogen/client/models/list_artifacts_response_dto.py +86 -0
- truefoundry/ml/autogen/client/models/list_colums_response_dto.py +75 -0
- truefoundry/ml/autogen/client/models/list_datasets_request_dto.py +78 -0
- truefoundry/ml/autogen/client/models/list_datasets_response_dto.py +86 -0
- truefoundry/ml/autogen/client/models/list_experiments_response_dto.py +86 -0
- truefoundry/ml/autogen/client/models/list_files_for_artifact_version_request_dto.py +76 -0
- truefoundry/ml/autogen/client/models/list_files_for_artifact_versions_response_dto.py +82 -0
- truefoundry/ml/autogen/client/models/list_files_for_dataset_request_dto.py +76 -0
- truefoundry/ml/autogen/client/models/list_files_for_dataset_response_dto.py +82 -0
- truefoundry/ml/autogen/client/models/list_latest_run_logs_response_dto.py +82 -0
- truefoundry/ml/autogen/client/models/list_metric_history_request_dto.py +69 -0
- truefoundry/ml/autogen/client/models/list_metric_history_response_dto.py +84 -0
- truefoundry/ml/autogen/client/models/list_model_version_response_dto.py +87 -0
- truefoundry/ml/autogen/client/models/list_model_versions_request_dto.py +93 -0
- truefoundry/ml/autogen/client/models/list_models_request_dto.py +89 -0
- truefoundry/ml/autogen/client/models/list_models_response_dto.py +84 -0
- truefoundry/ml/autogen/client/models/list_run_artifacts_response_dto.py +84 -0
- truefoundry/ml/autogen/client/models/list_run_logs_response_dto.py +82 -0
- truefoundry/ml/autogen/client/models/list_seed_experiments_response_dto.py +81 -0
- truefoundry/ml/autogen/client/models/log_batch_request_dto.py +106 -0
- truefoundry/ml/autogen/client/models/log_metric_request_dto.py +80 -0
- truefoundry/ml/autogen/client/models/log_param_request_dto.py +76 -0
- truefoundry/ml/autogen/client/models/method.py +37 -0
- truefoundry/ml/autogen/client/models/metric_collection_dto.py +82 -0
- truefoundry/ml/autogen/client/models/metric_dto.py +76 -0
- truefoundry/ml/autogen/client/models/mime_type.py +37 -0
- truefoundry/ml/autogen/client/models/model_configuration.py +103 -0
- truefoundry/ml/autogen/client/models/model_dto.py +122 -0
- truefoundry/ml/autogen/client/models/model_response_dto.py +75 -0
- truefoundry/ml/autogen/client/models/model_schema_dto.py +85 -0
- truefoundry/ml/autogen/client/models/model_version_dto.py +170 -0
- truefoundry/ml/autogen/client/models/model_version_response_dto.py +75 -0
- truefoundry/ml/autogen/client/models/multi_part_upload_dto.py +107 -0
- truefoundry/ml/autogen/client/models/multi_part_upload_response_dto.py +79 -0
- truefoundry/ml/autogen/client/models/multi_part_upload_storage_provider.py +34 -0
- truefoundry/ml/autogen/client/models/notify_artifact_version_failure_dto.py +65 -0
- truefoundry/ml/autogen/client/models/openapi_spec.py +152 -0
- truefoundry/ml/autogen/client/models/param_dto.py +66 -0
- truefoundry/ml/autogen/client/models/parameters.py +84 -0
- truefoundry/ml/autogen/client/models/prediction_type.py +34 -0
- truefoundry/ml/autogen/client/models/resolve_agent_app_response_dto.py +75 -0
- truefoundry/ml/autogen/client/models/restore_run_request_dto.py +65 -0
- truefoundry/ml/autogen/client/models/run_data_dto.py +104 -0
- truefoundry/ml/autogen/client/models/run_dto.py +84 -0
- truefoundry/ml/autogen/client/models/run_info_dto.py +105 -0
- truefoundry/ml/autogen/client/models/run_log_dto.py +90 -0
- truefoundry/ml/autogen/client/models/run_log_input_dto.py +80 -0
- truefoundry/ml/autogen/client/models/run_response_dto.py +75 -0
- truefoundry/ml/autogen/client/models/run_tag_dto.py +66 -0
- truefoundry/ml/autogen/client/models/search_runs_request_dto.py +94 -0
- truefoundry/ml/autogen/client/models/search_runs_response_dto.py +84 -0
- truefoundry/ml/autogen/client/models/set_experiment_tag_request_dto.py +73 -0
- truefoundry/ml/autogen/client/models/set_tag_request_dto.py +76 -0
- truefoundry/ml/autogen/client/models/signed_url_dto.py +69 -0
- truefoundry/ml/autogen/client/models/stop.py +152 -0
- truefoundry/ml/autogen/client/models/store_run_logs_request_dto.py +83 -0
- truefoundry/ml/autogen/client/models/system_message.py +89 -0
- truefoundry/ml/autogen/client/models/text.py +153 -0
- truefoundry/ml/autogen/client/models/text_content_part.py +84 -0
- truefoundry/ml/autogen/client/models/update_artifact_version_request_dto.py +74 -0
- truefoundry/ml/autogen/client/models/update_dataset_request_dto.py +74 -0
- truefoundry/ml/autogen/client/models/update_experiment_request_dto.py +74 -0
- truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +93 -0
- truefoundry/ml/autogen/client/models/update_run_request_dto.py +78 -0
- truefoundry/ml/autogen/client/models/update_run_response_dto.py +75 -0
- truefoundry/ml/autogen/client/models/url.py +153 -0
- truefoundry/ml/autogen/client/models/user_message.py +89 -0
- truefoundry/ml/autogen/client/models/validation_error.py +87 -0
- truefoundry/ml/autogen/client/models/validation_error_loc_inner.py +154 -0
- truefoundry/ml/autogen/client/rest.py +426 -0
- truefoundry/ml/autogen/client_README.md +320 -0
- truefoundry/ml/cli/__init__.py +0 -0
- truefoundry/ml/cli/cli.py +18 -0
- truefoundry/ml/cli/commands/__init__.py +3 -0
- truefoundry/ml/cli/commands/download.py +87 -0
- truefoundry/ml/clients/__init__.py +0 -0
- truefoundry/ml/clients/entities.py +8 -0
- truefoundry/ml/clients/servicefoundry_client.py +45 -0
- truefoundry/ml/clients/utils.py +122 -0
- truefoundry/ml/constants.py +84 -0
- truefoundry/ml/entities.py +62 -0
- truefoundry/ml/enums.py +70 -0
- truefoundry/ml/env_vars.py +9 -0
- truefoundry/ml/exceptions.py +8 -0
- truefoundry/ml/git_info.py +60 -0
- truefoundry/ml/internal_namespace.py +52 -0
- truefoundry/ml/log_types/__init__.py +4 -0
- truefoundry/ml/log_types/artifacts/artifact.py +431 -0
- truefoundry/ml/log_types/artifacts/constants.py +33 -0
- truefoundry/ml/log_types/artifacts/dataset.py +384 -0
- truefoundry/ml/log_types/artifacts/general_artifact.py +110 -0
- truefoundry/ml/log_types/artifacts/model.py +611 -0
- truefoundry/ml/log_types/artifacts/model_extras.py +48 -0
- truefoundry/ml/log_types/artifacts/utils.py +161 -0
- truefoundry/ml/log_types/image/__init__.py +3 -0
- truefoundry/ml/log_types/image/constants.py +8 -0
- truefoundry/ml/log_types/image/image.py +357 -0
- truefoundry/ml/log_types/image/image_normalizer.py +102 -0
- truefoundry/ml/log_types/image/types.py +68 -0
- truefoundry/ml/log_types/plot.py +281 -0
- truefoundry/ml/log_types/pydantic_base.py +10 -0
- truefoundry/ml/log_types/utils.py +12 -0
- truefoundry/ml/logger.py +17 -0
- truefoundry/ml/mlfoundry_api.py +1575 -0
- truefoundry/ml/mlfoundry_run.py +1203 -0
- truefoundry/ml/run_utils.py +93 -0
- truefoundry/ml/session.py +168 -0
- truefoundry/ml/validation_utils.py +346 -0
- truefoundry/pydantic_v1.py +8 -1
- truefoundry/workflow/__init__.py +16 -1
- {truefoundry-0.3.4rc1.dist-info → truefoundry-0.4.0.dist-info}/METADATA +21 -14
- truefoundry-0.4.0.dist-info/RECORD +344 -0
- truefoundry/deploy/lib/clients/utils.py +0 -41
- truefoundry-0.3.4rc1.dist-info/RECORD +0 -136
- {truefoundry-0.3.4rc1.dist-info → truefoundry-0.4.0.dist-info}/WHEEL +0 -0
- {truefoundry-0.3.4rc1.dist-info → truefoundry-0.4.0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
"""
|
|
5
|
+
FastAPI
|
|
6
|
+
|
|
7
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
8
|
+
|
|
9
|
+
The version of the OpenAPI document: 0.1.0
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
# import models into model package
|
|
16
|
+
from truefoundry.ml.autogen.client.models.add_custom_metrics_to_model_version_request_dto import (
|
|
17
|
+
AddCustomMetricsToModelVersionRequestDto,
|
|
18
|
+
)
|
|
19
|
+
from truefoundry.ml.autogen.client.models.add_features_to_model_version_request_dto import (
|
|
20
|
+
AddFeaturesToModelVersionRequestDto,
|
|
21
|
+
)
|
|
22
|
+
from truefoundry.ml.autogen.client.models.agent import Agent
|
|
23
|
+
from truefoundry.ml.autogen.client.models.agent_app import AgentApp
|
|
24
|
+
from truefoundry.ml.autogen.client.models.agent_open_api_tool import AgentOpenAPITool
|
|
25
|
+
from truefoundry.ml.autogen.client.models.agent_open_api_tool_with_fqn import (
|
|
26
|
+
AgentOpenAPIToolWithFQN,
|
|
27
|
+
)
|
|
28
|
+
from truefoundry.ml.autogen.client.models.agent_with_fqn import AgentWithFQN
|
|
29
|
+
from truefoundry.ml.autogen.client.models.artifact_dto import ArtifactDto
|
|
30
|
+
from truefoundry.ml.autogen.client.models.artifact_response_dto import (
|
|
31
|
+
ArtifactResponseDto,
|
|
32
|
+
)
|
|
33
|
+
from truefoundry.ml.autogen.client.models.artifact_type import ArtifactType
|
|
34
|
+
from truefoundry.ml.autogen.client.models.artifact_version_dto import ArtifactVersionDto
|
|
35
|
+
from truefoundry.ml.autogen.client.models.artifact_version_response_dto import (
|
|
36
|
+
ArtifactVersionResponseDto,
|
|
37
|
+
)
|
|
38
|
+
from truefoundry.ml.autogen.client.models.artifact_version_status import (
|
|
39
|
+
ArtifactVersionStatus,
|
|
40
|
+
)
|
|
41
|
+
from truefoundry.ml.autogen.client.models.assistant_message import AssistantMessage
|
|
42
|
+
from truefoundry.ml.autogen.client.models.authorize_user_for_model_request_dto import (
|
|
43
|
+
AuthorizeUserForModelRequestDto,
|
|
44
|
+
)
|
|
45
|
+
from truefoundry.ml.autogen.client.models.authorize_user_for_model_version_request_dto import (
|
|
46
|
+
AuthorizeUserForModelVersionRequestDto,
|
|
47
|
+
)
|
|
48
|
+
from truefoundry.ml.autogen.client.models.blob_storage_reference import (
|
|
49
|
+
BlobStorageReference,
|
|
50
|
+
)
|
|
51
|
+
from truefoundry.ml.autogen.client.models.body_get_search_runs_get import (
|
|
52
|
+
BodyGetSearchRunsGet,
|
|
53
|
+
)
|
|
54
|
+
from truefoundry.ml.autogen.client.models.chat_prompt import ChatPrompt
|
|
55
|
+
from truefoundry.ml.autogen.client.models.chat_prompt_messages_inner import (
|
|
56
|
+
ChatPromptMessagesInner,
|
|
57
|
+
)
|
|
58
|
+
from truefoundry.ml.autogen.client.models.columns_dto import ColumnsDto
|
|
59
|
+
from truefoundry.ml.autogen.client.models.content import Content
|
|
60
|
+
from truefoundry.ml.autogen.client.models.content1 import Content1
|
|
61
|
+
from truefoundry.ml.autogen.client.models.content2 import Content2
|
|
62
|
+
from truefoundry.ml.autogen.client.models.content2_any_of_inner import (
|
|
63
|
+
Content2AnyOfInner,
|
|
64
|
+
)
|
|
65
|
+
from truefoundry.ml.autogen.client.models.create_artifact_request_dto import (
|
|
66
|
+
CreateArtifactRequestDto,
|
|
67
|
+
)
|
|
68
|
+
from truefoundry.ml.autogen.client.models.create_artifact_response_dto import (
|
|
69
|
+
CreateArtifactResponseDto,
|
|
70
|
+
)
|
|
71
|
+
from truefoundry.ml.autogen.client.models.create_artifact_version_request_dto import (
|
|
72
|
+
CreateArtifactVersionRequestDto,
|
|
73
|
+
)
|
|
74
|
+
from truefoundry.ml.autogen.client.models.create_artifact_version_response_dto import (
|
|
75
|
+
CreateArtifactVersionResponseDto,
|
|
76
|
+
)
|
|
77
|
+
from truefoundry.ml.autogen.client.models.create_dataset_request_dto import (
|
|
78
|
+
CreateDatasetRequestDto,
|
|
79
|
+
)
|
|
80
|
+
from truefoundry.ml.autogen.client.models.create_experiment_request_dto import (
|
|
81
|
+
CreateExperimentRequestDto,
|
|
82
|
+
)
|
|
83
|
+
from truefoundry.ml.autogen.client.models.create_experiment_response_dto import (
|
|
84
|
+
CreateExperimentResponseDto,
|
|
85
|
+
)
|
|
86
|
+
from truefoundry.ml.autogen.client.models.create_model_version_request_dto import (
|
|
87
|
+
CreateModelVersionRequestDto,
|
|
88
|
+
)
|
|
89
|
+
from truefoundry.ml.autogen.client.models.create_multi_part_upload_for_dataset_request_dto import (
|
|
90
|
+
CreateMultiPartUploadForDatasetRequestDto,
|
|
91
|
+
)
|
|
92
|
+
from truefoundry.ml.autogen.client.models.create_multi_part_upload_for_dataset_response_dto import (
|
|
93
|
+
CreateMultiPartUploadForDatasetResponseDto,
|
|
94
|
+
)
|
|
95
|
+
from truefoundry.ml.autogen.client.models.create_multi_part_upload_request_dto import (
|
|
96
|
+
CreateMultiPartUploadRequestDto,
|
|
97
|
+
)
|
|
98
|
+
from truefoundry.ml.autogen.client.models.create_python_deployment_config_request_dto import (
|
|
99
|
+
CreatePythonDeploymentConfigRequestDto,
|
|
100
|
+
)
|
|
101
|
+
from truefoundry.ml.autogen.client.models.create_python_deployment_config_response_dto import (
|
|
102
|
+
CreatePythonDeploymentConfigResponseDto,
|
|
103
|
+
)
|
|
104
|
+
from truefoundry.ml.autogen.client.models.create_run_request_dto import (
|
|
105
|
+
CreateRunRequestDto,
|
|
106
|
+
)
|
|
107
|
+
from truefoundry.ml.autogen.client.models.create_run_response_dto import (
|
|
108
|
+
CreateRunResponseDto,
|
|
109
|
+
)
|
|
110
|
+
from truefoundry.ml.autogen.client.models.dataset_dto import DatasetDto
|
|
111
|
+
from truefoundry.ml.autogen.client.models.dataset_response_dto import DatasetResponseDto
|
|
112
|
+
from truefoundry.ml.autogen.client.models.delete_artifact_versions_request_dto import (
|
|
113
|
+
DeleteArtifactVersionsRequestDto,
|
|
114
|
+
)
|
|
115
|
+
from truefoundry.ml.autogen.client.models.delete_dataset_request_dto import (
|
|
116
|
+
DeleteDatasetRequestDto,
|
|
117
|
+
)
|
|
118
|
+
from truefoundry.ml.autogen.client.models.delete_model_version_request_dto import (
|
|
119
|
+
DeleteModelVersionRequestDto,
|
|
120
|
+
)
|
|
121
|
+
from truefoundry.ml.autogen.client.models.delete_run_request import DeleteRunRequest
|
|
122
|
+
from truefoundry.ml.autogen.client.models.delete_tag_request_dto import (
|
|
123
|
+
DeleteTagRequestDto,
|
|
124
|
+
)
|
|
125
|
+
from truefoundry.ml.autogen.client.models.experiment_dto import ExperimentDto
|
|
126
|
+
from truefoundry.ml.autogen.client.models.experiment_id_request_dto import (
|
|
127
|
+
ExperimentIdRequestDto,
|
|
128
|
+
)
|
|
129
|
+
from truefoundry.ml.autogen.client.models.experiment_response_dto import (
|
|
130
|
+
ExperimentResponseDto,
|
|
131
|
+
)
|
|
132
|
+
from truefoundry.ml.autogen.client.models.experiment_tag_dto import ExperimentTagDto
|
|
133
|
+
from truefoundry.ml.autogen.client.models.feature_dto import FeatureDto
|
|
134
|
+
from truefoundry.ml.autogen.client.models.feature_value_type import FeatureValueType
|
|
135
|
+
from truefoundry.ml.autogen.client.models.file_info_dto import FileInfoDto
|
|
136
|
+
from truefoundry.ml.autogen.client.models.finalize_artifact_version_request_dto import (
|
|
137
|
+
FinalizeArtifactVersionRequestDto,
|
|
138
|
+
)
|
|
139
|
+
from truefoundry.ml.autogen.client.models.get_experiment_response_dto import (
|
|
140
|
+
GetExperimentResponseDto,
|
|
141
|
+
)
|
|
142
|
+
from truefoundry.ml.autogen.client.models.get_latest_run_log_response_dto import (
|
|
143
|
+
GetLatestRunLogResponseDto,
|
|
144
|
+
)
|
|
145
|
+
from truefoundry.ml.autogen.client.models.get_metric_history_response import (
|
|
146
|
+
GetMetricHistoryResponse,
|
|
147
|
+
)
|
|
148
|
+
from truefoundry.ml.autogen.client.models.get_signed_url_for_dataset_write_request_dto import (
|
|
149
|
+
GetSignedURLForDatasetWriteRequestDto,
|
|
150
|
+
)
|
|
151
|
+
from truefoundry.ml.autogen.client.models.get_signed_urls_for_artifact_version_read_request_dto import (
|
|
152
|
+
GetSignedURLsForArtifactVersionReadRequestDto,
|
|
153
|
+
)
|
|
154
|
+
from truefoundry.ml.autogen.client.models.get_signed_urls_for_artifact_version_read_response_dto import (
|
|
155
|
+
GetSignedURLsForArtifactVersionReadResponseDto,
|
|
156
|
+
)
|
|
157
|
+
from truefoundry.ml.autogen.client.models.get_signed_urls_for_artifact_version_write_request_dto import (
|
|
158
|
+
GetSignedURLsForArtifactVersionWriteRequestDto,
|
|
159
|
+
)
|
|
160
|
+
from truefoundry.ml.autogen.client.models.get_signed_urls_for_artifact_version_write_response_dto import (
|
|
161
|
+
GetSignedURLsForArtifactVersionWriteResponseDto,
|
|
162
|
+
)
|
|
163
|
+
from truefoundry.ml.autogen.client.models.get_signed_urls_for_dataset_read_request_dto import (
|
|
164
|
+
GetSignedURLsForDatasetReadRequestDto,
|
|
165
|
+
)
|
|
166
|
+
from truefoundry.ml.autogen.client.models.get_signed_urls_for_dataset_read_response_dto import (
|
|
167
|
+
GetSignedURLsForDatasetReadResponseDto,
|
|
168
|
+
)
|
|
169
|
+
from truefoundry.ml.autogen.client.models.get_signed_urls_for_dataset_write_response_dto import (
|
|
170
|
+
GetSignedURLsForDatasetWriteResponseDto,
|
|
171
|
+
)
|
|
172
|
+
from truefoundry.ml.autogen.client.models.get_tenant_id_response_dto import (
|
|
173
|
+
GetTenantIdResponseDto,
|
|
174
|
+
)
|
|
175
|
+
from truefoundry.ml.autogen.client.models.http_validation_error import (
|
|
176
|
+
HTTPValidationError,
|
|
177
|
+
)
|
|
178
|
+
from truefoundry.ml.autogen.client.models.image_content_part import ImageContentPart
|
|
179
|
+
from truefoundry.ml.autogen.client.models.image_url import ImageUrl
|
|
180
|
+
from truefoundry.ml.autogen.client.models.internal_metadata import InternalMetadata
|
|
181
|
+
from truefoundry.ml.autogen.client.models.latest_run_log_dto import LatestRunLogDto
|
|
182
|
+
from truefoundry.ml.autogen.client.models.list_artifact_versions_request_dto import (
|
|
183
|
+
ListArtifactVersionsRequestDto,
|
|
184
|
+
)
|
|
185
|
+
from truefoundry.ml.autogen.client.models.list_artifact_versions_response_dto import (
|
|
186
|
+
ListArtifactVersionsResponseDto,
|
|
187
|
+
)
|
|
188
|
+
from truefoundry.ml.autogen.client.models.list_artifacts_request_dto import (
|
|
189
|
+
ListArtifactsRequestDto,
|
|
190
|
+
)
|
|
191
|
+
from truefoundry.ml.autogen.client.models.list_artifacts_response_dto import (
|
|
192
|
+
ListArtifactsResponseDto,
|
|
193
|
+
)
|
|
194
|
+
from truefoundry.ml.autogen.client.models.list_colums_response_dto import (
|
|
195
|
+
ListColumsResponseDto,
|
|
196
|
+
)
|
|
197
|
+
from truefoundry.ml.autogen.client.models.list_datasets_request_dto import (
|
|
198
|
+
ListDatasetsRequestDto,
|
|
199
|
+
)
|
|
200
|
+
from truefoundry.ml.autogen.client.models.list_datasets_response_dto import (
|
|
201
|
+
ListDatasetsResponseDto,
|
|
202
|
+
)
|
|
203
|
+
from truefoundry.ml.autogen.client.models.list_experiments_response_dto import (
|
|
204
|
+
ListExperimentsResponseDto,
|
|
205
|
+
)
|
|
206
|
+
from truefoundry.ml.autogen.client.models.list_files_for_artifact_version_request_dto import (
|
|
207
|
+
ListFilesForArtifactVersionRequestDto,
|
|
208
|
+
)
|
|
209
|
+
from truefoundry.ml.autogen.client.models.list_files_for_artifact_versions_response_dto import (
|
|
210
|
+
ListFilesForArtifactVersionsResponseDto,
|
|
211
|
+
)
|
|
212
|
+
from truefoundry.ml.autogen.client.models.list_files_for_dataset_request_dto import (
|
|
213
|
+
ListFilesForDatasetRequestDto,
|
|
214
|
+
)
|
|
215
|
+
from truefoundry.ml.autogen.client.models.list_files_for_dataset_response_dto import (
|
|
216
|
+
ListFilesForDatasetResponseDto,
|
|
217
|
+
)
|
|
218
|
+
from truefoundry.ml.autogen.client.models.list_latest_run_logs_response_dto import (
|
|
219
|
+
ListLatestRunLogsResponseDto,
|
|
220
|
+
)
|
|
221
|
+
from truefoundry.ml.autogen.client.models.list_metric_history_request_dto import (
|
|
222
|
+
ListMetricHistoryRequestDto,
|
|
223
|
+
)
|
|
224
|
+
from truefoundry.ml.autogen.client.models.list_metric_history_response_dto import (
|
|
225
|
+
ListMetricHistoryResponseDto,
|
|
226
|
+
)
|
|
227
|
+
from truefoundry.ml.autogen.client.models.list_model_version_response_dto import (
|
|
228
|
+
ListModelVersionResponseDto,
|
|
229
|
+
)
|
|
230
|
+
from truefoundry.ml.autogen.client.models.list_model_versions_request_dto import (
|
|
231
|
+
ListModelVersionsRequestDto,
|
|
232
|
+
)
|
|
233
|
+
from truefoundry.ml.autogen.client.models.list_models_request_dto import (
|
|
234
|
+
ListModelsRequestDto,
|
|
235
|
+
)
|
|
236
|
+
from truefoundry.ml.autogen.client.models.list_models_response_dto import (
|
|
237
|
+
ListModelsResponseDto,
|
|
238
|
+
)
|
|
239
|
+
from truefoundry.ml.autogen.client.models.list_run_artifacts_response_dto import (
|
|
240
|
+
ListRunArtifactsResponseDto,
|
|
241
|
+
)
|
|
242
|
+
from truefoundry.ml.autogen.client.models.list_run_logs_response_dto import (
|
|
243
|
+
ListRunLogsResponseDto,
|
|
244
|
+
)
|
|
245
|
+
from truefoundry.ml.autogen.client.models.list_seed_experiments_response_dto import (
|
|
246
|
+
ListSeedExperimentsResponseDto,
|
|
247
|
+
)
|
|
248
|
+
from truefoundry.ml.autogen.client.models.log_batch_request_dto import (
|
|
249
|
+
LogBatchRequestDto,
|
|
250
|
+
)
|
|
251
|
+
from truefoundry.ml.autogen.client.models.log_metric_request_dto import (
|
|
252
|
+
LogMetricRequestDto,
|
|
253
|
+
)
|
|
254
|
+
from truefoundry.ml.autogen.client.models.log_param_request_dto import (
|
|
255
|
+
LogParamRequestDto,
|
|
256
|
+
)
|
|
257
|
+
from truefoundry.ml.autogen.client.models.method import Method
|
|
258
|
+
from truefoundry.ml.autogen.client.models.metric_collection_dto import (
|
|
259
|
+
MetricCollectionDto,
|
|
260
|
+
)
|
|
261
|
+
from truefoundry.ml.autogen.client.models.metric_dto import MetricDto
|
|
262
|
+
from truefoundry.ml.autogen.client.models.mime_type import MimeType
|
|
263
|
+
from truefoundry.ml.autogen.client.models.model_configuration import ModelConfiguration
|
|
264
|
+
from truefoundry.ml.autogen.client.models.model_dto import ModelDto
|
|
265
|
+
from truefoundry.ml.autogen.client.models.model_response_dto import ModelResponseDto
|
|
266
|
+
from truefoundry.ml.autogen.client.models.model_schema_dto import ModelSchemaDto
|
|
267
|
+
from truefoundry.ml.autogen.client.models.model_version_dto import ModelVersionDto
|
|
268
|
+
from truefoundry.ml.autogen.client.models.model_version_response_dto import (
|
|
269
|
+
ModelVersionResponseDto,
|
|
270
|
+
)
|
|
271
|
+
from truefoundry.ml.autogen.client.models.multi_part_upload_dto import (
|
|
272
|
+
MultiPartUploadDto,
|
|
273
|
+
)
|
|
274
|
+
from truefoundry.ml.autogen.client.models.multi_part_upload_response_dto import (
|
|
275
|
+
MultiPartUploadResponseDto,
|
|
276
|
+
)
|
|
277
|
+
from truefoundry.ml.autogen.client.models.multi_part_upload_storage_provider import (
|
|
278
|
+
MultiPartUploadStorageProvider,
|
|
279
|
+
)
|
|
280
|
+
from truefoundry.ml.autogen.client.models.notify_artifact_version_failure_dto import (
|
|
281
|
+
NotifyArtifactVersionFailureDto,
|
|
282
|
+
)
|
|
283
|
+
from truefoundry.ml.autogen.client.models.openapi_spec import OpenapiSpec
|
|
284
|
+
from truefoundry.ml.autogen.client.models.param_dto import ParamDto
|
|
285
|
+
from truefoundry.ml.autogen.client.models.parameters import Parameters
|
|
286
|
+
from truefoundry.ml.autogen.client.models.prediction_type import PredictionType
|
|
287
|
+
from truefoundry.ml.autogen.client.models.resolve_agent_app_response_dto import (
|
|
288
|
+
ResolveAgentAppResponseDto,
|
|
289
|
+
)
|
|
290
|
+
from truefoundry.ml.autogen.client.models.restore_run_request_dto import (
|
|
291
|
+
RestoreRunRequestDto,
|
|
292
|
+
)
|
|
293
|
+
from truefoundry.ml.autogen.client.models.run_data_dto import RunDataDto
|
|
294
|
+
from truefoundry.ml.autogen.client.models.run_dto import RunDto
|
|
295
|
+
from truefoundry.ml.autogen.client.models.run_info_dto import RunInfoDto
|
|
296
|
+
from truefoundry.ml.autogen.client.models.run_log_dto import RunLogDto
|
|
297
|
+
from truefoundry.ml.autogen.client.models.run_log_input_dto import RunLogInputDto
|
|
298
|
+
from truefoundry.ml.autogen.client.models.run_response_dto import RunResponseDto
|
|
299
|
+
from truefoundry.ml.autogen.client.models.run_tag_dto import RunTagDto
|
|
300
|
+
from truefoundry.ml.autogen.client.models.search_runs_request_dto import (
|
|
301
|
+
SearchRunsRequestDto,
|
|
302
|
+
)
|
|
303
|
+
from truefoundry.ml.autogen.client.models.search_runs_response_dto import (
|
|
304
|
+
SearchRunsResponseDto,
|
|
305
|
+
)
|
|
306
|
+
from truefoundry.ml.autogen.client.models.set_experiment_tag_request_dto import (
|
|
307
|
+
SetExperimentTagRequestDto,
|
|
308
|
+
)
|
|
309
|
+
from truefoundry.ml.autogen.client.models.set_tag_request_dto import SetTagRequestDto
|
|
310
|
+
from truefoundry.ml.autogen.client.models.signed_url_dto import SignedURLDto
|
|
311
|
+
from truefoundry.ml.autogen.client.models.stop import Stop
|
|
312
|
+
from truefoundry.ml.autogen.client.models.store_run_logs_request_dto import (
|
|
313
|
+
StoreRunLogsRequestDto,
|
|
314
|
+
)
|
|
315
|
+
from truefoundry.ml.autogen.client.models.system_message import SystemMessage
|
|
316
|
+
from truefoundry.ml.autogen.client.models.text import Text
|
|
317
|
+
from truefoundry.ml.autogen.client.models.text_content_part import TextContentPart
|
|
318
|
+
from truefoundry.ml.autogen.client.models.update_artifact_version_request_dto import (
|
|
319
|
+
UpdateArtifactVersionRequestDto,
|
|
320
|
+
)
|
|
321
|
+
from truefoundry.ml.autogen.client.models.update_dataset_request_dto import (
|
|
322
|
+
UpdateDatasetRequestDto,
|
|
323
|
+
)
|
|
324
|
+
from truefoundry.ml.autogen.client.models.update_experiment_request_dto import (
|
|
325
|
+
UpdateExperimentRequestDto,
|
|
326
|
+
)
|
|
327
|
+
from truefoundry.ml.autogen.client.models.update_model_version_request_dto import (
|
|
328
|
+
UpdateModelVersionRequestDto,
|
|
329
|
+
)
|
|
330
|
+
from truefoundry.ml.autogen.client.models.update_run_request_dto import (
|
|
331
|
+
UpdateRunRequestDto,
|
|
332
|
+
)
|
|
333
|
+
from truefoundry.ml.autogen.client.models.update_run_response_dto import (
|
|
334
|
+
UpdateRunResponseDto,
|
|
335
|
+
)
|
|
336
|
+
from truefoundry.ml.autogen.client.models.url import Url
|
|
337
|
+
from truefoundry.ml.autogen.client.models.user_message import UserMessage
|
|
338
|
+
from truefoundry.ml.autogen.client.models.validation_error import ValidationError
|
|
339
|
+
from truefoundry.ml.autogen.client.models.validation_error_loc_inner import (
|
|
340
|
+
ValidationErrorLocInner,
|
|
341
|
+
)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FastAPI
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
from typing import Any, Dict, Optional
|
|
20
|
+
|
|
21
|
+
from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, conlist
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class AddCustomMetricsToModelVersionRequestDto(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
AddCustomMetricsToModelVersionRequestDto
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
id: StrictStr = Field(...)
|
|
30
|
+
custom_metrics: Optional[conlist(Dict[str, Any])] = None
|
|
31
|
+
__properties = ["id", "custom_metrics"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
|
|
36
|
+
allow_population_by_field_name = True
|
|
37
|
+
validate_assignment = True
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
return json.dumps(self.to_dict())
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_json(cls, json_str: str) -> AddCustomMetricsToModelVersionRequestDto:
|
|
49
|
+
"""Create an instance of AddCustomMetricsToModelVersionRequestDto from a JSON string"""
|
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
|
51
|
+
|
|
52
|
+
def to_dict(self):
|
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
54
|
+
_dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
|
|
55
|
+
return _dict
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls, obj: dict) -> AddCustomMetricsToModelVersionRequestDto:
|
|
59
|
+
"""Create an instance of AddCustomMetricsToModelVersionRequestDto from a dict"""
|
|
60
|
+
if obj is None:
|
|
61
|
+
return None
|
|
62
|
+
|
|
63
|
+
if not isinstance(obj, dict):
|
|
64
|
+
return AddCustomMetricsToModelVersionRequestDto.parse_obj(obj)
|
|
65
|
+
|
|
66
|
+
_obj = AddCustomMetricsToModelVersionRequestDto.parse_obj(
|
|
67
|
+
{"id": obj.get("id"), "custom_metrics": obj.get("custom_metrics")}
|
|
68
|
+
)
|
|
69
|
+
return _obj
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FastAPI
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
|
|
20
|
+
from truefoundry.ml.autogen.client.models.feature_dto import FeatureDto
|
|
21
|
+
from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, conlist
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class AddFeaturesToModelVersionRequestDto(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
AddFeaturesToModelVersionRequestDto
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
id: StrictStr = Field(...)
|
|
30
|
+
features: conlist(FeatureDto) = Field(...)
|
|
31
|
+
__properties = ["id", "features"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
|
|
36
|
+
allow_population_by_field_name = True
|
|
37
|
+
validate_assignment = True
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
return json.dumps(self.to_dict())
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_json(cls, json_str: str) -> AddFeaturesToModelVersionRequestDto:
|
|
49
|
+
"""Create an instance of AddFeaturesToModelVersionRequestDto from a JSON string"""
|
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
|
51
|
+
|
|
52
|
+
def to_dict(self):
|
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
54
|
+
_dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
|
|
55
|
+
# override the default output from truefoundry.pydantic_v1 by calling `to_dict()` of each item in features (list)
|
|
56
|
+
_items = []
|
|
57
|
+
if self.features:
|
|
58
|
+
for _item in self.features:
|
|
59
|
+
if _item:
|
|
60
|
+
_items.append(_item.to_dict())
|
|
61
|
+
_dict["features"] = _items
|
|
62
|
+
return _dict
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_dict(cls, obj: dict) -> AddFeaturesToModelVersionRequestDto:
|
|
66
|
+
"""Create an instance of AddFeaturesToModelVersionRequestDto from a dict"""
|
|
67
|
+
if obj is None:
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
if not isinstance(obj, dict):
|
|
71
|
+
return AddFeaturesToModelVersionRequestDto.parse_obj(obj)
|
|
72
|
+
|
|
73
|
+
_obj = AddFeaturesToModelVersionRequestDto.parse_obj(
|
|
74
|
+
{
|
|
75
|
+
"id": obj.get("id"),
|
|
76
|
+
"features": [
|
|
77
|
+
FeatureDto.from_dict(_item) for _item in obj.get("features")
|
|
78
|
+
]
|
|
79
|
+
if obj.get("features") is not None
|
|
80
|
+
else None,
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
return _obj
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FastAPI
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
from typing import Optional
|
|
20
|
+
|
|
21
|
+
from truefoundry.pydantic_v1 import (
|
|
22
|
+
BaseModel,
|
|
23
|
+
Field,
|
|
24
|
+
StrictStr,
|
|
25
|
+
conlist,
|
|
26
|
+
constr,
|
|
27
|
+
validator,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Agent(BaseModel):
|
|
32
|
+
"""
|
|
33
|
+
Agent artifact. # noqa: E501
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
type: Optional[StrictStr] = "agent"
|
|
37
|
+
name: constr(strict=True) = Field(
|
|
38
|
+
default=..., description="Names cannot repeat accross agent +uiType=Hidden"
|
|
39
|
+
)
|
|
40
|
+
available_tools: conlist(constr(strict=True, min_length=1)) = Field(
|
|
41
|
+
default=..., description="+sort=30 +uiType=Hidden"
|
|
42
|
+
)
|
|
43
|
+
goal: constr(strict=True, max_length=128, min_length=1) = Field(
|
|
44
|
+
default=..., description="+sort=10 +uiType=TextArea"
|
|
45
|
+
)
|
|
46
|
+
instruction: constr(strict=True, max_length=2620, min_length=1) = Field(
|
|
47
|
+
default=...,
|
|
48
|
+
description='`instruction` is the system prompt for now. (2.5 * 1024) +sort=20 +uiType=AgentInstructions +uiProps={"helpText":"Use the syntax ${Tool FQN} to reference a tool, and ${AGENT FQN} to reference another agent"}',
|
|
49
|
+
)
|
|
50
|
+
model_id: constr(strict=True, min_length=1) = Field(
|
|
51
|
+
default=...,
|
|
52
|
+
description='+sort=40 +uiType=EnabledModelSelector +uiProps={"searchable":true,"modelType":"chat","providerType":"openai"}',
|
|
53
|
+
)
|
|
54
|
+
__properties = [
|
|
55
|
+
"type",
|
|
56
|
+
"name",
|
|
57
|
+
"available_tools",
|
|
58
|
+
"goal",
|
|
59
|
+
"instruction",
|
|
60
|
+
"model_id",
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
@validator("type")
|
|
64
|
+
def type_validate_enum(cls, value):
|
|
65
|
+
"""Validates the enum"""
|
|
66
|
+
if value is None:
|
|
67
|
+
return value
|
|
68
|
+
|
|
69
|
+
if value not in ("agent"):
|
|
70
|
+
raise ValueError("must be one of enum values ('agent')")
|
|
71
|
+
return value
|
|
72
|
+
|
|
73
|
+
@validator("name")
|
|
74
|
+
def name_validate_regular_expression(cls, value):
|
|
75
|
+
"""Validates the regular expression"""
|
|
76
|
+
if not re.match(r"^[a-zA-Z][a-zA-Z0-9\-]{1,30}[a-zA-Z0-9]$", value):
|
|
77
|
+
raise ValueError(
|
|
78
|
+
r"must validate the regular expression /^[a-zA-Z][a-zA-Z0-9\-]{1,30}[a-zA-Z0-9]$/"
|
|
79
|
+
)
|
|
80
|
+
return value
|
|
81
|
+
|
|
82
|
+
class Config:
|
|
83
|
+
"""Pydantic configuration"""
|
|
84
|
+
|
|
85
|
+
allow_population_by_field_name = True
|
|
86
|
+
validate_assignment = True
|
|
87
|
+
|
|
88
|
+
def to_str(self) -> str:
|
|
89
|
+
"""Returns the string representation of the model using alias"""
|
|
90
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
91
|
+
|
|
92
|
+
def to_json(self) -> str:
|
|
93
|
+
"""Returns the JSON representation of the model using alias"""
|
|
94
|
+
return json.dumps(self.to_dict())
|
|
95
|
+
|
|
96
|
+
@classmethod
|
|
97
|
+
def from_json(cls, json_str: str) -> Agent:
|
|
98
|
+
"""Create an instance of Agent from a JSON string"""
|
|
99
|
+
return cls.from_dict(json.loads(json_str))
|
|
100
|
+
|
|
101
|
+
def to_dict(self):
|
|
102
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
103
|
+
_dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
|
|
104
|
+
return _dict
|
|
105
|
+
|
|
106
|
+
@classmethod
|
|
107
|
+
def from_dict(cls, obj: dict) -> Agent:
|
|
108
|
+
"""Create an instance of Agent from a dict"""
|
|
109
|
+
if obj is None:
|
|
110
|
+
return None
|
|
111
|
+
|
|
112
|
+
if not isinstance(obj, dict):
|
|
113
|
+
return Agent.parse_obj(obj)
|
|
114
|
+
|
|
115
|
+
_obj = Agent.parse_obj(
|
|
116
|
+
{
|
|
117
|
+
"type": obj.get("type") if obj.get("type") is not None else "agent",
|
|
118
|
+
"name": obj.get("name"),
|
|
119
|
+
"available_tools": obj.get("available_tools"),
|
|
120
|
+
"goal": obj.get("goal"),
|
|
121
|
+
"instruction": obj.get("instruction"),
|
|
122
|
+
"model_id": obj.get("model_id"),
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
return _obj
|