truefoundry 0.3.4__tar.gz → 0.4.0__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.

Files changed (350) hide show
  1. {truefoundry-0.3.4 → truefoundry-0.4.0}/PKG-INFO +21 -14
  2. {truefoundry-0.3.4 → truefoundry-0.4.0}/README.md +2 -2
  3. truefoundry-0.4.0/pyproject.toml +156 -0
  4. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/__init__.py +2 -0
  5. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/agents/developer.py +1 -1
  6. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/agents/project_identifier.py +2 -2
  7. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/agents/tester.py +1 -1
  8. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/cli.py +1 -1
  9. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/tools/list_files.py +1 -1
  10. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/cli/__main__.py +3 -17
  11. {truefoundry-0.3.4/truefoundry/deploy/lib/auth → truefoundry-0.4.0/truefoundry/common}/auth_service_client.py +50 -40
  12. truefoundry-0.4.0/truefoundry/common/constants.py +12 -0
  13. {truefoundry-0.3.4/truefoundry/deploy/lib/auth → truefoundry-0.4.0/truefoundry/common}/credential_file_manager.py +7 -7
  14. {truefoundry-0.3.4/truefoundry/deploy/lib/auth → truefoundry-0.4.0/truefoundry/common}/credential_provider.py +10 -23
  15. truefoundry-0.4.0/truefoundry/common/entities.py +124 -0
  16. truefoundry-0.4.0/truefoundry/common/exceptions.py +12 -0
  17. truefoundry-0.4.0/truefoundry/common/request_utils.py +84 -0
  18. truefoundry-0.4.0/truefoundry/common/servicefoundry_client.py +91 -0
  19. truefoundry-0.4.0/truefoundry/common/utils.py +56 -0
  20. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/auto_gen/models.py +4 -6
  21. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/cli.py +3 -1
  22. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/apply_command.py +1 -1
  23. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/build_command.py +1 -1
  24. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/deploy_command.py +1 -1
  25. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/login_command.py +2 -2
  26. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/patch_application_command.py +1 -1
  27. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/patch_command.py +1 -1
  28. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/terminate_comand.py +1 -1
  29. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/util.py +1 -1
  30. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/function_service/remote/remote.py +1 -1
  31. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/auth/servicefoundry_session.py +2 -2
  32. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/clients/servicefoundry_client.py +120 -159
  33. truefoundry-0.4.0/truefoundry/deploy/lib/const.py +9 -0
  34. truefoundry-0.4.0/truefoundry/deploy/lib/exceptions.py +10 -0
  35. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/model/entity.py +1 -112
  36. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/session.py +14 -42
  37. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/util.py +0 -37
  38. {truefoundry-0.3.4/truefoundry → truefoundry-0.4.0/truefoundry/deploy}/python_deploy_codegen.py +2 -2
  39. truefoundry-0.4.0/truefoundry/deploy/v2/__init__.py +0 -0
  40. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/v2/lib/deploy.py +3 -3
  41. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/v2/lib/deployable_patched_models.py +1 -1
  42. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/langchain/truefoundry_chat.py +1 -1
  43. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/langchain/truefoundry_embeddings.py +1 -1
  44. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/langchain/truefoundry_llm.py +1 -1
  45. truefoundry-0.4.0/truefoundry/langchain/utils.py +44 -0
  46. truefoundry-0.4.0/truefoundry/ml/__init__.py +37 -0
  47. truefoundry-0.4.0/truefoundry/ml/artifact/__init__.py +0 -0
  48. truefoundry-0.4.0/truefoundry/ml/artifact/truefoundry_artifact_repo.py +1161 -0
  49. truefoundry-0.4.0/truefoundry/ml/autogen/__init__.py +0 -0
  50. truefoundry-0.4.0/truefoundry/ml/autogen/client/__init__.py +370 -0
  51. truefoundry-0.4.0/truefoundry/ml/autogen/client/api/__init__.py +16 -0
  52. truefoundry-0.4.0/truefoundry/ml/autogen/client/api/auth_api.py +184 -0
  53. truefoundry-0.4.0/truefoundry/ml/autogen/client/api/deprecated_api.py +605 -0
  54. truefoundry-0.4.0/truefoundry/ml/autogen/client/api/experiments_api.py +1944 -0
  55. truefoundry-0.4.0/truefoundry/ml/autogen/client/api/health_api.py +299 -0
  56. truefoundry-0.4.0/truefoundry/ml/autogen/client/api/metrics_api.py +371 -0
  57. truefoundry-0.4.0/truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +7213 -0
  58. truefoundry-0.4.0/truefoundry/ml/autogen/client/api/python_deployment_config_api.py +201 -0
  59. truefoundry-0.4.0/truefoundry/ml/autogen/client/api/run_artifacts_api.py +231 -0
  60. truefoundry-0.4.0/truefoundry/ml/autogen/client/api/runs_api.py +2919 -0
  61. truefoundry-0.4.0/truefoundry/ml/autogen/client/api_client.py +822 -0
  62. truefoundry-0.4.0/truefoundry/ml/autogen/client/api_response.py +30 -0
  63. truefoundry-0.4.0/truefoundry/ml/autogen/client/configuration.py +489 -0
  64. truefoundry-0.4.0/truefoundry/ml/autogen/client/exceptions.py +161 -0
  65. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/__init__.py +341 -0
  66. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/add_custom_metrics_to_model_version_request_dto.py +69 -0
  67. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py +83 -0
  68. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/agent.py +125 -0
  69. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/agent_app.py +118 -0
  70. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/agent_open_api_tool.py +143 -0
  71. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +144 -0
  72. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/agent_with_fqn.py +127 -0
  73. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/artifact_dto.py +115 -0
  74. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/artifact_response_dto.py +75 -0
  75. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/artifact_type.py +39 -0
  76. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/artifact_version_dto.py +141 -0
  77. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/artifact_version_response_dto.py +77 -0
  78. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/artifact_version_status.py +35 -0
  79. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/assistant_message.py +89 -0
  80. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/authorize_user_for_model_request_dto.py +69 -0
  81. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/authorize_user_for_model_version_request_dto.py +69 -0
  82. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/blob_storage_reference.py +93 -0
  83. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/body_get_search_runs_get.py +72 -0
  84. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/chat_prompt.py +156 -0
  85. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/chat_prompt_messages_inner.py +171 -0
  86. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/columns_dto.py +73 -0
  87. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/content.py +153 -0
  88. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/content1.py +153 -0
  89. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/content2.py +174 -0
  90. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/content2_any_of_inner.py +150 -0
  91. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_artifact_request_dto.py +74 -0
  92. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_artifact_response_dto.py +65 -0
  93. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_artifact_version_request_dto.py +74 -0
  94. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +65 -0
  95. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_dataset_request_dto.py +76 -0
  96. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_experiment_request_dto.py +94 -0
  97. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_experiment_response_dto.py +67 -0
  98. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_model_version_request_dto.py +95 -0
  99. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_request_dto.py +73 -0
  100. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_response_dto.py +79 -0
  101. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_multi_part_upload_request_dto.py +73 -0
  102. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_python_deployment_config_request_dto.py +72 -0
  103. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_python_deployment_config_response_dto.py +67 -0
  104. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_run_request_dto.py +97 -0
  105. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/create_run_response_dto.py +75 -0
  106. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/dataset_dto.py +112 -0
  107. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/dataset_response_dto.py +75 -0
  108. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/delete_artifact_versions_request_dto.py +65 -0
  109. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/delete_dataset_request_dto.py +74 -0
  110. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/delete_model_version_request_dto.py +65 -0
  111. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/delete_run_request.py +65 -0
  112. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/delete_tag_request_dto.py +68 -0
  113. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/experiment_dto.py +127 -0
  114. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/experiment_id_request_dto.py +67 -0
  115. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/experiment_response_dto.py +75 -0
  116. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/experiment_tag_dto.py +69 -0
  117. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/feature_dto.py +68 -0
  118. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/feature_value_type.py +35 -0
  119. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/file_info_dto.py +76 -0
  120. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +101 -0
  121. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_experiment_response_dto.py +88 -0
  122. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_latest_run_log_response_dto.py +75 -0
  123. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_metric_history_response.py +79 -0
  124. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_signed_url_for_dataset_write_request_dto.py +68 -0
  125. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +68 -0
  126. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +81 -0
  127. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +69 -0
  128. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +83 -0
  129. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_request_dto.py +68 -0
  130. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_response_dto.py +81 -0
  131. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_write_response_dto.py +81 -0
  132. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/get_tenant_id_response_dto.py +73 -0
  133. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/http_validation_error.py +82 -0
  134. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/image_content_part.py +87 -0
  135. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/image_url.py +75 -0
  136. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/internal_metadata.py +180 -0
  137. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/latest_run_log_dto.py +78 -0
  138. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_artifact_versions_request_dto.py +107 -0
  139. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_artifact_versions_response_dto.py +87 -0
  140. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_artifacts_request_dto.py +96 -0
  141. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_artifacts_response_dto.py +86 -0
  142. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_colums_response_dto.py +75 -0
  143. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_datasets_request_dto.py +78 -0
  144. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_datasets_response_dto.py +86 -0
  145. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_experiments_response_dto.py +86 -0
  146. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_files_for_artifact_version_request_dto.py +76 -0
  147. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_files_for_artifact_versions_response_dto.py +82 -0
  148. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_files_for_dataset_request_dto.py +76 -0
  149. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_files_for_dataset_response_dto.py +82 -0
  150. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_latest_run_logs_response_dto.py +82 -0
  151. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_metric_history_request_dto.py +69 -0
  152. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_metric_history_response_dto.py +84 -0
  153. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_model_version_response_dto.py +87 -0
  154. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_model_versions_request_dto.py +93 -0
  155. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_models_request_dto.py +89 -0
  156. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_models_response_dto.py +84 -0
  157. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_run_artifacts_response_dto.py +84 -0
  158. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_run_logs_response_dto.py +82 -0
  159. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/list_seed_experiments_response_dto.py +81 -0
  160. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/log_batch_request_dto.py +106 -0
  161. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/log_metric_request_dto.py +80 -0
  162. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/log_param_request_dto.py +76 -0
  163. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/method.py +37 -0
  164. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/metric_collection_dto.py +82 -0
  165. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/metric_dto.py +76 -0
  166. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/mime_type.py +37 -0
  167. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/model_configuration.py +103 -0
  168. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/model_dto.py +122 -0
  169. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/model_response_dto.py +75 -0
  170. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/model_schema_dto.py +85 -0
  171. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/model_version_dto.py +170 -0
  172. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/model_version_response_dto.py +75 -0
  173. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/multi_part_upload_dto.py +107 -0
  174. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/multi_part_upload_response_dto.py +79 -0
  175. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/multi_part_upload_storage_provider.py +34 -0
  176. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/notify_artifact_version_failure_dto.py +65 -0
  177. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/openapi_spec.py +152 -0
  178. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/param_dto.py +66 -0
  179. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/parameters.py +84 -0
  180. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/prediction_type.py +34 -0
  181. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/resolve_agent_app_response_dto.py +75 -0
  182. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/restore_run_request_dto.py +65 -0
  183. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/run_data_dto.py +104 -0
  184. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/run_dto.py +84 -0
  185. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/run_info_dto.py +105 -0
  186. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/run_log_dto.py +90 -0
  187. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/run_log_input_dto.py +80 -0
  188. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/run_response_dto.py +75 -0
  189. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/run_tag_dto.py +66 -0
  190. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/search_runs_request_dto.py +94 -0
  191. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/search_runs_response_dto.py +84 -0
  192. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/set_experiment_tag_request_dto.py +73 -0
  193. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/set_tag_request_dto.py +76 -0
  194. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/signed_url_dto.py +69 -0
  195. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/stop.py +152 -0
  196. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/store_run_logs_request_dto.py +83 -0
  197. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/system_message.py +89 -0
  198. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/text.py +153 -0
  199. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/text_content_part.py +84 -0
  200. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/update_artifact_version_request_dto.py +74 -0
  201. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/update_dataset_request_dto.py +74 -0
  202. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/update_experiment_request_dto.py +74 -0
  203. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +93 -0
  204. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/update_run_request_dto.py +78 -0
  205. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/update_run_response_dto.py +75 -0
  206. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/url.py +153 -0
  207. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/user_message.py +89 -0
  208. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/validation_error.py +87 -0
  209. truefoundry-0.4.0/truefoundry/ml/autogen/client/models/validation_error_loc_inner.py +154 -0
  210. truefoundry-0.4.0/truefoundry/ml/autogen/client/rest.py +426 -0
  211. truefoundry-0.4.0/truefoundry/ml/autogen/client_README.md +320 -0
  212. truefoundry-0.4.0/truefoundry/ml/cli/__init__.py +0 -0
  213. truefoundry-0.4.0/truefoundry/ml/cli/cli.py +18 -0
  214. truefoundry-0.4.0/truefoundry/ml/cli/commands/__init__.py +3 -0
  215. truefoundry-0.4.0/truefoundry/ml/cli/commands/download.py +87 -0
  216. truefoundry-0.4.0/truefoundry/ml/clients/__init__.py +0 -0
  217. truefoundry-0.4.0/truefoundry/ml/clients/entities.py +8 -0
  218. truefoundry-0.4.0/truefoundry/ml/clients/servicefoundry_client.py +45 -0
  219. truefoundry-0.4.0/truefoundry/ml/clients/utils.py +122 -0
  220. truefoundry-0.4.0/truefoundry/ml/constants.py +84 -0
  221. truefoundry-0.4.0/truefoundry/ml/entities.py +62 -0
  222. truefoundry-0.4.0/truefoundry/ml/enums.py +70 -0
  223. truefoundry-0.4.0/truefoundry/ml/env_vars.py +9 -0
  224. truefoundry-0.4.0/truefoundry/ml/exceptions.py +8 -0
  225. truefoundry-0.4.0/truefoundry/ml/git_info.py +60 -0
  226. truefoundry-0.4.0/truefoundry/ml/internal_namespace.py +52 -0
  227. truefoundry-0.4.0/truefoundry/ml/log_types/__init__.py +4 -0
  228. truefoundry-0.4.0/truefoundry/ml/log_types/artifacts/artifact.py +431 -0
  229. truefoundry-0.4.0/truefoundry/ml/log_types/artifacts/constants.py +33 -0
  230. truefoundry-0.4.0/truefoundry/ml/log_types/artifacts/dataset.py +384 -0
  231. truefoundry-0.4.0/truefoundry/ml/log_types/artifacts/general_artifact.py +110 -0
  232. truefoundry-0.4.0/truefoundry/ml/log_types/artifacts/model.py +611 -0
  233. truefoundry-0.4.0/truefoundry/ml/log_types/artifacts/model_extras.py +48 -0
  234. truefoundry-0.4.0/truefoundry/ml/log_types/artifacts/utils.py +161 -0
  235. truefoundry-0.4.0/truefoundry/ml/log_types/image/__init__.py +3 -0
  236. truefoundry-0.4.0/truefoundry/ml/log_types/image/constants.py +8 -0
  237. truefoundry-0.4.0/truefoundry/ml/log_types/image/image.py +357 -0
  238. truefoundry-0.4.0/truefoundry/ml/log_types/image/image_normalizer.py +102 -0
  239. truefoundry-0.4.0/truefoundry/ml/log_types/image/types.py +68 -0
  240. truefoundry-0.4.0/truefoundry/ml/log_types/plot.py +281 -0
  241. truefoundry-0.4.0/truefoundry/ml/log_types/pydantic_base.py +10 -0
  242. truefoundry-0.4.0/truefoundry/ml/log_types/utils.py +12 -0
  243. truefoundry-0.4.0/truefoundry/ml/logger.py +17 -0
  244. truefoundry-0.4.0/truefoundry/ml/mlfoundry_api.py +1575 -0
  245. truefoundry-0.4.0/truefoundry/ml/mlfoundry_run.py +1203 -0
  246. truefoundry-0.4.0/truefoundry/ml/run_utils.py +93 -0
  247. truefoundry-0.4.0/truefoundry/ml/session.py +168 -0
  248. truefoundry-0.4.0/truefoundry/ml/validation_utils.py +346 -0
  249. truefoundry-0.4.0/truefoundry/pydantic_v1.py +12 -0
  250. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/workflow/__init__.py +16 -1
  251. truefoundry-0.3.4/pyproject.toml +0 -86
  252. truefoundry-0.3.4/truefoundry/deploy/lib/clients/utils.py +0 -41
  253. truefoundry-0.3.4/truefoundry/deploy/lib/const.py +0 -43
  254. truefoundry-0.3.4/truefoundry/deploy/lib/exceptions.py +0 -26
  255. truefoundry-0.3.4/truefoundry/langchain/utils.py +0 -85
  256. truefoundry-0.3.4/truefoundry/ml/__init__.py +0 -6
  257. truefoundry-0.3.4/truefoundry/pydantic_v1.py +0 -8
  258. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/__init__.py +0 -0
  259. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/agents/__init__.py +0 -0
  260. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/agents/base.py +0 -0
  261. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/constants.py +0 -0
  262. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/exception.py +0 -0
  263. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/logger.py +0 -0
  264. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/tools/__init__.py +0 -0
  265. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/tools/ask.py +0 -0
  266. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/tools/base.py +0 -0
  267. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/tools/commit.py +0 -0
  268. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/tools/docker_build.py +0 -0
  269. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/tools/docker_run.py +0 -0
  270. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/tools/file_type_counts.py +0 -0
  271. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/tools/read_file.py +0 -0
  272. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/tools/send_request.py +0 -0
  273. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/tools/write_file.py +0 -0
  274. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/utils/client.py +0 -0
  275. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/utils/diff.py +0 -0
  276. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/autodeploy/utils/pydantic_compat.py +0 -0
  277. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/cli/__init__.py +0 -0
  278. {truefoundry-0.3.4/truefoundry/deploy/cli → truefoundry-0.4.0/truefoundry/common}/__init__.py +0 -0
  279. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/__init__.py +0 -0
  280. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/builder/__init__.py +0 -0
  281. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/builder/builders/__init__.py +0 -0
  282. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/builder/builders/dockerfile.py +0 -0
  283. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +0 -0
  284. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/dockerfile_template.py +0 -0
  285. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +0 -0
  286. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +0 -0
  287. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/builder/docker_service.py +0 -0
  288. {truefoundry-0.3.4/truefoundry/deploy/io → truefoundry-0.4.0/truefoundry/deploy/cli}/__init__.py +0 -0
  289. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/__init__.py +0 -0
  290. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/build_logs_command.py +0 -0
  291. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/create_command.py +0 -0
  292. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/delete_command.py +0 -0
  293. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/get_command.py +0 -0
  294. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/list_command.py +0 -0
  295. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/logout_command.py +0 -0
  296. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/logs_command.py +0 -0
  297. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/redeploy_command.py +0 -0
  298. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/commands/trigger_command.py +0 -0
  299. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/config.py +0 -0
  300. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/console.py +0 -0
  301. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/const.py +0 -0
  302. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/cli/display_util.py +0 -0
  303. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/core/__init__.py +0 -0
  304. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/core/login.py +0 -0
  305. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/core/logout.py +0 -0
  306. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/function_service/__init__.py +0 -0
  307. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/function_service/__main__.py +0 -0
  308. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/function_service/app.py +0 -0
  309. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/function_service/build.py +0 -0
  310. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/function_service/remote/__init__.py +0 -0
  311. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/function_service/remote/context.py +0 -0
  312. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/function_service/remote/method.py +0 -0
  313. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/function_service/route.py +0 -0
  314. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/function_service/service.py +0 -0
  315. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/function_service/utils.py +0 -0
  316. {truefoundry-0.3.4/truefoundry/deploy/lib → truefoundry-0.4.0/truefoundry/deploy/io}/__init__.py +0 -0
  317. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/io/output_callback.py +0 -0
  318. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/io/rich_output_callback.py +0 -0
  319. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/json_util.py +0 -0
  320. {truefoundry-0.3.4/truefoundry/deploy/lib/clients → truefoundry-0.4.0/truefoundry/deploy/lib}/__init__.py +0 -0
  321. {truefoundry-0.3.4/truefoundry/deploy/lib/dao → truefoundry-0.4.0/truefoundry/deploy/lib/clients}/__init__.py +0 -0
  322. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/clients/shell_client.py +0 -0
  323. {truefoundry-0.3.4/truefoundry/deploy/lib/model → truefoundry-0.4.0/truefoundry/deploy/lib/dao}/__init__.py +0 -0
  324. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/dao/application.py +0 -0
  325. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/dao/apply.py +0 -0
  326. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/dao/version.py +0 -0
  327. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/dao/workspace.py +0 -0
  328. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/logs_utils.py +0 -0
  329. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/messages.py +0 -0
  330. {truefoundry-0.3.4/truefoundry/deploy/v2 → truefoundry-0.4.0/truefoundry/deploy/lib/model}/__init__.py +0 -0
  331. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/lib/win32.py +0 -0
  332. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/v2/lib/__init__.py +0 -0
  333. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/v2/lib/deploy_workflow.py +0 -0
  334. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/v2/lib/models.py +0 -0
  335. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/v2/lib/patched_models.py +0 -0
  336. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/deploy/v2/lib/source.py +0 -0
  337. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/langchain/__init__.py +0 -0
  338. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/langchain/deprecated.py +0 -0
  339. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/logger.py +0 -0
  340. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/version.py +0 -0
  341. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/workflow/container_task.py +0 -0
  342. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/workflow/example/deploy.sh +0 -0
  343. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/workflow/example/hello_world_package/workflow.py +0 -0
  344. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/workflow/example/package/test_workflow.py +0 -0
  345. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/workflow/example/truefoundry.yaml +0 -0
  346. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/workflow/example/workflow.yaml +0 -0
  347. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/workflow/map_task.py +0 -0
  348. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/workflow/python_task.py +0 -0
  349. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/workflow/task.py +0 -0
  350. {truefoundry-0.3.4 → truefoundry-0.4.0}/truefoundry/workflow/workflow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: truefoundry
