truefoundry 0.3.2__tar.gz → 0.4.0.dev0__tar.gz
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-0.3.2 → truefoundry-0.4.0.dev0}/PKG-INFO +19 -12
- truefoundry-0.4.0.dev0/pyproject.toml +154 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/cli/__main__.py +3 -17
- truefoundry-0.4.0.dev0/truefoundry/common/request_utils.py +56 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/auto_gen/models.py +29 -1
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/cli.py +1 -1
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/auth/credential_provider.py +2 -12
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/clients/servicefoundry_client.py +0 -9
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/exceptions.py +1 -6
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/session.py +1 -16
- {truefoundry-0.3.2/truefoundry → truefoundry-0.4.0.dev0/truefoundry/deploy}/python_deploy_codegen.py +1 -0
- truefoundry-0.4.0.dev0/truefoundry/deploy/v2/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/langchain/truefoundry_chat.py +1 -1
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/langchain/truefoundry_embeddings.py +1 -1
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/langchain/truefoundry_llm.py +1 -1
- truefoundry-0.4.0.dev0/truefoundry/langchain/utils.py +44 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/__init__.py +46 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/artifact/__init__.py +0 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/artifact/truefoundry_artifact_repo.py +1120 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/__init__.py +0 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/__init__.py +373 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api/__init__.py +16 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api/auth_api.py +184 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api/deprecated_api.py +605 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api/experiments_api.py +2109 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api/health_api.py +299 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api/metrics_api.py +371 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +7213 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api/python_deployment_config_api.py +201 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api/run_artifacts_api.py +231 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api/runs_api.py +2919 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api_client.py +822 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/api_response.py +30 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/configuration.py +489 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/exceptions.py +161 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/__init__.py +344 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/add_custom_metrics_to_model_version_request_dto.py +69 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py +83 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/agent.py +125 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/agent_app.py +118 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/agent_open_api_tool.py +143 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +144 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/agent_with_fqn.py +127 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/artifact_dto.py +115 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/artifact_response_dto.py +75 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/artifact_type.py +39 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/artifact_version_dto.py +141 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/artifact_version_response_dto.py +77 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/artifact_version_status.py +35 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/assistant_message.py +89 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/authorize_user_for_model_request_dto.py +69 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/authorize_user_for_model_version_request_dto.py +69 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/backfill_default_storage_integration_id_request_dto.py +67 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/blob_storage_reference.py +93 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/body_get_search_runs_get.py +72 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/chat_prompt.py +156 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/chat_prompt_messages_inner.py +171 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/columns_dto.py +73 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/content.py +153 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/content1.py +153 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/content2.py +174 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/content2_any_of_inner.py +150 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_artifact_request_dto.py +74 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_artifact_response_dto.py +66 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_artifact_version_request_dto.py +74 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +66 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_dataset_request_dto.py +76 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_experiment_request_dto.py +94 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_experiment_response_dto.py +67 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_model_version_request_dto.py +95 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_request_dto.py +73 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_response_dto.py +79 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_multi_part_upload_request_dto.py +73 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_python_deployment_config_request_dto.py +72 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_python_deployment_config_response_dto.py +68 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_run_request_dto.py +97 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/create_run_response_dto.py +76 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/dataset_dto.py +112 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/dataset_response_dto.py +75 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/delete_artifact_versions_request_dto.py +65 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/delete_dataset_request_dto.py +74 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/delete_model_version_request_dto.py +65 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/delete_run_request.py +65 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/delete_tag_request_dto.py +68 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/experiment_dto.py +127 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/experiment_id_request_dto.py +67 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/experiment_response_dto.py +75 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/experiment_tag_dto.py +69 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/feature_dto.py +68 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/feature_value_type.py +35 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/file_info_dto.py +76 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +101 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_experiment_response_dto.py +88 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_latest_run_log_response_dto.py +76 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_metric_history_response.py +79 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_signed_url_for_dataset_write_request_dto.py +68 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +68 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +81 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +69 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +83 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_request_dto.py +68 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_response_dto.py +81 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_write_response_dto.py +81 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/get_tenant_id_response_dto.py +74 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/http_validation_error.py +82 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/image_content_part.py +87 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/image_url.py +75 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/internal_metadata.py +180 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/latest_run_log_dto.py +78 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_artifact_versions_request_dto.py +107 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_artifact_versions_response_dto.py +87 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_artifacts_request_dto.py +96 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_artifacts_response_dto.py +86 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_colums_response_dto.py +75 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_datasets_request_dto.py +78 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_datasets_response_dto.py +86 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_experiments_response_dto.py +86 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_files_for_artifact_version_request_dto.py +76 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_files_for_artifact_versions_response_dto.py +82 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_files_for_dataset_request_dto.py +76 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_files_for_dataset_response_dto.py +82 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_latest_run_logs_response_dto.py +82 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_metric_history_request_dto.py +69 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_metric_history_response_dto.py +84 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_model_version_response_dto.py +87 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_model_versions_request_dto.py +93 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_models_request_dto.py +89 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_models_response_dto.py +84 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_run_artifacts_response_dto.py +84 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_run_logs_response_dto.py +82 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/list_seed_experiments_response_dto.py +81 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/log_batch_request_dto.py +106 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/log_metric_request_dto.py +80 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/log_param_request_dto.py +76 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/method.py +37 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/metric_collection_dto.py +82 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/metric_dto.py +76 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/mime_type.py +37 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/model_configuration.py +103 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/model_dto.py +122 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/model_response_dto.py +75 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/model_schema_dto.py +85 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/model_version_dto.py +163 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/model_version_response_dto.py +75 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/multi_part_upload_dto.py +107 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/multi_part_upload_response_dto.py +79 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/multi_part_upload_storage_provider.py +34 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/notify_artifact_version_failure_dto.py +65 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/openapi_spec.py +152 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/param_dto.py +66 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/parameters.py +84 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/prediction_type.py +34 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/resolve_agent_app_response_dto.py +75 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/restore_run_request_dto.py +65 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/run_data_dto.py +104 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/run_dto.py +84 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/run_info_dto.py +105 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/run_log_dto.py +90 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/run_log_input_dto.py +80 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/run_response_dto.py +75 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/run_tag_dto.py +66 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/search_runs_request_dto.py +94 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/search_runs_response_dto.py +84 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/set_experiment_tag_request_dto.py +73 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/set_tag_request_dto.py +76 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/signed_url_dto.py +69 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/stop.py +152 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/store_run_logs_request_dto.py +83 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/system_message.py +89 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/text.py +153 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/text_content_part.py +84 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/update_artifact_version_request_dto.py +74 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/update_dataset_request_dto.py +74 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/update_experiment_request_dto.py +74 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +93 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/update_run_request_dto.py +78 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/update_run_response_dto.py +76 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/url.py +153 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/user_message.py +89 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/validation_error.py +87 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/models/validation_error_loc_inner.py +154 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client/rest.py +426 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/autogen/client_README.md +322 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/cli/__init__.py +0 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/cli/cli.py +18 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/cli/commands/__init__.py +3 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/cli/commands/download.py +87 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/constants.py +84 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/enums.py +70 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/env_vars.py +13 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/exceptions.py +8 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/git_info.py +60 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/internal_namespace.py +52 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/__init__.py +4 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/artifacts/artifact.py +427 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/artifacts/constants.py +33 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/artifacts/dataset.py +383 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/artifacts/general_artifact.py +110 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/artifacts/model.py +628 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/artifacts/model_extras.py +48 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/artifacts/utils.py +161 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/image/__init__.py +3 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/image/constants.py +8 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/image/image.py +358 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/image/image_normalizer.py +101 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/image/types.py +68 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/plot.py +281 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/pydantic_base.py +10 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/log_types/utils.py +12 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/logger.py +17 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/login.py +241 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/mlfoundry_api.py +1620 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/mlfoundry_run.py +1238 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/run_utils.py +102 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/services/__init__.py +0 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/services/auth_service.py +109 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/services/entities.py +108 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/services/servicefoundry_service.py +35 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/services/utils.py +122 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/session.py +271 -0
- truefoundry-0.4.0.dev0/truefoundry/ml/validation_utils.py +346 -0
- truefoundry-0.4.0.dev0/truefoundry/pydantic_v1.py +9 -0
- truefoundry-0.3.2/pyproject.toml +0 -86
- truefoundry-0.3.2/truefoundry/langchain/utils.py +0 -85
- truefoundry-0.3.2/truefoundry/ml/__init__.py +0 -6
- truefoundry-0.3.2/truefoundry/pydantic_v1.py +0 -5
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/README.md +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/agents/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/agents/base.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/agents/developer.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/agents/project_identifier.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/agents/tester.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/cli.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/constants.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/exception.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/logger.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/tools/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/tools/ask.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/tools/base.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/tools/commit.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/tools/docker_build.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/tools/docker_run.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/tools/file_type_counts.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/tools/list_files.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/tools/read_file.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/tools/send_request.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/tools/write_file.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/utils/client.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/utils/diff.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/autodeploy/utils/pydantic_compat.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/cli/__init__.py +0 -0
- {truefoundry-0.3.2/truefoundry/deploy/cli → truefoundry-0.4.0.dev0/truefoundry/common}/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/builder/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/builder/builders/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/builder/builders/dockerfile.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/dockerfile_template.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/builder/docker_service.py +0 -0
- {truefoundry-0.3.2/truefoundry/deploy/io → truefoundry-0.4.0.dev0/truefoundry/deploy/cli}/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/apply_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/build_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/build_logs_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/create_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/delete_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/deploy_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/get_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/list_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/login_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/logout_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/logs_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/patch_application_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/patch_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/redeploy_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/terminate_comand.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/commands/trigger_command.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/config.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/console.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/const.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/display_util.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/cli/util.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/core/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/core/login.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/core/logout.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/function_service/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/function_service/__main__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/function_service/app.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/function_service/build.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/function_service/remote/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/function_service/remote/context.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/function_service/remote/method.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/function_service/remote/remote.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/function_service/route.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/function_service/service.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/function_service/utils.py +0 -0
- {truefoundry-0.3.2/truefoundry/deploy/lib → truefoundry-0.4.0.dev0/truefoundry/deploy/io}/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/io/output_callback.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/io/rich_output_callback.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/json_util.py +0 -0
- {truefoundry-0.3.2/truefoundry/deploy/lib/clients → truefoundry-0.4.0.dev0/truefoundry/deploy/lib}/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/auth/auth_service_client.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/auth/credential_file_manager.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/auth/servicefoundry_session.py +0 -0
- {truefoundry-0.3.2/truefoundry/deploy/lib/dao → truefoundry-0.4.0.dev0/truefoundry/deploy/lib/clients}/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/clients/shell_client.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/clients/utils.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/const.py +0 -0
- {truefoundry-0.3.2/truefoundry/deploy/lib/model → truefoundry-0.4.0.dev0/truefoundry/deploy/lib/dao}/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/dao/application.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/dao/apply.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/dao/version.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/dao/workspace.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/logs_utils.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/messages.py +0 -0
- {truefoundry-0.3.2/truefoundry/deploy/v2 → truefoundry-0.4.0.dev0/truefoundry/deploy/lib/model}/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/model/entity.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/util.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/win32.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/v2/lib/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/v2/lib/deploy.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/v2/lib/deploy_workflow.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/v2/lib/deployable_patched_models.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/v2/lib/models.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/v2/lib/patched_models.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/v2/lib/source.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/langchain/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/langchain/deprecated.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/logger.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/version.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/workflow/__init__.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/workflow/container_task.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/workflow/example/deploy.sh +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/workflow/example/hello_world_package/workflow.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/workflow/example/package/test_workflow.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/workflow/example/truefoundry.yaml +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/workflow/example/workflow.yaml +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/workflow/map_task.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/workflow/python_task.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/workflow/task.py +0 -0
- {truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/workflow/workflow.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: truefoundry
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0.dev0
|
|
4
4
|
Summary: Truefoundry CLI
|
|
5
5
|
Author: Abhishek Choudhary
|
|
6
6
|
Author-email: abhishek@truefoundry.com
|
|
@@ -10,37 +10,44 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Provides-Extra: ml
|
|
14
13
|
Provides-Extra: workflow
|
|
15
|
-
Requires-Dist: GitPython (>=3.1.43,<
|
|
14
|
+
Requires-Dist: GitPython (>=3.1.43,<4.0.0)
|
|
16
15
|
Requires-Dist: Mako (>=1.1.6,<2.0.0)
|
|
17
|
-
Requires-Dist: PyJWT (>=2.
|
|
16
|
+
Requires-Dist: PyJWT (>=2.4.0,<3.0.0)
|
|
18
17
|
Requires-Dist: PyYAML (>=6.0.0,<7.0.0)
|
|
18
|
+
Requires-Dist: aenum (>=3.0.0,<4.0.0)
|
|
19
19
|
Requires-Dist: click (>=7.0.0,<9.0.0)
|
|
20
|
+
Requires-Dist: coolname (>=1.1.0,<2.0.0)
|
|
20
21
|
Requires-Dist: docker (>=6.1.2,<8.0.0)
|
|
21
22
|
Requires-Dist: fastapi (>=0.56.0,<0.200.0)
|
|
22
23
|
Requires-Dist: filelock (>=3.8.0,<4.0.0)
|
|
23
24
|
Requires-Dist: flytekit (==1.12.2) ; extra == "workflow"
|
|
24
|
-
Requires-Dist: gitignorefile (>=1.1.2,<
|
|
25
|
-
Requires-Dist: importlib-metadata (>=
|
|
26
|
-
Requires-Dist: importlib-resources (>=5.2.0,<
|
|
27
|
-
Requires-Dist:
|
|
25
|
+
Requires-Dist: gitignorefile (>=1.1.2,<2.0.0)
|
|
26
|
+
Requires-Dist: importlib-metadata (>=4.11.3,<9.0.0)
|
|
27
|
+
Requires-Dist: importlib-resources (>=5.2.0,<7.0.0)
|
|
28
|
+
Requires-Dist: numpy (>=1.23.0,<2.0.0) ; python_version < "3.12"
|
|
29
|
+
Requires-Dist: numpy (>=1.26.0,<2.0.0) ; python_version >= "3.12"
|
|
28
30
|
Requires-Dist: openai (>=1.16.2,<2.0.0)
|
|
29
31
|
Requires-Dist: packaging (>=20.0,<25.0)
|
|
30
|
-
Requires-Dist:
|
|
32
|
+
Requires-Dist: pandas (>=1.0.0,<3.0.0) ; python_version < "3.10"
|
|
33
|
+
Requires-Dist: pandas (>=1.4.0,<3.0.0) ; python_version >= "3.10"
|
|
34
|
+
Requires-Dist: psutil (>=5.9.0,<7.0.0)
|
|
35
|
+
Requires-Dist: pydantic (>=1.8.2,<3.0.0)
|
|
31
36
|
Requires-Dist: pygments (>=2.12.0,<3.0.0)
|
|
32
37
|
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
|
|
33
|
-
Requires-Dist: python-dotenv (>=1.0.1,<
|
|
38
|
+
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
|
|
34
39
|
Requires-Dist: python-socketio[client] (>=5.5.2,<6.0.0)
|
|
35
40
|
Requires-Dist: questionary (>=1.10.0,<2.0.0)
|
|
36
41
|
Requires-Dist: requests (>=2.31.0,<3.0.0)
|
|
37
|
-
Requires-Dist: requirements-parser (>=0.
|
|
42
|
+
Requires-Dist: requirements-parser (>=0.11.0,<0.12.0)
|
|
38
43
|
Requires-Dist: rich (>=13.7.1,<14.0.0)
|
|
39
44
|
Requires-Dist: rich-click (>=1.2.1,<2.0.0)
|
|
45
|
+
Requires-Dist: scipy (>=1.12.0,<2.0.0) ; python_version >= "3.12"
|
|
46
|
+
Requires-Dist: scipy (>=1.5.0,<2.0.0) ; python_version < "3.12"
|
|
40
47
|
Requires-Dist: tqdm (>=4.0.0,<5.0.0)
|
|
41
48
|
Requires-Dist: typing-extensions (>=3.10.0)
|
|
42
49
|
Requires-Dist: urllib3 (>=1.26.18,<3)
|
|
43
|
-
Requires-Dist: uvicorn (>=0.13.0,<0.
|
|
50
|
+
Requires-Dist: uvicorn (>=0.13.0,<1.0.0)
|
|
44
51
|
Requires-Dist: yq (>=3.1.0,<4.0.0)
|
|
45
52
|
Description-Content-Type: text/markdown
|
|
46
53
|
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "truefoundry"
|
|
3
|
+
version = "0.4.0.dev0"
|
|
4
|
+
description = "Truefoundry CLI"
|
|
5
|
+
authors = ["Abhishek Choudhary <abhishek@truefoundry.com>"]
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
|
|
8
|
+
[tool.poetry.dependencies]
|
|
9
|
+
python = ">=3.8.1,<3.13"
|
|
10
|
+
aenum = ">=3.0.0,<4.0.0"
|
|
11
|
+
click = ">=7.0.0,<9.0.0"
|
|
12
|
+
coolname = ">=1.1.0,<2.0.0"
|
|
13
|
+
docker = ">=6.1.2,<8.0.0"
|
|
14
|
+
fastapi = ">=0.56.0,<0.200.0"
|
|
15
|
+
filelock = ">=3.8.0,<4.0.0"
|
|
16
|
+
flytekit = { version = "1.12.2", optional = true }
|
|
17
|
+
gitignorefile = ">=1.1.2,<2.0.0"
|
|
18
|
+
GitPython = ">=3.1.43,<4.0.0"
|
|
19
|
+
importlib-metadata = ">=4.11.3,<9.0.0"
|
|
20
|
+
importlib-resources = ">=5.2.0,<7.0.0"
|
|
21
|
+
Mako = ">=1.1.6,<2.0.0"
|
|
22
|
+
openai = ">=1.16.2,<2.0.0"
|
|
23
|
+
packaging = ">=20.0,<25.0"
|
|
24
|
+
psutil = ">=5.9.0,<7.0.0"
|
|
25
|
+
pydantic = ">=1.8.2,<3.0.0"
|
|
26
|
+
pygments = ">=2.12.0,<3.0.0"
|
|
27
|
+
PyJWT = ">=2.4.0,<3.0.0"
|
|
28
|
+
python-dateutil = ">=2.8.2,<3.0.0"
|
|
29
|
+
python-dotenv = ">=1.0.1,<2.0.0"
|
|
30
|
+
python-socketio = { version = ">=5.5.2,<6.0.0", extras = ["client"] }
|
|
31
|
+
PyYAML = ">=6.0.0,<7.0.0"
|
|
32
|
+
questionary = ">=1.10.0,<2.0.0"
|
|
33
|
+
requests = ">=2.31.0,<3.0.0"
|
|
34
|
+
requirements-parser = ">=0.11.0,<0.12.0"
|
|
35
|
+
rich = ">=13.7.1,<14.0.0"
|
|
36
|
+
rich-click = ">=1.2.1,<2.0.0"
|
|
37
|
+
tqdm = ">=4.0.0,<5.0.0"
|
|
38
|
+
typing-extensions = ">=3.10.0"
|
|
39
|
+
urllib3 = ">=1.26.18,<3"
|
|
40
|
+
uvicorn = ">=0.13.0,<1.0.0"
|
|
41
|
+
yq = ">=3.1.0,<4.0.0"
|
|
42
|
+
# Check and try to eliminate libs below this comment
|
|
43
|
+
scipy = [
|
|
44
|
+
# This is split into two because poetry will select a version which has no wheel on python >= 3.12 :/
|
|
45
|
+
{ version = ">=1.5.0,<2.0.0", python = "<3.12" },
|
|
46
|
+
{ version = ">=1.12.0,<2.0.0", python = ">=3.12" },
|
|
47
|
+
]
|
|
48
|
+
numpy = [
|
|
49
|
+
# This is split into two because poetry will select a version which has no wheel on python >= 3.12 :/
|
|
50
|
+
{ version = ">=1.23.0,<2.0.0", python = "<3.12" },
|
|
51
|
+
{ version = ">=1.26.0,<2.0.0", python = ">=3.12" },
|
|
52
|
+
]
|
|
53
|
+
pandas = [
|
|
54
|
+
# This is split into two because poetry will select a version which has no wheel on python >= 3.10 :/
|
|
55
|
+
{ version = ">=1.0.0,<3.0.0", python = "<3.10" },
|
|
56
|
+
{ version = ">=1.4.0,<3.0.0", python = ">=3.10" },
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
[tool.poetry.extras]
|
|
61
|
+
workflow = ["flytekit"]
|
|
62
|
+
|
|
63
|
+
[tool.poetry.group.dev.dependencies]
|
|
64
|
+
Pillow = ">=9.1.1,<11.0.0"
|
|
65
|
+
ipykernel = ">=6.16.0"
|
|
66
|
+
ipython = ">=7.10.0"
|
|
67
|
+
langchain = ">=0.2.0,<0.3.0"
|
|
68
|
+
matplotlib = ">=3.0.0,<4.0.0"
|
|
69
|
+
mypy = "*"
|
|
70
|
+
plotly = ">=5.8.2,<6.0.0"
|
|
71
|
+
pre-commit = ">=3.5.0,<4.0.0"
|
|
72
|
+
pytest = ">=8.2.2,<9.0.0"
|
|
73
|
+
ruff = ">=0.4.10"
|
|
74
|
+
seaborn = ">=0.13.0,<0.14.0"
|
|
75
|
+
scikit-learn = ">=1.3.0,<2.0.0"
|
|
76
|
+
shap = [
|
|
77
|
+
{ version = ">=0.40.0", python = "<3.12" },
|
|
78
|
+
{ version = ">=0.45.0", python = ">=3.12" },
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
[tool.poetry-dynamic-versioning]
|
|
82
|
+
enable = false
|
|
83
|
+
|
|
84
|
+
[build-system]
|
|
85
|
+
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
|
|
86
|
+
build-backend = "poetry_dynamic_versioning.backend"
|
|
87
|
+
|
|
88
|
+
[tool.poetry.plugins."console_scripts"]
|
|
89
|
+
tfy = "truefoundry.cli.__main__:main"
|
|
90
|
+
truefoundry = "truefoundry.cli.__main__:main"
|
|
91
|
+
|
|
92
|
+
[tool.ruff]
|
|
93
|
+
lint.select = [
|
|
94
|
+
"E", # pycodestyle errors
|
|
95
|
+
"W", # pycodestyle warnings
|
|
96
|
+
"F", # pyflakes
|
|
97
|
+
"C", # flake8-comprehensions
|
|
98
|
+
"B", # flake8-bugbear
|
|
99
|
+
"Q", # flake8-quotes
|
|
100
|
+
"I",
|
|
101
|
+
]
|
|
102
|
+
lint.ignore = ["E501"]
|
|
103
|
+
exclude = ["venv", "repos"]
|
|
104
|
+
|
|
105
|
+
[tool.ruff.lint.per-file-ignores]
|
|
106
|
+
"__init__.py" = ["F401"]
|
|
107
|
+
"truefoundry/ml/autogen/client/*" = ["B028", "B904", "C901", "C409", "F841"]
|
|
108
|
+
"truefoundry/ml/autogen/client/models/*" = ["F821"]
|
|
109
|
+
"truefoundry/ml/autogen/client/api_client.py" = ["E721"]
|
|
110
|
+
|
|
111
|
+
[tool.mypy]
|
|
112
|
+
plugins = [
|
|
113
|
+
"pydantic.mypy"
|
|
114
|
+
]
|
|
115
|
+
install_types = true
|
|
116
|
+
non_interactive = true
|
|
117
|
+
|
|
118
|
+
allow_redefinition = false
|
|
119
|
+
allow_untyped_globals = false
|
|
120
|
+
check_untyped_defs = true
|
|
121
|
+
disallow_any_generics = true
|
|
122
|
+
disallow_incomplete_defs = false
|
|
123
|
+
disallow_subclassing_any = true
|
|
124
|
+
disallow_untyped_calls = false
|
|
125
|
+
disallow_untyped_decorators = false
|
|
126
|
+
disallow_untyped_defs = false
|
|
127
|
+
follow_imports = "silent"
|
|
128
|
+
force_uppercase_builtins = true
|
|
129
|
+
no_implicit_optional = true
|
|
130
|
+
no_implicit_reexport = true
|
|
131
|
+
strict_equality = true
|
|
132
|
+
strict_optional = true
|
|
133
|
+
warn_no_return = true
|
|
134
|
+
warn_redundant_casts = true
|
|
135
|
+
warn_return_any = true
|
|
136
|
+
warn_unreachable = true
|
|
137
|
+
warn_unused_ignores = true
|
|
138
|
+
|
|
139
|
+
packages = [
|
|
140
|
+
"truefoundry.ml",
|
|
141
|
+
]
|
|
142
|
+
exclude = [
|
|
143
|
+
"^truefoundry/ml/autogen",
|
|
144
|
+
"^truefoundry/deploy/auto_gen",
|
|
145
|
+
"^truefoundry/pydantic_v1.py$",
|
|
146
|
+
]
|
|
147
|
+
disable_error_code = [
|
|
148
|
+
"import-untyped",
|
|
149
|
+
]
|
|
150
|
+
|
|
151
|
+
[tool.pydantic-mypy]
|
|
152
|
+
init_forbid_extra = true
|
|
153
|
+
init_typed = true
|
|
154
|
+
warn_required_dynamic_aliases = true
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
|
|
3
|
-
import click
|
|
3
|
+
import rich_click as click
|
|
4
4
|
|
|
5
5
|
from truefoundry.deploy.cli.cli import create_truefoundry_cli
|
|
6
|
-
|
|
7
|
-
MLFOUNDRY_INSTALLED = True
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
try:
|
|
11
|
-
from mlfoundry.cli.commands import download
|
|
12
|
-
except ImportError:
|
|
13
|
-
MLFOUNDRY_INSTALLED = False
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@click.group()
|
|
17
|
-
def ml():
|
|
18
|
-
"""MlFoundry CLI"""
|
|
6
|
+
from truefoundry.ml.cli.cli import get_ml_cli
|
|
19
7
|
|
|
20
8
|
|
|
21
9
|
def main():
|
|
@@ -25,9 +13,7 @@ def main():
|
|
|
25
13
|
# If it is another kind of object, it will be printed and the system exit status will be one (i.e., failure).
|
|
26
14
|
try:
|
|
27
15
|
cli = create_truefoundry_cli()
|
|
28
|
-
|
|
29
|
-
ml.add_command(download)
|
|
30
|
-
cli.add_command(ml)
|
|
16
|
+
cli.add_command(get_ml_cli())
|
|
31
17
|
except Exception as e:
|
|
32
18
|
raise click.exceptions.UsageError(message=str(e)) from e
|
|
33
19
|
sys.exit(cli())
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
from requests.adapters import HTTPAdapter
|
|
3
|
+
from urllib3 import Retry
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def urllib3_retry(
|
|
7
|
+
retries=5,
|
|
8
|
+
backoff_factor=0.3,
|
|
9
|
+
status_forcelist=(408, 429, 500, 502, 503, 504),
|
|
10
|
+
method_whitelist=frozenset({"GET", "POST"}),
|
|
11
|
+
):
|
|
12
|
+
retry = Retry(
|
|
13
|
+
total=retries,
|
|
14
|
+
read=retries,
|
|
15
|
+
connect=retries,
|
|
16
|
+
status=retries,
|
|
17
|
+
backoff_factor=backoff_factor,
|
|
18
|
+
allowed_methods=method_whitelist,
|
|
19
|
+
status_forcelist=status_forcelist,
|
|
20
|
+
respect_retry_after_header=True,
|
|
21
|
+
)
|
|
22
|
+
return retry
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def requests_retry_session(
|
|
26
|
+
retries=5,
|
|
27
|
+
backoff_factor=0.3,
|
|
28
|
+
status_forcelist=(408, 429, 500, 502, 503, 504),
|
|
29
|
+
method_whitelist=frozenset({"GET", "POST"}),
|
|
30
|
+
session=None,
|
|
31
|
+
):
|
|
32
|
+
"""
|
|
33
|
+
Returns a `requests` session with retry capabilities for certain HTTP status codes.
|
|
34
|
+
|
|
35
|
+
Args:
|
|
36
|
+
retries (int): The number of retries for HTTP requests.
|
|
37
|
+
backoff_factor (float): The backoff factor for exponential backoff during retries.
|
|
38
|
+
status_forcelist (tuple): A tuple of HTTP status codes that should trigger a retry.
|
|
39
|
+
method_whitelist (frozenset): The set of HTTP methods that should be retried.
|
|
40
|
+
session (requests.Session, optional): An optional existing requests session to use.
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
requests.Session: A session with retry capabilities.
|
|
44
|
+
"""
|
|
45
|
+
# Implementation taken from https://www.peterbe.com/plog/best-practice-with-retries-with-requests
|
|
46
|
+
session = session or requests.Session()
|
|
47
|
+
retry = urllib3_retry(
|
|
48
|
+
retries=retries,
|
|
49
|
+
backoff_factor=backoff_factor,
|
|
50
|
+
status_forcelist=status_forcelist,
|
|
51
|
+
method_whitelist=method_whitelist,
|
|
52
|
+
)
|
|
53
|
+
adapter = HTTPAdapter(max_retries=retry)
|
|
54
|
+
session.mount("http://", adapter)
|
|
55
|
+
session.mount("https://", adapter)
|
|
56
|
+
return session
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: application.json
|
|
3
|
-
# timestamp: 2024-09-
|
|
3
|
+
# timestamp: 2024-09-19T11:05:06+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -444,6 +444,30 @@ class Image(BaseModel):
|
|
|
444
444
|
)
|
|
445
445
|
|
|
446
446
|
|
|
447
|
+
class JobAlert(BaseModel):
|
|
448
|
+
"""
|
|
449
|
+
+docs=Describes the configuration for the job alerts
|
|
450
|
+
+label=Alert
|
|
451
|
+
"""
|
|
452
|
+
|
|
453
|
+
notification_channel: str = Field(
|
|
454
|
+
...,
|
|
455
|
+
description='+label=Notification Channel\n+usage=Specify the notification channel to send alerts to\n+uiType=IntegrationSelect\n+uiProps={"integrationType":"notification-channel"}\n+sort=660',
|
|
456
|
+
)
|
|
457
|
+
on_start: bool = Field(
|
|
458
|
+
False,
|
|
459
|
+
description="+label=On Start\n+usage=Send an alert when the job starts\n+sort=670",
|
|
460
|
+
)
|
|
461
|
+
on_completion: bool = Field(
|
|
462
|
+
False,
|
|
463
|
+
description="+label=On Completion\n+usage=Send an alert when the job completes\n+sort=680",
|
|
464
|
+
)
|
|
465
|
+
on_failure: bool = Field(
|
|
466
|
+
True,
|
|
467
|
+
description="+label=On Failure\n+usage=Send an alert when the job fails\n+sort=690",
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
|
|
447
471
|
class KafkaMetricConfig(BaseModel):
|
|
448
472
|
type: Literal["kafka"] = Field(..., description="+value=kafka")
|
|
449
473
|
lag_threshold: conint(ge=1) = Field(
|
|
@@ -1350,6 +1374,10 @@ class Job(BaseModel):
|
|
|
1350
1374
|
description="+label=Environment Variables\n+usage=Configure environment variables to be injected in the service either as plain text or secrets. [Docs](https://docs.truefoundry.com/docs/env-variables)\n+icon=fa-globe\n+sort=500",
|
|
1351
1375
|
)
|
|
1352
1376
|
resources: Optional[Resources] = None
|
|
1377
|
+
alerts: Optional[List[JobAlert]] = Field(
|
|
1378
|
+
None,
|
|
1379
|
+
description="+label=Alerts\n+usage=Configure alerts to be sent when the job starts/fails/completes\n+icon=fa-bell\n+sort=650",
|
|
1380
|
+
)
|
|
1353
1381
|
retries: conint(ge=0, le=10) = Field(
|
|
1354
1382
|
0,
|
|
1355
1383
|
description="+label=Retries\n+usage=Specify the maximum number of attempts to retry a job before it is marked as failed.\n+icon=fa-repeat\n+sort=700",
|
|
@@ -24,7 +24,7 @@ from truefoundry.version import __version__
|
|
|
24
24
|
click.rich_click.USE_RICH_MARKUP = True
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
def create_truefoundry_cli():
|
|
27
|
+
def create_truefoundry_cli() -> click.MultiCommand:
|
|
28
28
|
"""Generates CLI by combining all subcommands into a main CLI and returns in
|
|
29
29
|
|
|
30
30
|
Returns:
|
{truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/auth/credential_provider.py
RENAMED
|
@@ -31,10 +31,6 @@ class CredentialProvider(ABC):
|
|
|
31
31
|
|
|
32
32
|
class EnvCredentialProvider(CredentialProvider):
|
|
33
33
|
def __init__(self) -> None:
|
|
34
|
-
from truefoundry.deploy.lib.clients.servicefoundry_client import (
|
|
35
|
-
ServiceFoundryServiceClient,
|
|
36
|
-
)
|
|
37
|
-
|
|
38
34
|
logger.debug("Using env var credential provider")
|
|
39
35
|
api_key = os.getenv(API_KEY_ENV_NAME)
|
|
40
36
|
if not api_key:
|
|
@@ -45,13 +41,7 @@ class EnvCredentialProvider(CredentialProvider):
|
|
|
45
41
|
base_url = resolve_base_url().strip("/")
|
|
46
42
|
self._host = base_url
|
|
47
43
|
self._auth_service = AuthServiceClient.from_base_url(base_url=base_url)
|
|
48
|
-
|
|
49
|
-
servicefoundry_client = ServiceFoundryServiceClient(
|
|
50
|
-
init_session=False, base_url=base_url
|
|
51
|
-
)
|
|
52
|
-
self._token: Token = servicefoundry_client.get_token_from_api_key(
|
|
53
|
-
api_key=api_key
|
|
54
|
-
)
|
|
44
|
+
self._token: Token = Token(access_token=api_key, refresh_token=None)
|
|
55
45
|
|
|
56
46
|
@staticmethod
|
|
57
47
|
def can_provide() -> bool:
|
|
@@ -123,7 +113,7 @@ class FileCredentialProvider(CredentialProvider):
|
|
|
123
113
|
return self.token
|
|
124
114
|
|
|
125
115
|
raise Exception(
|
|
126
|
-
"Credentials on disk changed while
|
|
116
|
+
"Credentials on disk changed while truefoundry was running."
|
|
127
117
|
)
|
|
128
118
|
|
|
129
119
|
@property
|
{truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/deploy/lib/clients/servicefoundry_client.py
RENAMED
|
@@ -28,7 +28,6 @@ from truefoundry.deploy.lib.model.entity import (
|
|
|
28
28
|
JobRun,
|
|
29
29
|
PythonSDKConfig,
|
|
30
30
|
TenantInfo,
|
|
31
|
-
Token,
|
|
32
31
|
TriggerJobResult,
|
|
33
32
|
Workspace,
|
|
34
33
|
WorkspaceResources,
|
|
@@ -712,14 +711,6 @@ class ServiceFoundryServiceClient:
|
|
|
712
711
|
response = request_handling(res)
|
|
713
712
|
return parse_obj_as(List[Deployment], response)
|
|
714
713
|
|
|
715
|
-
@check_min_cli_version
|
|
716
|
-
def get_token_from_api_key(self, api_key: str) -> Token:
|
|
717
|
-
url = f"{self._api_server_url}/{VERSION_PREFIX}/oauth/api-key/token"
|
|
718
|
-
data = {"apiKey": api_key}
|
|
719
|
-
res = requests.get(url, params=data)
|
|
720
|
-
res = request_handling(res)
|
|
721
|
-
return Token.parse_obj(res)
|
|
722
|
-
|
|
723
714
|
@check_min_cli_version
|
|
724
715
|
def apply(self, manifest: Dict[str, Any]) -> None:
|
|
725
716
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/apply"
|
|
@@ -6,13 +6,11 @@ class BadRequestException(Exception):
|
|
|
6
6
|
super().__init__()
|
|
7
7
|
self.status_code = status_code
|
|
8
8
|
self.message = message
|
|
9
|
+
self.status_code = status_code
|
|
9
10
|
|
|
10
11
|
def __str__(self):
|
|
11
12
|
return self.message
|
|
12
13
|
|
|
13
|
-
def __repr__(self):
|
|
14
|
-
return self.message
|
|
15
|
-
|
|
16
14
|
|
|
17
15
|
class ConfigurationException(Exception):
|
|
18
16
|
def __init__(self, message: Optional[str] = None):
|
|
@@ -21,6 +19,3 @@ class ConfigurationException(Exception):
|
|
|
21
19
|
|
|
22
20
|
def __str__(self):
|
|
23
21
|
return self.message
|
|
24
|
-
|
|
25
|
-
def __repr__(self):
|
|
26
|
-
return self.message
|
|
@@ -7,9 +7,6 @@ from truefoundry.deploy.io.output_callback import OutputCallBack
|
|
|
7
7
|
from truefoundry.deploy.lib.auth.auth_service_client import AuthServiceClient
|
|
8
8
|
from truefoundry.deploy.lib.auth.credential_file_manager import CredentialsFileManager
|
|
9
9
|
from truefoundry.deploy.lib.auth.credential_provider import EnvCredentialProvider
|
|
10
|
-
from truefoundry.deploy.lib.clients.servicefoundry_client import (
|
|
11
|
-
ServiceFoundryServiceClient,
|
|
12
|
-
)
|
|
13
10
|
from truefoundry.deploy.lib.clients.utils import resolve_base_url
|
|
14
11
|
from truefoundry.deploy.lib.const import (
|
|
15
12
|
API_KEY_ENV_NAME,
|
|
@@ -85,12 +82,7 @@ def login(
|
|
|
85
82
|
return False
|
|
86
83
|
|
|
87
84
|
if api_key:
|
|
88
|
-
|
|
89
|
-
init_session=False, base_url=host
|
|
90
|
-
)
|
|
91
|
-
token = _login_with_api_key(
|
|
92
|
-
api_key=api_key, servicefoundry_client=servicefoundry_client
|
|
93
|
-
)
|
|
85
|
+
token = Token(access_token=api_key, refresh_token=None)
|
|
94
86
|
else:
|
|
95
87
|
auth_service = AuthServiceClient.from_base_url(base_url=host)
|
|
96
88
|
# interactive login
|
|
@@ -122,13 +114,6 @@ def logout(
|
|
|
122
114
|
output_hook.print_line(PROMPT_ALREADY_LOGGED_OUT)
|
|
123
115
|
|
|
124
116
|
|
|
125
|
-
def _login_with_api_key(
|
|
126
|
-
api_key: str, servicefoundry_client: ServiceFoundryServiceClient
|
|
127
|
-
) -> Token:
|
|
128
|
-
logger.debug("Logging in with api key")
|
|
129
|
-
return servicefoundry_client.get_token_from_api_key(api_key=api_key)
|
|
130
|
-
|
|
131
|
-
|
|
132
117
|
def _login_with_device_code(
|
|
133
118
|
base_url: str,
|
|
134
119
|
auth_service: AuthServiceClient,
|
|
File without changes
|
|
@@ -10,8 +10,8 @@ from langchain.schema.messages import (
|
|
|
10
10
|
SystemMessage,
|
|
11
11
|
)
|
|
12
12
|
|
|
13
|
+
from truefoundry.common.request_utils import requests_retry_session
|
|
13
14
|
from truefoundry.langchain.utils import (
|
|
14
|
-
requests_retry_session,
|
|
15
15
|
validate_tfy_environment,
|
|
16
16
|
)
|
|
17
17
|
from truefoundry.logger import logger
|
{truefoundry-0.3.2 → truefoundry-0.4.0.dev0}/truefoundry/langchain/truefoundry_embeddings.py
RENAMED
|
@@ -6,8 +6,8 @@ import tqdm
|
|
|
6
6
|
from langchain.embeddings.base import Embeddings
|
|
7
7
|
from langchain.pydantic_v1 import BaseModel, Extra, Field, root_validator
|
|
8
8
|
|
|
9
|
+
from truefoundry.common.request_utils import requests_retry_session
|
|
9
10
|
from truefoundry.langchain.utils import (
|
|
10
|
-
requests_retry_session,
|
|
11
11
|
validate_tfy_environment,
|
|
12
12
|
)
|
|
13
13
|
from truefoundry.logger import logger
|
|
@@ -3,8 +3,8 @@ from typing import Any, Dict, List, Optional
|
|
|
3
3
|
from langchain.llms.base import LLM
|
|
4
4
|
from langchain.pydantic_v1 import Extra, Field, root_validator
|
|
5
5
|
|
|
6
|
+
from truefoundry.common.request_utils import requests_retry_session
|
|
6
7
|
from truefoundry.langchain.utils import (
|
|
7
|
-
requests_retry_session,
|
|
8
8
|
validate_tfy_environment,
|
|
9
9
|
)
|
|
10
10
|
from truefoundry.logger import logger
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from typing import Dict, List, Optional
|
|
3
|
+
from urllib.parse import urljoin
|
|
4
|
+
|
|
5
|
+
from langchain.pydantic_v1 import BaseModel
|
|
6
|
+
|
|
7
|
+
from truefoundry.deploy.lib.auth.servicefoundry_session import ServiceFoundrySession
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ModelParameters(BaseModel):
|
|
11
|
+
temperature: Optional[float]
|
|
12
|
+
maximum_length: Optional[int]
|
|
13
|
+
top_p: Optional[float]
|
|
14
|
+
top_k: Optional[int]
|
|
15
|
+
repetition_penalty: Optional[float]
|
|
16
|
+
frequency_penalty: Optional[float]
|
|
17
|
+
presence_penalty: Optional[float]
|
|
18
|
+
stop_sequences: Optional[List[str]]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def validate_tfy_environment(values: Dict):
|
|
22
|
+
gateway_url = values["tfy_llm_gateway_url"] or os.getenv("TFY_LLM_GATEWAY_URL")
|
|
23
|
+
api_key = values["tfy_api_key"] or os.getenv("TFY_API_KEY")
|
|
24
|
+
|
|
25
|
+
if gateway_url and api_key:
|
|
26
|
+
values["tfy_llm_gateway_url"] = gateway_url
|
|
27
|
+
values["tfy_api_key"] = api_key
|
|
28
|
+
return values
|
|
29
|
+
|
|
30
|
+
sfy_session = ServiceFoundrySession()
|
|
31
|
+
if not sfy_session:
|
|
32
|
+
raise Exception(
|
|
33
|
+
"Unauthenticated: Please login using truefoundry login --host <https://example-domain.com>"
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
if not gateway_url:
|
|
37
|
+
gateway_url = urljoin(sfy_session.base_url, "/api/llm")
|
|
38
|
+
|
|
39
|
+
if not api_key:
|
|
40
|
+
api_key = sfy_session.access_token
|
|
41
|
+
|
|
42
|
+
values["tfy_llm_gateway_url"] = gateway_url
|
|
43
|
+
values["tfy_api_key"] = api_key
|
|
44
|
+
return values
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from truefoundry.ml.autogen.client import ( # type: ignore[attr-defined]
|
|
2
|
+
FeatureDto as Feature,
|
|
3
|
+
)
|
|
4
|
+
from truefoundry.ml.enums import (
|
|
5
|
+
DataSlice,
|
|
6
|
+
FileFormat,
|
|
7
|
+
ModelFramework,
|
|
8
|
+
ModelType,
|
|
9
|
+
ViewType,
|
|
10
|
+
)
|
|
11
|
+
from truefoundry.ml.exceptions import MlFoundryException
|
|
12
|
+
from truefoundry.ml.log_types import Image, Plot
|
|
13
|
+
from truefoundry.ml.log_types.artifacts.artifact import ArtifactPath, ArtifactVersion
|
|
14
|
+
from truefoundry.ml.log_types.artifacts.dataset import DataDirectory, DataDirectoryPath
|
|
15
|
+
from truefoundry.ml.log_types.artifacts.model import (
|
|
16
|
+
ModelVersion,
|
|
17
|
+
)
|
|
18
|
+
from truefoundry.ml.log_types.artifacts.model_extras import CustomMetric, ModelSchema
|
|
19
|
+
from truefoundry.ml.logger import init_logger
|
|
20
|
+
from truefoundry.ml.login import login
|
|
21
|
+
from truefoundry.ml.mlfoundry_api import get_client
|
|
22
|
+
from truefoundry.ml.mlfoundry_run import MlFoundryRun
|
|
23
|
+
|
|
24
|
+
__all__ = [
|
|
25
|
+
"ArtifactPath",
|
|
26
|
+
"ArtifactVersion",
|
|
27
|
+
"CustomMetric",
|
|
28
|
+
"DataDirectory",
|
|
29
|
+
"DataDirectoryPath",
|
|
30
|
+
"DataSlice",
|
|
31
|
+
"Feature",
|
|
32
|
+
"FileFormat",
|
|
33
|
+
"Image",
|
|
34
|
+
"MlFoundryRun",
|
|
35
|
+
"MlFoundryException",
|
|
36
|
+
"ModelFramework",
|
|
37
|
+
"ModelSchema",
|
|
38
|
+
"ModelType",
|
|
39
|
+
"ModelVersion",
|
|
40
|
+
"Plot",
|
|
41
|
+
"ViewType",
|
|
42
|
+
"get_client",
|
|
43
|
+
"login",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
init_logger()
|
|
File without changes
|