truefoundry 0.5.10rc2__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/common/utils.py +9 -0
- truefoundry/deploy/__init__.py +2 -2
- truefoundry/deploy/_autogen/models.py +1591 -0
- truefoundry/deploy/builder/__init__.py +1 -1
- truefoundry/deploy/builder/builders/dockerfile.py +1 -1
- truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +1 -1
- truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +1 -1
- truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +1 -1
- truefoundry/deploy/lib/clients/servicefoundry_client.py +41 -35
- truefoundry/deploy/v2/lib/deploy.py +7 -7
- truefoundry/deploy/v2/lib/deploy_workflow.py +9 -9
- truefoundry/deploy/v2/lib/deployable_patched_models.py +1 -1
- truefoundry/deploy/v2/lib/patched_models.py +7 -7
- truefoundry/deploy/v2/lib/source.py +1 -1
- truefoundry/ml/__init__.py +2 -2
- truefoundry/ml/_autogen/client/__init__.py +457 -0
- truefoundry/ml/_autogen/client/api/__init__.py +16 -0
- truefoundry/ml/{autogen → _autogen}/client/api/auth_api.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/api/deprecated_api.py +7 -7
- truefoundry/ml/{autogen → _autogen}/client/api/experiments_api.py +12 -12
- truefoundry/ml/{autogen → _autogen}/client/api/generate_code_snippet_api.py +8 -8
- truefoundry/ml/{autogen → _autogen}/client/api/health_api.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/api/metrics_api.py +6 -6
- truefoundry/ml/{autogen → _autogen}/client/api/mlfoundry_artifacts_api.py +61 -59
- truefoundry/ml/{autogen → _autogen}/client/api/run_artifacts_api.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/api/runs_api.py +21 -21
- truefoundry/ml/{autogen → _autogen}/client/api_client.py +6 -6
- truefoundry/ml/{autogen → _autogen}/client/configuration.py +1 -1
- truefoundry/ml/_autogen/client/models/__init__.py +428 -0
- truefoundry/ml/{autogen → _autogen}/client/models/agent_app.py +5 -6
- truefoundry/ml/{autogen → _autogen}/client/models/agent_manifest.py +10 -17
- truefoundry/ml/{autogen → _autogen}/client/models/agent_open_api_tool_manifest.py +12 -18
- truefoundry/ml/{autogen → _autogen}/client/models/agent_open_api_tool_with_fqn.py +15 -23
- truefoundry/ml/{autogen → _autogen}/client/models/agent_with_fqn.py +13 -22
- truefoundry/ml/{autogen → _autogen}/client/models/apply_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/apply_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_dto.py +5 -3
- truefoundry/ml/{autogen/client/models/artifact_version_manifest.py → _autogen/client/models/artifact_manifest.py} +16 -21
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_path.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_dto.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_response_dto.py +3 -1
- truefoundry/ml/{autogen → _autogen}/client/models/assistant_message.py +4 -8
- truefoundry/ml/{autogen → _autogen}/client/models/blob_storage_reference.py +5 -8
- truefoundry/ml/{autogen → _autogen}/client/models/chat_prompt_manifest.py +10 -15
- truefoundry/ml/{autogen → _autogen}/client/models/chat_prompt_manifest_messages_inner.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/content.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/content1.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/content2.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/content2_any_of_inner.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_version_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_dataset_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_experiment_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_for_dataset_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_run_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/create_run_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/data_directory_manifest.py +5 -7
- truefoundry/ml/{autogen → _autogen}/client/models/dataset_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/dataset_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/experiment_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/experiment_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/export_deployment_files_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/external_blob_storage_source.py +14 -7
- truefoundry/ml/{autogen → _autogen}/client/models/fast_ai_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/file_info_dto.py +4 -1
- truefoundry/ml/{autogen → _autogen}/client/models/finalize_artifact_version_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/framework.py +15 -15
- truefoundry/ml/{autogen → _autogen}/client/models/get_experiment_response_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/get_latest_run_log_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/get_metric_history_response.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_read_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_write_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/gluon_framework.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/h2_o_framework.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/http_validation_error.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/image_content_part.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/image_url.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/infer_method_name.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/keras_framework.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/latest_run_log_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/library_name.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/light_gbm_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifact_versions_request_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifact_versions_response_dto.py +3 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifacts_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_artifacts_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_colums_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_datasets_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_experiments_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_artifact_versions_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_dataset_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_latest_run_logs_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_metric_history_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_model_version_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_model_versions_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_models_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_run_artifacts_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/list_run_logs_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/local_artifact_source.py +3 -5
- truefoundry/ml/{autogen → _autogen}/client/models/local_model_source.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/log_batch_request_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/manifest.py +28 -30
- truefoundry/ml/{autogen → _autogen}/client/models/manifest1.py +26 -28
- truefoundry/ml/{autogen → _autogen}/client/models/manifest2.py +16 -16
- truefoundry/ml/{autogen → _autogen}/client/models/method.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/metric_collection_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/mime_type.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/model_configuration.py +6 -7
- truefoundry/ml/{autogen → _autogen}/client/models/model_dto.py +4 -4
- truefoundry/ml/{autogen/client/models/model_version_manifest.py → _autogen/client/models/model_manifest.py} +18 -23
- truefoundry/ml/{autogen → _autogen}/client/models/model_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/model_version_dto.py +7 -9
- truefoundry/ml/{autogen → _autogen}/client/models/model_version_environment.py +3 -5
- truefoundry/ml/{autogen → _autogen}/client/models/model_version_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/onnx_framework.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/openapi_spec.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/paddle_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/parameters.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/py_torch_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/resolve_agent_app_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/run_data_dto.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/run_dto.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/run_info_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/run_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/search_runs_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/signed_url_dto.py +1 -2
- truefoundry/ml/{autogen → _autogen}/client/models/sklearn_framework.py +7 -8
- truefoundry/ml/{autogen → _autogen}/client/models/sklearn_model_schema.py +5 -8
- truefoundry/ml/{autogen → _autogen}/client/models/sklearn_serialization_format.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/source.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/source1.py +3 -3
- truefoundry/ml/{autogen → _autogen}/client/models/source2.py +4 -4
- truefoundry/ml/{autogen → _autogen}/client/models/spa_cy_framework.py +2 -4
- truefoundry/ml/{autogen → _autogen}/client/models/stats_models_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/store_run_logs_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/subject.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/system_message.py +4 -9
- truefoundry/ml/{autogen → _autogen}/client/models/tensor_flow_framework.py +2 -5
- truefoundry/ml/{autogen → _autogen}/client/models/text.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/text_content_part.py +3 -5
- truefoundry/ml/{autogen → _autogen}/client/models/transformers_framework.py +6 -10
- truefoundry/ml/{autogen → _autogen}/client/models/trigger_job_run_config_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/true_foundry_managed_source.py +16 -10
- truefoundry/ml/{autogen → _autogen}/client/models/update_artifact_version_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/update_dataset_request_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/update_model_version_request_dto.py +3 -5
- truefoundry/ml/{autogen → _autogen}/client/models/update_run_response_dto.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/url.py +2 -2
- truefoundry/ml/{autogen → _autogen}/client/models/user_message.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/validation_error.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_framework.py +5 -8
- truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_model_schema.py +4 -7
- truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_serialization_format.py +1 -1
- truefoundry/ml/{autogen → _autogen}/client/rest.py +1 -1
- truefoundry/ml/_autogen/client_README.md +359 -0
- truefoundry/ml/_autogen/entities/artifacts.py +558 -0
- truefoundry/ml/artifact/truefoundry_artifact_repo.py +1 -1
- truefoundry/ml/cli/commands/model_init.py +1 -1
- truefoundry/ml/clients/servicefoundry_client.py +4 -0
- truefoundry/ml/entities.py +1 -1
- truefoundry/ml/log_types/artifacts/artifact.py +9 -9
- truefoundry/ml/log_types/artifacts/dataset.py +5 -5
- truefoundry/ml/log_types/artifacts/general_artifact.py +1 -1
- truefoundry/ml/log_types/artifacts/model.py +9 -9
- truefoundry/ml/log_types/image/image.py +1 -1
- truefoundry/ml/log_types/plot.py +1 -1
- truefoundry/ml/mlfoundry_api.py +2 -2
- truefoundry/ml/mlfoundry_run.py +1 -1
- truefoundry/ml/model_framework.py +3 -3
- truefoundry/ml/session.py +7 -4
- truefoundry/ml/validation_utils.py +1 -1
- truefoundry/workflow/map_task.py +5 -2
- {truefoundry-0.5.10rc2.dist-info → truefoundry-0.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 -453
- truefoundry/ml/autogen/client/api/__init__.py +0 -16
- truefoundry/ml/autogen/client/models/__init__.py +0 -424
- truefoundry/ml/autogen/client_README.md +0 -359
- truefoundry/ml/autogen/entities/artifacts.py +0 -795
- truefoundry-0.5.10rc2.dist-info/RECORD +0 -376
- /truefoundry/ml/{autogen → _autogen}/__init__.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/api_response.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/exceptions.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/artifact_type.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_serialization_format.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_status.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/authorize_user_for_model_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/authorize_user_for_model_version_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/body_get_search_runs_get.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/columns_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/command.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_version_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_experiment_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_model_version_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_for_dataset_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_python_deployment_config_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_python_deployment_config_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/create_workflow_task_config_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_artifact_versions_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_dataset_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_files_for_dataset_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_model_version_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_run_request.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/delete_tag_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/experiment_id_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/experiment_tag_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_artifact_version_aliases_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_url_for_dataset_write_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_read_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/get_tenant_id_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/list_datasets_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_artifact_version_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_dataset_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/list_metric_history_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/list_models_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/log_metric_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/log_param_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/metric_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/model_server.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_storage_provider.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/notify_artifact_version_failure_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/param_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/restore_run_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/run_log_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/run_log_input_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/run_tag_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/search_runs_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/set_experiment_tag_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/set_tag_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/stop.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/subject_type.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/trigger_job_run_config_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/update_experiment_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/update_run_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/validate_external_storage_root_request_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/validate_external_storage_root_response_dto.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/client/models/validation_error_loc_inner.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/models/__init__.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/models/exceptions.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/models/schema.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/models/signature.py +0 -0
- /truefoundry/ml/{autogen → _autogen}/models/utils.py +0 -0
- {truefoundry-0.5.10rc2.dist-info → truefoundry-0.5.11rc1.dist-info}/WHEEL +0 -0
- {truefoundry-0.5.10rc2.dist-info → truefoundry-0.5.11rc1.dist-info}/entry_points.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from typing import Dict, List, Optional
|
|
3
3
|
|
|
4
|
-
from truefoundry.deploy.
|
|
4
|
+
from truefoundry.deploy._autogen.models import DockerFileBuild
|
|
5
5
|
from truefoundry.deploy.builder.docker_service import build_docker_image
|
|
6
6
|
from truefoundry.logger import logger
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@ import os
|
|
|
2
2
|
from tempfile import TemporaryDirectory
|
|
3
3
|
from typing import List, Optional
|
|
4
4
|
|
|
5
|
-
from truefoundry.deploy.
|
|
5
|
+
from truefoundry.deploy._autogen.models import DockerFileBuild
|
|
6
6
|
from truefoundry.deploy.builder.builders import dockerfile
|
|
7
7
|
from truefoundry.deploy.builder.builders.tfy_notebook_buildpack.dockerfile_template import (
|
|
8
8
|
NotebookImageBuild,
|
|
@@ -2,7 +2,7 @@ import os
|
|
|
2
2
|
from tempfile import TemporaryDirectory
|
|
3
3
|
from typing import List, Optional
|
|
4
4
|
|
|
5
|
-
from truefoundry.deploy.
|
|
5
|
+
from truefoundry.deploy._autogen.models import DockerFileBuild, PythonBuild
|
|
6
6
|
from truefoundry.deploy.builder.builders import dockerfile
|
|
7
7
|
from truefoundry.deploy.builder.builders.tfy_python_buildpack.dockerfile_template import (
|
|
8
8
|
generate_dockerfile_content,
|
|
@@ -4,7 +4,7 @@ from typing import Dict, List, Optional
|
|
|
4
4
|
from mako.template import Template
|
|
5
5
|
|
|
6
6
|
from truefoundry.common.constants import ENV_VARS, PythonPackageManager
|
|
7
|
-
from truefoundry.deploy.
|
|
7
|
+
from truefoundry.deploy._autogen.models import PythonBuild
|
|
8
8
|
from truefoundry.deploy.builder.constants import (
|
|
9
9
|
PIP_CONF_BUILDKIT_SECRET_MOUNT,
|
|
10
10
|
PIP_CONF_SECRET_MOUNT_AS_ENV,
|
|
@@ -24,7 +24,8 @@ from truefoundry.common.servicefoundry_client import (
|
|
|
24
24
|
session_with_retries,
|
|
25
25
|
)
|
|
26
26
|
from truefoundry.common.session import Session
|
|
27
|
-
from truefoundry.
|
|
27
|
+
from truefoundry.common.utils import get_user_agent
|
|
28
|
+
from truefoundry.deploy._autogen import models as autogen_models
|
|
28
29
|
from truefoundry.deploy.io.output_callback import OutputCallBack
|
|
29
30
|
from truefoundry.deploy.lib.model.entity import (
|
|
30
31
|
Application,
|
|
@@ -89,16 +90,20 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
89
90
|
raise Exception("Neither session, not tfy_host provided")
|
|
90
91
|
super().__init__(tfy_host=tfy_host)
|
|
91
92
|
|
|
92
|
-
def
|
|
93
|
+
def _get_headers(self) -> Dict[str, str]:
|
|
94
|
+
headers = {"User-Agent": get_user_agent()}
|
|
93
95
|
if not self._session:
|
|
94
|
-
return
|
|
95
|
-
return {
|
|
96
|
+
return headers
|
|
97
|
+
return {
|
|
98
|
+
**headers,
|
|
99
|
+
"Authorization": f"Bearer {self._session.access_token}",
|
|
100
|
+
}
|
|
96
101
|
|
|
97
102
|
@check_min_cli_version
|
|
98
103
|
def get_id_from_fqn(self, fqn_type: str, fqn: str) -> Dict[str, Any]:
|
|
99
104
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/fqn/{fqn_type}"
|
|
100
105
|
response = session_with_retries().get(
|
|
101
|
-
url, headers=self.
|
|
106
|
+
url, headers=self._get_headers(), params={"fqn": fqn}
|
|
102
107
|
)
|
|
103
108
|
return request_handling(response)
|
|
104
109
|
|
|
@@ -118,7 +123,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
118
123
|
if workspace_fqn:
|
|
119
124
|
params["workspaceFqn"] = workspace_fqn
|
|
120
125
|
response = session_with_retries().get(
|
|
121
|
-
url, params=params, headers=self.
|
|
126
|
+
url, params=params, headers=self._get_headers()
|
|
122
127
|
)
|
|
123
128
|
response = request_handling(response)
|
|
124
129
|
return parse_obj_as(List[Workspace], response)
|
|
@@ -140,7 +145,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
140
145
|
"resources": resources.dict(exclude_none=True),
|
|
141
146
|
}
|
|
142
147
|
},
|
|
143
|
-
headers=self.
|
|
148
|
+
headers=self._get_headers(),
|
|
144
149
|
)
|
|
145
150
|
response_data = request_handling(response)
|
|
146
151
|
return Workspace.parse_obj(response_data)
|
|
@@ -152,7 +157,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
152
157
|
force
|
|
153
158
|
) # this dumb conversion is required because `params` just casts as str
|
|
154
159
|
response = session_with_retries().delete(
|
|
155
|
-
url, headers=self.
|
|
160
|
+
url, headers=self._get_headers(), params={"force": force_str}
|
|
156
161
|
)
|
|
157
162
|
response = cast(Dict[str, Any], request_handling(response))
|
|
158
163
|
return Workspace.parse_obj(response["workspace"])
|
|
@@ -162,7 +167,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
162
167
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/workspace"
|
|
163
168
|
response = session_with_retries().get(
|
|
164
169
|
url,
|
|
165
|
-
headers=self.
|
|
170
|
+
headers=self._get_headers(),
|
|
166
171
|
params={"fqn": workspace_fqn},
|
|
167
172
|
)
|
|
168
173
|
response = request_handling(response)
|
|
@@ -171,7 +176,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
171
176
|
@check_min_cli_version
|
|
172
177
|
def get_cluster(self, cluster_id: str) -> Dict[str, Any]:
|
|
173
178
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/cluster/{cluster_id}"
|
|
174
|
-
response = session_with_retries().get(url, headers=self.
|
|
179
|
+
response = session_with_retries().get(url, headers=self._get_headers())
|
|
175
180
|
return cast(Dict[str, Any], request_handling(response))
|
|
176
181
|
|
|
177
182
|
@check_min_cli_version
|
|
@@ -186,7 +191,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
186
191
|
"serviceName": service_name,
|
|
187
192
|
"stage": env,
|
|
188
193
|
},
|
|
189
|
-
headers=self.
|
|
194
|
+
headers=self._get_headers(),
|
|
190
195
|
)
|
|
191
196
|
return cast(Dict[str, Any], request_handling(response))
|
|
192
197
|
|
|
@@ -204,7 +209,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
204
209
|
def deploy_application(
|
|
205
210
|
self,
|
|
206
211
|
workspace_id: str,
|
|
207
|
-
application:
|
|
212
|
+
application: autogen_models.Workflow,
|
|
208
213
|
force: bool = False,
|
|
209
214
|
) -> Deployment:
|
|
210
215
|
data = {
|
|
@@ -216,7 +221,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
216
221
|
logger.debug(json.dumps(data))
|
|
217
222
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/deployment"
|
|
218
223
|
response = session_with_retries().post(
|
|
219
|
-
url, json=data, headers=self.
|
|
224
|
+
url, json=data, headers=self._get_headers()
|
|
220
225
|
)
|
|
221
226
|
response_data = cast(Dict[str, Any], request_handling(response))
|
|
222
227
|
return Deployment.parse_obj(response_data["deployment"])
|
|
@@ -279,7 +284,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
279
284
|
sio.connect(
|
|
280
285
|
tail_logs_url,
|
|
281
286
|
transports="websocket",
|
|
282
|
-
headers=self.
|
|
287
|
+
headers=self._get_headers(),
|
|
283
288
|
socketio_path=socketio_path,
|
|
284
289
|
)
|
|
285
290
|
return sio
|
|
@@ -287,7 +292,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
287
292
|
@check_min_cli_version
|
|
288
293
|
def get_deployment(self, application_id: str, deployment_id: str) -> Deployment:
|
|
289
294
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/app/{application_id}/deployments/{deployment_id}"
|
|
290
|
-
response = session_with_retries().get(url, headers=self.
|
|
295
|
+
response = session_with_retries().get(url, headers=self._get_headers())
|
|
291
296
|
response_data = request_handling(response)
|
|
292
297
|
return Deployment.parse_obj(response_data)
|
|
293
298
|
|
|
@@ -296,7 +301,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
296
301
|
self, application_id: str, deployment_id: str
|
|
297
302
|
) -> List[AppDeploymentStatusResponse]:
|
|
298
303
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/app/{application_id}/deployments/{deployment_id}/statuses"
|
|
299
|
-
response = session_with_retries().get(url, headers=self.
|
|
304
|
+
response = session_with_retries().get(url, headers=self._get_headers())
|
|
300
305
|
response_data = request_handling(response)
|
|
301
306
|
return parse_obj_as(List[AppDeploymentStatusResponse], response_data)
|
|
302
307
|
|
|
@@ -305,7 +310,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
305
310
|
self, application_id: str, deployment_id: str
|
|
306
311
|
) -> List[BuildResponse]:
|
|
307
312
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/app/{application_id}/deployments/{deployment_id}/builds"
|
|
308
|
-
response = session_with_retries().get(url, headers=self.
|
|
313
|
+
response = session_with_retries().get(url, headers=self._get_headers())
|
|
309
314
|
response_data = request_handling(response)
|
|
310
315
|
return parse_obj_as(List[BuildResponse], response_data)
|
|
311
316
|
|
|
@@ -337,7 +342,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
337
342
|
|
|
338
343
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/logs/{workspace_id}"
|
|
339
344
|
response = session_with_retries().get(
|
|
340
|
-
url=url, params=data, headers=self.
|
|
345
|
+
url=url, params=data, headers=self._get_headers()
|
|
341
346
|
)
|
|
342
347
|
response_data = cast(Dict[str, Any], request_handling(response))
|
|
343
348
|
return parse_obj_as(List[LogBody], response_data["data"])
|
|
@@ -352,7 +357,8 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
352
357
|
tail_logs_obj = json.loads(build_response.tailLogsUrl)
|
|
353
358
|
socket = self._tail_logs(
|
|
354
359
|
tail_logs_url=urljoin(
|
|
355
|
-
tail_logs_obj["uri"],
|
|
360
|
+
tail_logs_obj["uri"],
|
|
361
|
+
f"/?type={BUILD_LOGS_SUBSCRIBE_MESSAGE}",
|
|
356
362
|
),
|
|
357
363
|
socketio_path=tail_logs_obj["path"],
|
|
358
364
|
query_dict={
|
|
@@ -474,7 +480,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
474
480
|
) -> None:
|
|
475
481
|
callback = callback or OutputCallBack()
|
|
476
482
|
url = build_response.getLogsUrl
|
|
477
|
-
response = session_with_retries().get(url=url, headers=self.
|
|
483
|
+
response = session_with_retries().get(url=url, headers=self._get_headers())
|
|
478
484
|
logs_response = cast(Dict[str, Any], request_handling(response))
|
|
479
485
|
for _log_body in logs_response["logs"]:
|
|
480
486
|
try:
|
|
@@ -487,7 +493,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
487
493
|
def get_deployment_info_by_fqn(self, deployment_fqn: str) -> DeploymentFqnResponse:
|
|
488
494
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/fqn/deployment"
|
|
489
495
|
response = session_with_retries().get(
|
|
490
|
-
url, headers=self.
|
|
496
|
+
url, headers=self._get_headers(), params={"fqn": deployment_fqn}
|
|
491
497
|
)
|
|
492
498
|
response_data = request_handling(response)
|
|
493
499
|
return DeploymentFqnResponse.parse_obj(response_data)
|
|
@@ -498,7 +504,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
498
504
|
) -> ApplicationFqnResponse:
|
|
499
505
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/fqn/app"
|
|
500
506
|
response = session_with_retries().get(
|
|
501
|
-
url, headers=self.
|
|
507
|
+
url, headers=self._get_headers(), params={"fqn": application_fqn}
|
|
502
508
|
)
|
|
503
509
|
response_data = request_handling(response)
|
|
504
510
|
return ApplicationFqnResponse.parse_obj(response_data)
|
|
@@ -506,7 +512,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
506
512
|
@check_min_cli_version
|
|
507
513
|
def remove_application(self, application_id: str) -> Dict[str, Any]:
|
|
508
514
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/app/{application_id}"
|
|
509
|
-
response = session_with_retries().delete(url, headers=self.
|
|
515
|
+
response = session_with_retries().delete(url, headers=self._get_headers())
|
|
510
516
|
response = cast(Dict[str, Any], request_handling(response))
|
|
511
517
|
# TODO: Add pydantic here.
|
|
512
518
|
return response
|
|
@@ -514,7 +520,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
514
520
|
@check_min_cli_version
|
|
515
521
|
def get_application_info(self, application_id: str) -> Application:
|
|
516
522
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/app/{application_id}"
|
|
517
|
-
response = session_with_retries().get(url, headers=self.
|
|
523
|
+
response = session_with_retries().get(url, headers=self._get_headers())
|
|
518
524
|
response = request_handling(response)
|
|
519
525
|
return Application.parse_obj(response)
|
|
520
526
|
|
|
@@ -534,7 +540,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
534
540
|
if search_prefix:
|
|
535
541
|
params["searchPrefix"] = search_prefix
|
|
536
542
|
response = session_with_retries().get(
|
|
537
|
-
url, headers=self.
|
|
543
|
+
url, headers=self._get_headers(), params=params
|
|
538
544
|
)
|
|
539
545
|
response_data = cast(Dict[str, Any], request_handling(response))
|
|
540
546
|
return parse_obj_as(List[JobRun], response_data["data"])
|
|
@@ -545,7 +551,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
545
551
|
job_run_name: str,
|
|
546
552
|
) -> JobRun:
|
|
547
553
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/jobs/{application_id}/runs/{job_run_name}"
|
|
548
|
-
response = session_with_retries().get(url, headers=self.
|
|
554
|
+
response = session_with_retries().get(url, headers=self._get_headers())
|
|
549
555
|
response_data = request_handling(response)
|
|
550
556
|
return parse_obj_as(JobRun, response_data)
|
|
551
557
|
|
|
@@ -565,7 +571,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
565
571
|
if params:
|
|
566
572
|
body["input"]["params"] = params
|
|
567
573
|
response = session_with_retries().post(
|
|
568
|
-
url, json=body, headers=self.
|
|
574
|
+
url, json=body, headers=self._get_headers()
|
|
569
575
|
)
|
|
570
576
|
response = request_handling(response)
|
|
571
577
|
return TriggerJobResult.parse_obj(response)
|
|
@@ -576,7 +582,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
576
582
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/workflow/{application_id}/executions"
|
|
577
583
|
body = {"inputs": inputs}
|
|
578
584
|
response = session_with_retries(retries=MAX_RETRIES_WORKFLOW_TRIGGER).post(
|
|
579
|
-
url, json=body, headers=self.
|
|
585
|
+
url, json=body, headers=self._get_headers()
|
|
580
586
|
)
|
|
581
587
|
response = cast(Dict[str, Any], request_handling(response))
|
|
582
588
|
return response
|
|
@@ -588,7 +594,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
588
594
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/docker-registry/creds"
|
|
589
595
|
response = session_with_retries().get(
|
|
590
596
|
url,
|
|
591
|
-
headers=self.
|
|
597
|
+
headers=self._get_headers(),
|
|
592
598
|
params={
|
|
593
599
|
"fqn": docker_registry_fqn,
|
|
594
600
|
"clusterId": cluster_id,
|
|
@@ -604,7 +610,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
604
610
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/docker-registry/create-repo"
|
|
605
611
|
response = session_with_retries().post(
|
|
606
612
|
url,
|
|
607
|
-
headers=self.
|
|
613
|
+
headers=self._get_headers(),
|
|
608
614
|
data={
|
|
609
615
|
"fqn": docker_registry_fqn,
|
|
610
616
|
"workspaceFqn": workspace_fqn,
|
|
@@ -630,7 +636,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
630
636
|
if application_name:
|
|
631
637
|
params["applicationName"] = application_name
|
|
632
638
|
response = session_with_retries().get(
|
|
633
|
-
url, params=params, headers=self.
|
|
639
|
+
url, params=params, headers=self._get_headers()
|
|
634
640
|
)
|
|
635
641
|
response = request_handling(response)
|
|
636
642
|
return parse_obj_as(List[Application], response)
|
|
@@ -651,7 +657,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
651
657
|
if deployment_id:
|
|
652
658
|
params["deploymentId"] = deployment_id
|
|
653
659
|
response = session_with_retries().get(
|
|
654
|
-
url, params=params, headers=self.
|
|
660
|
+
url, params=params, headers=self._get_headers()
|
|
655
661
|
)
|
|
656
662
|
response = request_handling(response)
|
|
657
663
|
return parse_obj_as(List[Deployment], response)
|
|
@@ -661,7 +667,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
661
667
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/apply"
|
|
662
668
|
body = {"manifest": manifest, "dryRun": dry_run}
|
|
663
669
|
response = session_with_retries().put(
|
|
664
|
-
url, headers=self.
|
|
670
|
+
url, headers=self._get_headers(), json=body
|
|
665
671
|
)
|
|
666
672
|
response_data = cast(Dict[str, Any], request_handling(response))
|
|
667
673
|
return response_data
|
|
@@ -671,7 +677,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
671
677
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/delete"
|
|
672
678
|
body = {"manifest": manifest}
|
|
673
679
|
response = session_with_retries().post(
|
|
674
|
-
url, headers=self.
|
|
680
|
+
url, headers=self._get_headers(), json=body
|
|
675
681
|
)
|
|
676
682
|
response_data = cast(Dict[str, Any], request_handling(response))
|
|
677
683
|
return response_data
|
|
@@ -691,7 +697,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
691
697
|
# TODO (chiragjn): Check if this is supposed to be params or json
|
|
692
698
|
params=body,
|
|
693
699
|
json=body,
|
|
694
|
-
headers=self.
|
|
700
|
+
headers=self._get_headers(),
|
|
695
701
|
)
|
|
696
702
|
response_data = cast(Dict[str, Any], request_handling(response))
|
|
697
703
|
return response_data
|
|
@@ -6,7 +6,7 @@ import socketio
|
|
|
6
6
|
from rich.status import Status
|
|
7
7
|
|
|
8
8
|
from truefoundry.common.utils import poll_for_function
|
|
9
|
-
from truefoundry.deploy.
|
|
9
|
+
from truefoundry.deploy._autogen import models as autogen_models
|
|
10
10
|
from truefoundry.deploy.builder.docker_service import env_has_docker
|
|
11
11
|
from truefoundry.deploy.lib.clients.servicefoundry_client import (
|
|
12
12
|
ServiceFoundryServiceClient,
|
|
@@ -28,8 +28,8 @@ Component = TypeVar("Component", bound=BaseModel)
|
|
|
28
28
|
def _handle_if_local_source(component: Component, workspace_fqn: str) -> Component:
|
|
29
29
|
if (
|
|
30
30
|
hasattr(component, "image")
|
|
31
|
-
and isinstance(component.image,
|
|
32
|
-
and isinstance(component.image.build_source,
|
|
31
|
+
and isinstance(component.image, autogen_models.Build)
|
|
32
|
+
and isinstance(component.image.build_source, autogen_models.LocalSource)
|
|
33
33
|
):
|
|
34
34
|
new_component = component.copy(deep=True)
|
|
35
35
|
|
|
@@ -180,13 +180,13 @@ def _deploy_wait_handler( # noqa: C901
|
|
|
180
180
|
def _warn_when_gpu_selected_without_cuda(component: Component):
|
|
181
181
|
is_python_build_without_cuda = (
|
|
182
182
|
hasattr(component, "image")
|
|
183
|
-
and isinstance(component.image,
|
|
184
|
-
and isinstance(component.image.build_spec,
|
|
183
|
+
and isinstance(component.image, autogen_models.Build)
|
|
184
|
+
and isinstance(component.image.build_spec, autogen_models.PythonBuild)
|
|
185
185
|
and not component.image.build_spec.cuda_version
|
|
186
186
|
)
|
|
187
187
|
uses_gpu = (
|
|
188
188
|
hasattr(component, "resources")
|
|
189
|
-
and isinstance(component,
|
|
189
|
+
and isinstance(component, autogen_models.Resources)
|
|
190
190
|
and component.resources.gpu_count > 0
|
|
191
191
|
)
|
|
192
192
|
if is_python_build_without_cuda and uses_gpu:
|
|
@@ -260,7 +260,7 @@ def deploy_component(
|
|
|
260
260
|
)
|
|
261
261
|
component.workspace_fqn = workspace_fqn
|
|
262
262
|
workspace_id = get_workspace_by_fqn(workspace_fqn).id
|
|
263
|
-
if isinstance(component,
|
|
263
|
+
if isinstance(component, autogen_models.ApplicationSet):
|
|
264
264
|
updated_component = component.copy(deep=True)
|
|
265
265
|
for i in range(len(updated_component.components)):
|
|
266
266
|
updated_component.components[i] = _handle_if_local_source(
|
|
@@ -20,7 +20,7 @@ from flytekit.tools.translator import WorkflowSpec as FlyteWorkflowSpec
|
|
|
20
20
|
from google.protobuf.json_format import MessageToDict
|
|
21
21
|
|
|
22
22
|
from truefoundry.common.types import UploadCodePackageCallable
|
|
23
|
-
from truefoundry.deploy.
|
|
23
|
+
from truefoundry.deploy._autogen import models as autogen_models
|
|
24
24
|
from truefoundry.deploy.lib.clients.servicefoundry_client import (
|
|
25
25
|
ServiceFoundryServiceClient,
|
|
26
26
|
)
|
|
@@ -38,10 +38,10 @@ from truefoundry.workflow.workflow import (
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
def _handle_code_upload_for_workflow(
|
|
41
|
-
workflow:
|
|
41
|
+
workflow: autogen_models.Workflow,
|
|
42
42
|
workspace_fqn: str,
|
|
43
43
|
upload_code_package: UploadCodePackageCallable,
|
|
44
|
-
) ->
|
|
44
|
+
) -> autogen_models.Workflow:
|
|
45
45
|
new_workflow = workflow.copy(deep=True)
|
|
46
46
|
new_workflow.source = local_source_to_remote_source(
|
|
47
47
|
local_source=workflow.source,
|
|
@@ -151,7 +151,7 @@ def _validate_workflow_entities( # noqa: C901
|
|
|
151
151
|
if not is_tfy_wf_present_in_task_python_build:
|
|
152
152
|
tasks_without_truefoundry_worflow_package.append(task.template.id.name)
|
|
153
153
|
try:
|
|
154
|
-
|
|
154
|
+
autogen_models.FlyteTaskCustom.validate(task.template.custom)
|
|
155
155
|
except ValidationError:
|
|
156
156
|
raise ValueError(
|
|
157
157
|
error_message_to_use_truefoundry_decorators.format(
|
|
@@ -193,7 +193,7 @@ def _get_relative_package_path_from_filepath(
|
|
|
193
193
|
|
|
194
194
|
|
|
195
195
|
def _generate_manifest_for_workflow(
|
|
196
|
-
workflow:
|
|
196
|
+
workflow: autogen_models.Workflow,
|
|
197
197
|
):
|
|
198
198
|
settings = SerializationSettings(
|
|
199
199
|
# We are adding these defaults to avoid validation errors in flyte objects
|
|
@@ -248,7 +248,7 @@ def _generate_manifest_for_workflow(
|
|
|
248
248
|
and message_dict["template"].get("custom")
|
|
249
249
|
and message_dict["template"]["custom"].get("truefoundry")
|
|
250
250
|
):
|
|
251
|
-
parsed_model =
|
|
251
|
+
parsed_model = autogen_models.FlyteTaskCustom.parse_obj(
|
|
252
252
|
message_dict["template"]["custom"]
|
|
253
253
|
)
|
|
254
254
|
message_dict["template"]["custom"]["truefoundry"] = parsed_model.truefoundry
|
|
@@ -256,11 +256,11 @@ def _generate_manifest_for_workflow(
|
|
|
256
256
|
workflow.flyte_entities.append(message_dict)
|
|
257
257
|
|
|
258
258
|
# this step is just to verify if pydantic model is still valid after adding flyte_entities
|
|
259
|
-
|
|
259
|
+
autogen_models.Workflow.validate({**workflow.dict()})
|
|
260
260
|
|
|
261
261
|
|
|
262
262
|
def _validate_workspace_fqn(
|
|
263
|
-
workflow:
|
|
263
|
+
workflow: autogen_models.Workflow,
|
|
264
264
|
workspace_fqn: Optional[str] = None,
|
|
265
265
|
):
|
|
266
266
|
if not workspace_fqn:
|
|
@@ -271,7 +271,7 @@ def _validate_workspace_fqn(
|
|
|
271
271
|
|
|
272
272
|
|
|
273
273
|
def deploy_workflow(
|
|
274
|
-
workflow:
|
|
274
|
+
workflow: autogen_models.Workflow,
|
|
275
275
|
workspace_fqn: str,
|
|
276
276
|
wait: bool = True,
|
|
277
277
|
force: bool = False,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Literal, Union
|
|
2
2
|
|
|
3
|
-
from truefoundry.deploy.
|
|
3
|
+
from truefoundry.deploy._autogen import models
|
|
4
4
|
from truefoundry.deploy.lib.model.entity import Deployment
|
|
5
5
|
from truefoundry.deploy.v2.lib.deploy import deploy_component
|
|
6
6
|
from truefoundry.deploy.v2.lib.patched_models import LocalSource
|
|
@@ -6,7 +6,7 @@ from collections.abc import Mapping
|
|
|
6
6
|
from typing import Literal, Optional, Union
|
|
7
7
|
|
|
8
8
|
from truefoundry.common.warnings import TrueFoundryDeprecationWarning
|
|
9
|
-
from truefoundry.deploy.
|
|
9
|
+
from truefoundry.deploy._autogen import models
|
|
10
10
|
from truefoundry.pydantic_v1 import (
|
|
11
11
|
BaseModel,
|
|
12
12
|
Field,
|
|
@@ -72,7 +72,6 @@ resources:
|
|
|
72
72
|
---------
|
|
73
73
|
"""
|
|
74
74
|
|
|
75
|
-
|
|
76
75
|
AUTO_DISCOVERED_REQUIREMENTS_TXT_WARNING_MESSAGE_TEMPLATE = """\
|
|
77
76
|
Using automatically discovered {requirements_txt_path} as the requirements file.
|
|
78
77
|
This auto discovery behavior is deprecated and will be removed in a future release.
|
|
@@ -163,6 +162,7 @@ class GPUType(str, enum.Enum):
|
|
|
163
162
|
L4 = "L4"
|
|
164
163
|
H100_80GB = "H100_80GB"
|
|
165
164
|
H100_94GB = "H100_94GB"
|
|
165
|
+
H200 = "H200"
|
|
166
166
|
|
|
167
167
|
|
|
168
168
|
class TPUType(str, enum.Enum):
|
|
@@ -252,7 +252,7 @@ class BasicAuthCreds(models.BasicAuthCreds, PatchedModelBase):
|
|
|
252
252
|
type: Literal["basic_auth"] = "basic_auth"
|
|
253
253
|
|
|
254
254
|
|
|
255
|
-
class
|
|
255
|
+
class JwtAuthConfig(models.JwtAuthConfig, PatchedModelBase):
|
|
256
256
|
type: Literal["jwt_auth"] = "jwt_auth"
|
|
257
257
|
|
|
258
258
|
|
|
@@ -508,10 +508,6 @@ class TrueFoundryArtifactSource(models.TrueFoundryArtifactSource, PatchedModelBa
|
|
|
508
508
|
type: Literal["truefoundry-artifact"] = "truefoundry-artifact"
|
|
509
509
|
|
|
510
510
|
|
|
511
|
-
# Deprecated alias, kept for backward compatibility
|
|
512
|
-
TruefoundryArtifactSource = TrueFoundryArtifactSource
|
|
513
|
-
|
|
514
|
-
|
|
515
511
|
class ArtifactsDownload(models.ArtifactsDownload, PatchedModelBase):
|
|
516
512
|
pass
|
|
517
513
|
|
|
@@ -563,3 +559,7 @@ class TaskDockerFileBuild(models.TaskDockerFileBuild, PatchedModelBase):
|
|
|
563
559
|
|
|
564
560
|
class TaskPythonBuild(models.TaskPythonBuild, PatchedModelBase):
|
|
565
561
|
type: Literal["task-python-build"] = "task-python-build"
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
# Deprecated aliases, kept for backward compatibility
|
|
565
|
+
TruefoundryArtifactSource = TrueFoundryArtifactSource
|
|
@@ -11,7 +11,7 @@ from tqdm import tqdm
|
|
|
11
11
|
from truefoundry.common.types import UploadCodePackageCallable
|
|
12
12
|
from truefoundry.common.warnings import TrueFoundryDeprecationWarning
|
|
13
13
|
from truefoundry.deploy import builder
|
|
14
|
-
from truefoundry.deploy.
|
|
14
|
+
from truefoundry.deploy._autogen import models
|
|
15
15
|
from truefoundry.deploy.builder.docker_service import (
|
|
16
16
|
pull_docker_image,
|
|
17
17
|
push_docker_image,
|
truefoundry/ml/__init__.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
from truefoundry.ml.
|
|
1
|
+
from truefoundry.ml._autogen.client.models import ( # type: ignore[attr-defined]
|
|
2
2
|
InferMethodName,
|
|
3
3
|
ModelVersionEnvironment,
|
|
4
4
|
SklearnModelSchema,
|
|
5
5
|
XGBoostModelSchema,
|
|
6
6
|
)
|
|
7
|
-
from truefoundry.ml.
|
|
7
|
+
from truefoundry.ml._autogen.entities.artifacts import LibraryName
|
|
8
8
|
from truefoundry.ml.enums import (
|
|
9
9
|
DataSlice,
|
|
10
10
|
FileFormat,
|