3
- Version: 0.3.4
3
+ Version: 0.4.0
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,<3.2.0)
14
+ Requires-Dist: GitPython (>=3.1.43,<4.0.0)
16
15
  Requires-Dist: Mako (>=1.1.6,<2.0.0)
17
16
  Requires-Dist: PyJWT (>=2.0.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,<1.2.0)
25
- Requires-Dist: importlib-metadata (>=6.0.1,<8.0.0)
26
- Requires-Dist: importlib-resources (>=5.2.0,<6.0.0)
27
- Requires-Dist: mlfoundry (==0.11.5) ; extra == "ml"
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: pydantic (>=1.10.0,<3)
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,<1.1.0)
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.10.2,<0.11.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
- Requires-Dist: typing-extensions (>=3.10.0)
48
+ Requires-Dist: typing-extensions (>=4.0)
42
49
  Requires-Dist: urllib3 (>=1.26.18,<3)
43
- Requires-Dist: uvicorn (>=0.13.0,<0.40.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
 
@@ -61,10 +68,10 @@ To install the `TrueFoundry CLI`, you can use pip:
61
68
  pip install truefoundry
62
69
  ```
63
70
 
64
- To install the `TrueFoundry CLI` with metadata/artifact tracking, you can use pip:
71
+ To install the `TrueFoundry CLI` with Workflow deployment features, you can use pip:
65
72
 
66
73
  ```bash
67
- pip install truefoundry[ml]
74
+ pip install truefoundry[workflow]
68
75
  ```
69
76
 
70
77
  ## Examples
@@ -15,10 +15,10 @@ To install the `TrueFoundry CLI`, you can use pip:
15
15
  pip install truefoundry
16
16
  ```
17
17
 
18
- To install the `TrueFoundry CLI` with metadata/artifact tracking, you can use pip:
18
+ To install the `TrueFoundry CLI` with Workflow deployment features, you can use pip:
19
19
 
20
20
  ```bash
21
- pip install truefoundry[ml]
21
+ pip install truefoundry[workflow]
22
22
  ```
23
23
 
24
24
  ## Examples
@@ -0,0 +1,156 @@
1
+ [tool.poetry]
2
+ name = "truefoundry"
3
+ version = "0.4.0"
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.0.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 = ">=4.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
+
82
+ [tool.poetry-dynamic-versioning]
83
+ enable = false
84
+
85
+ [build-system]
86
+ requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
87
+ build-backend = "poetry_dynamic_versioning.backend"
88
+
89
+ [tool.poetry.plugins."console_scripts"]
90
+ tfy = "truefoundry.cli.__main__:main"
91
+ truefoundry = "truefoundry.cli.__main__:main"
92
+
93
+ [tool.ruff]
94
+ lint.select = [
95
+ "E", # pycodestyle errors
96
+ "W", # pycodestyle warnings
97
+ "F", # pyflakes
98
+ "C", # flake8-comprehensions
99
+ "B", # flake8-bugbear
100
+ "Q", # flake8-quotes
101
+ "I",
102
+ ]
103
+ lint.ignore = ["E501"]
104
+ exclude = ["venv", "repos"]
105
+
106
+ [tool.ruff.lint.per-file-ignores]
107
+ "__init__.py" = ["F401"]
108
+ "truefoundry/ml/autogen/client/*" = ["B028", "B904", "C901", "C409", "F841"]
109
+ "truefoundry/ml/autogen/client/models/*" = ["F821"]
110
+ "truefoundry/ml/autogen/client/api_client.py" = ["E721"]
111
+
112
+ [tool.mypy]
113
+ plugins = [
114
+ "pydantic.mypy"
115
+ ]
116
+ install_types = true
117
+ non_interactive = true
118
+
119
+ allow_redefinition = false
120
+ allow_untyped_globals = false
121
+ check_untyped_defs = true
122
+ disallow_any_generics = true
123
+ disallow_incomplete_defs = false
124
+ disallow_subclassing_any = true
125
+ disallow_untyped_calls = false
126
+ disallow_untyped_decorators = false
127
+ disallow_untyped_defs = false
128
+ follow_imports = "silent"
129
+ force_uppercase_builtins = true
130
+ no_implicit_optional = true
131
+ no_implicit_reexport = true
132
+ strict_equality = true
133
+ strict_optional = true
134
+ warn_no_return = true
135
+ warn_redundant_casts = true
136
+ warn_return_any = true
137
+ warn_unreachable = true
138
+ warn_unused_ignores = true
139
+
140
+ packages = [
141
+ "truefoundry.common",
142
+ "truefoundry.ml",
143
+ ]
144
+ exclude = [
145
+ "^truefoundry/ml/autogen",
146
+ "^truefoundry/deploy/auto_gen",
147
+ "^truefoundry/pydantic_v1.py$",
148
+ ]
149
+ disable_error_code = [
150
+ "import-untyped",
151
+ ]
152
+
153
+ [tool.pydantic-mypy]
154
+ init_forbid_extra = true
155
+ init_typed = true
156
+ warn_required_dynamic_aliases = true
@@ -1 +1,3 @@
1
1
  from truefoundry.deploy.core import login, logout
2
+
3
+ __all__ = ["login", "logout"]
@@ -23,7 +23,7 @@ from truefoundry.autodeploy.tools import (
23
23
  class Developer(Agent):
24
24
  system_prompt = """
25
25
  You are a software engineer.
26
- You goal is to do whatever you have to do to succesfully run a project.
26
+ You goal is to do whatever you have to do to successfully run a project.
27
27
  If the project already contains a dockerfile, you can use that.
28
28
  If the project does not contain a dockerfile, you have to create one.
29
29
  You need to fix any issue to ensure that the image builds succesfully.
@@ -38,7 +38,7 @@ Prefer using file type counts over list files.
38
38
  use the knowledge of file type counts to create the right glob pattern while listing files.
39
39
  Prefer yarn over npm if the project is using yarn.
40
40
  If there is a lock file, the project maybe using yarn.
41
- Look for *.lock if there is a lock type file persent.
41
+ Look for *.lock if there is a lock type file present.
42
42
  Always response with a function call.
43
43
  """
44
44
  max_iter = 10
@@ -50,7 +50,7 @@ Always response with a function call.
50
50
  None,
51
51
  description="""
52
52
  A Service is designed to run always and should never terminate.
53
- A Job is desiged to finish after sometime.
53
+ A Job is designed to finish after sometime.
54
54
  """,
55
55
  )
56
56
  primary_programming_language: str = Field(
@@ -29,7 +29,7 @@ If you find any port number in the logs. Re run the docker image by exposing tha
29
29
 
30
30
  If the image is not running a service, try to identify whether there is any issue.
31
31
  Your goal is not to fix the issue. Your goal is to create a very detailed justification and report whether
32
- the testing was succesful.
32
+ the testing was successful.
33
33
  Always response with a function call.
34
34
  Return response once you are done testing.
35
35
  """
@@ -292,7 +292,7 @@ def cli(project_root_path: str, deploy: bool, workspace_fqn: str = None):
292
292
  )
293
293
  if not re.match(r"^[a-z][a-z0-9\-]{1,30}[a-z0-9]$", name):
294
294
  console.print(
295
- "[bold magenta]TrueFoundry:[/] The name should be between 2-30 alphaneumaric"
295
+ "[bold magenta]TrueFoundry:[/] The name should be between 2-30 alphanumeric"
296
296
  " characters and '-'. The first character should not be a digit."
297
297
  )
298
298
  else:
@@ -20,7 +20,7 @@ from truefoundry.autodeploy.tools.base import (
20
20
  class ListFiles(Tool):
21
21
  description = """
22
22
  List all files.
23
- If you want to find all json files recuresively under directory a/b
23
+ If you want to find all json files recursively under directory a/b
24
24
  the subdir should be a/b and pattern will be *.json
25
25
 
26
26
  If you want to find all json files recuresively under current directory
@@ -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
- if MLFOUNDRY_INSTALLED:
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())
@@ -1,40 +1,39 @@
1
1
  import time
2
2
  from abc import ABC, abstractmethod
3
+ from typing import Optional
3
4
 
4
5
  import requests
5
6
 
6
- from truefoundry.deploy.lib.clients.utils import poll_for_function, request_handling
7
- from truefoundry.deploy.lib.const import VERSION_PREFIX
8
- from truefoundry.deploy.lib.exceptions import BadRequestException
9
- from truefoundry.deploy.lib.model.entity import DeviceCode, Token
7
+ from truefoundry.common.constants import VERSION_PREFIX
8
+ from truefoundry.common.entities import DeviceCode, Token
9
+ from truefoundry.common.exceptions import BadRequestException
10
+ from truefoundry.common.request_utils import request_handling, requests_retry_session
11
+ from truefoundry.common.utils import poll_for_function
10
12
  from truefoundry.logger import logger
11
13
 
12
14
 
13
15
  class AuthServiceClient(ABC):
14
- def __init__(self, base_url):
15
- from truefoundry.deploy.lib.clients.servicefoundry_client import (
16
- ServiceFoundryServiceClient,
17
- )
18
-
19
- client = ServiceFoundryServiceClient(init_session=False, base_url=base_url)
20
-
21
- self._api_server_url = client._api_server_url
22
- self._auth_server_url = client.tenant_info.auth_server_url
23
- self._tenant_name = client.tenant_info.tenant_name
16
+ def __init__(self, tenant_name: str):
17
+ self._tenant_name = tenant_name
24
18
 
25
19
  @classmethod
26
20
  def from_base_url(cls, base_url: str) -> "AuthServiceClient":
27
- from truefoundry.deploy.lib.clients.servicefoundry_client import (
21
+ from truefoundry.common.servicefoundry_client import (
28
22
  ServiceFoundryServiceClient,
29
23
  )
30
24
 
31
- client = ServiceFoundryServiceClient(init_session=False, base_url=base_url)
25
+ client = ServiceFoundryServiceClient(base_url=base_url)
32
26
  if client.python_sdk_config.use_sfy_server_auth_apis:
33
- return ServiceFoundryServerAuthServiceClient(base_url)
34
- return AuthServerServiceClient(base_url)
27
+ return ServiceFoundryServerAuthServiceClient(
28
+ tenant_name=client.tenant_info.tenant_name, url=client._api_server_url
29
+ )
30
+ return AuthServerServiceClient(
31
+ tenant_name=client.tenant_info.tenant_name,
32
+ url=client.tenant_info.auth_server_url,
33
+ )
35
34
 
36
35
  @abstractmethod
37
- def refresh_token(self, token: Token, host: str = None) -> Token: ...
36
+ def refresh_token(self, token: Token, host: Optional[str] = None) -> Token: ...
38
37
 
39
38
  @abstractmethod
40
39
  def get_device_code(self) -> DeviceCode: ...
@@ -46,10 +45,11 @@ class AuthServiceClient(ABC):
46
45
 
47
46
 
48
47
  class ServiceFoundryServerAuthServiceClient(AuthServiceClient):
49
- def __init__(self, base_url):
50
- super().__init__(base_url)
48
+ def __init__(self, tenant_name: str, url: str):
49
+ super().__init__(tenant_name=tenant_name)
50
+ self._api_server_url = url
51
51
 
52
- def refresh_token(self, token: Token, host: str = None) -> Token:
52
+ def refresh_token(self, token: Token, host: Optional[str] = None) -> Token:
53
53
  host_arg_str = f"--host {host}" if host else "--host HOST"
54
54
  if not token.refresh_token:
55
55
  # TODO: Add a way to propagate error messages without traceback to the output interface side
@@ -63,10 +63,11 @@ class ServiceFoundryServerAuthServiceClient(AuthServiceClient):
63
63
  "grantType": "refresh_token",
64
64
  "returnJWT": True,
65
65
  }
66
- res = requests.post(url, json=data)
66
+ session = requests_retry_session(retries=2)
67
+ response = session.post(url, json=data)
67
68
  try:
68
- res = request_handling(res)
69
- return Token.parse_obj(res)
69
+ response_data = request_handling(response)
70
+ return Token.parse_obj(response_data)
70
71
  except BadRequestException as ex:
71
72
  raise Exception(
72
73
  f"Unable to resume login session. Please log in again using `tfy login {host_arg_str} --relogin`"
@@ -75,9 +76,10 @@ class ServiceFoundryServerAuthServiceClient(AuthServiceClient):
75
76
  def get_device_code(self) -> DeviceCode:
76
77
  url = f"{self._api_server_url}/{VERSION_PREFIX}/oauth2/device-authorize"
77
78
  data = {"tenantName": self._tenant_name}
78
- res = requests.post(url, json=data)
79
- res = request_handling(res)
80
- return DeviceCode.parse_obj(res)
79
+ session = requests_retry_session(retries=2)
80
+ response = session.post(url, json=data)
81
+ response_data = request_handling(response)
82
+ return DeviceCode.parse_obj(response_data)
81
83
 
82
84
  def get_token_from_device_code(
83
85
  self, device_code: str, timeout: float = 60, poll_interval_seconds: int = 1
@@ -91,7 +93,6 @@ class ServiceFoundryServerAuthServiceClient(AuthServiceClient):
91
93
  "grantType": "device_code",
92
94
  "returnJWT": True,
93
95
  }
94
- response = requests.post(url=url, json=data)
95
96
  start_time = time.monotonic()
96
97
 
97
98
  for response in poll_for_function(
@@ -116,10 +117,12 @@ class ServiceFoundryServerAuthServiceClient(AuthServiceClient):
116
117
 
117
118
 
118
119
  class AuthServerServiceClient(AuthServiceClient):
119
- def __init__(self, base_url):
120
- super().__init__(base_url)
120
+ def __init__(self, tenant_name: str, url: str):
121
+ super().__init__(tenant_name=tenant_name)
122
+
123
+ self._auth_server_url = url
121
124
 
122
- def refresh_token(self, token: Token, host: str = None) -> Token:
125
+ def refresh_token(self, token: Token, host: Optional[str] = None) -> Token:
123
126
  host_arg_str = f"--host {host}" if host else "--host HOST"
124
127
  if not token.refresh_token:
125
128
  # TODO: Add a way to propagate error messages without traceback to the output interface side
@@ -131,10 +134,11 @@ class AuthServerServiceClient(AuthServiceClient):
131
134
  "tenantName": token.tenant_name,
132
135
  "refreshToken": token.refresh_token,
133
136
  }
134
- res = requests.post(url, json=data)
137
+ session = requests_retry_session(retries=2)
138
+ response = session.post(url, json=data)
135
139
  try:
136
- res = request_handling(res)
137
- return Token.parse_obj(res)
140
+ response_data = request_handling(response)
141
+ return Token.parse_obj(response_data)
138
142
  except BadRequestException as ex:
139
143
  raise Exception(
140
144
  f"Unable to resume login session. Please log in again using `tfy login {host_arg_str} --relogin`"
@@ -143,22 +147,28 @@ class AuthServerServiceClient(AuthServiceClient):
143
147
  def get_device_code(self) -> DeviceCode:
144
148
  url = f"{self._auth_server_url}/api/{VERSION_PREFIX}/oauth/device"
145
149
  data = {"tenantName": self._tenant_name}
146
- res = requests.post(url, json=data)
147
- res = request_handling(res)
150
+ session = requests_retry_session(retries=2)
151
+ response = session.post(url, json=data)
152
+ response_data = request_handling(response)
148
153
  # TODO: temporary cleanup of incorrect attributes
149
- res = {"userCode": res.get("userCode"), "deviceCode": res.get("deviceCode")}
150
- return DeviceCode.parse_obj(res)
154
+ return DeviceCode.parse_obj(
155
+ {
156
+ "userCode": response_data.get("userCode"),
157
+ "deviceCode": response_data.get("deviceCode"),
158
+ }
159
+ )
151
160
 
152
161
  def get_token_from_device_code(
153
162
  self, device_code: str, timeout: float = 60, poll_interval_seconds: int = 1
154
163
  ) -> Token:
164
+ timeout = timeout or 60
165
+ poll_interval_seconds = poll_interval_seconds or 1
155
166
  url = f"{self._auth_server_url}/api/{VERSION_PREFIX}/oauth/device/token"
156
167
  data = {
157
168
  "tenantName": self._tenant_name,
158
169
  "deviceCode": device_code,
159
170
  }
160
171
  start_time = time.monotonic()
161
- poll_interval_seconds = 1
162
172
 
163
173
  for response in poll_for_function(
164
174
  requests.post, poll_after_secs=poll_interval_seconds, url=url, json=data
@@ -0,0 +1,12 @@
1
+ from pathlib import Path
2
+
3
+ TFY_CONFIG_DIR = Path.home() / ".truefoundry"
4
+ CREDENTIAL_FILEPATH = TFY_CONFIG_DIR / "credentials.json"
5
+
6
+ TFY_HOST_ENV_KEY = "TFY_HOST"
7
+ TFY_API_KEY_ENV_KEY = "TFY_API_KEY"
8
+ SERVICEFOUNDRY_SERVER_URL_ENV_KEY = "SERVICEFOUNDRY_SERVER_URL"
9
+
10
+ API_SERVER_RELATIVE_PATH = "api/svc"
11
+ VERSION_PREFIX = "v1"
12
+ SERVICEFOUNDRY_CLIENT_MAX_RETRIES = 2
@@ -8,14 +8,14 @@ from typing import Optional
8
8
 
9
9
  from filelock import FileLock, Timeout
10
10
 
11
- from truefoundry.deploy.lib.const import CREDENTIAL_FILEPATH
12
- from truefoundry.deploy.lib.model.entity import CredentialsFileContent
11
+ from truefoundry.common.constants import CREDENTIAL_FILEPATH
12
+ from truefoundry.common.entities import CredentialsFileContent
13
13
  from truefoundry.logger import logger
14
14
 
15
15
 
16
16
  def _ensure_lock_taken(method):
17
17
  @wraps(method)
18
- def lock_guard(self, *method_args, **method_kwargs):
18
+ def lock_guard(self: "CredentialsFileManager", *method_args, **method_kwargs):
19
19
  if not self.lock_taken():
20
20
  raise Exception(
21
21
  "Trying to write to credential file without using with block"
@@ -55,17 +55,17 @@ class CredentialsFileManager:
55
55
 
56
56
  def __enter__(self) -> CredentialsFileManager:
57
57
  # The lock objects are recursive locks, which means that once acquired, they will not block on successive lock requests:
58
- lock_aquired = CRED_FILE_THREAD_LOCK.acquire(timeout=self._lock_timeout)
59
- if not lock_aquired:
58
+ lock_acquired = CRED_FILE_THREAD_LOCK.acquire(timeout=self._lock_timeout)
59
+ if not lock_acquired:
60
60
  raise Exception(
61
- "Could not aquire CRED_FILE_THREAD_LOCK"
61
+ "Could not acquire CRED_FILE_THREAD_LOCK"
62
62
  f" in {self._lock_timeout} seconds"
63
63
  )
64
64
  try:
65
65
  self._file_lock.acquire(timeout=self._lock_timeout)
66
66
  except Timeout as ex:
67
67
  raise Exception(
68
- f"Failed to aquire lock on credential file within {self._lock_timeout} seconds.\n"
68
+ f"Failed to acquire lock on credential file within {self._lock_timeout} seconds.\n"
69
69
  "Is any other process trying to login?"
70
70
  ) from ex
71
71
  logger.debug("Acquired file and thread lock to access credential file")
@@ -2,14 +2,11 @@ import os
2
2
  import threading
3
3
  from abc import ABC, abstractmethod
4
4
 
5
- from truefoundry.deploy.lib.auth.auth_service_client import AuthServiceClient
6
- from truefoundry.deploy.lib.auth.credential_file_manager import (
7
- CredentialsFileContent,
8
- CredentialsFileManager,
9
- )
10
- from truefoundry.deploy.lib.clients.utils import resolve_base_url
11
- from truefoundry.deploy.lib.const import API_KEY_ENV_NAME
12
- from truefoundry.deploy.lib.model.entity import Token
5
+ from truefoundry.common.auth_service_client import AuthServiceClient
6
+ from truefoundry.common.constants import TFY_API_KEY_ENV_KEY
7
+ from truefoundry.common.credential_file_manager import CredentialsFileManager
8
+ from truefoundry.common.entities import CredentialsFileContent, Token
9
+ from truefoundry.common.utils import resolve_base_url
13
10
  from truefoundry.logger import logger
14
11
 
15
12
  TOKEN_REFRESH_LOCK = threading.RLock()
@@ -31,31 +28,21 @@ class CredentialProvider(ABC):
31
28
 
32
29
  class EnvCredentialProvider(CredentialProvider):
33
30
  def __init__(self) -> None:
34
- from truefoundry.deploy.lib.clients.servicefoundry_client import (
35
- ServiceFoundryServiceClient,
36
- )
37
-
38
31
  logger.debug("Using env var credential provider")
39
- api_key = os.getenv(API_KEY_ENV_NAME)
32
+ api_key = os.getenv(TFY_API_KEY_ENV_KEY)
40
33
  if not api_key:
41
34
  raise Exception(
42
- f"Value of {API_KEY_ENV_NAME} env var should be non-empty string"
35
+ f"Value of {TFY_API_KEY_ENV_KEY} env var should be non-empty string"
43
36
  )
44
37
  # TODO: Read host from cred file as well.
45
38
  base_url = resolve_base_url().strip("/")
46
39
  self._host = base_url
47
40
  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
- )
41
+ self._token: Token = Token(access_token=api_key, refresh_token=None) # type: ignore[call-arg]
55
42
 
56
43
  @staticmethod
57
44
  def can_provide() -> bool:
58
- return API_KEY_ENV_NAME in os.environ
45
+ return TFY_API_KEY_ENV_KEY in os.environ
59
46
 
60
47
  @property
61
48
  def token(self) -> Token:
@@ -123,7 +110,7 @@ class FileCredentialProvider(CredentialProvider):
123
110
  return self.token
124
111
 
125
112
  raise Exception(
126
- "Credentials on disk changed while mlfoundry was running."
113
+ "Credentials on disk changed while truefoundry was running."
127
114
  )
128
115
 
129
116
  @property