truefoundry 0.13.6__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.
Files changed (393) hide show
  1. truefoundry-0.13.6/.gitignore +156 -0
  2. truefoundry-0.13.6/PKG-INFO +76 -0
  3. truefoundry-0.13.6/README.md +30 -0
  4. truefoundry-0.13.6/pyproject.toml +194 -0
  5. truefoundry-0.13.6/truefoundry/__init__.py +48 -0
  6. truefoundry-0.13.6/truefoundry/_ask/__init__.py +0 -0
  7. truefoundry-0.13.6/truefoundry/_ask/cli.py +156 -0
  8. truefoundry-0.13.6/truefoundry/_ask/client.py +490 -0
  9. truefoundry-0.13.6/truefoundry/_ask/llm_utils.py +344 -0
  10. truefoundry-0.13.6/truefoundry/_client.py +36 -0
  11. truefoundry-0.13.6/truefoundry/autodeploy/__init__.py +0 -0
  12. truefoundry-0.13.6/truefoundry/autodeploy/agents/__init__.py +0 -0
  13. truefoundry-0.13.6/truefoundry/autodeploy/agents/base.py +181 -0
  14. truefoundry-0.13.6/truefoundry/autodeploy/agents/developer.py +113 -0
  15. truefoundry-0.13.6/truefoundry/autodeploy/agents/project_identifier.py +125 -0
  16. truefoundry-0.13.6/truefoundry/autodeploy/agents/tester.py +76 -0
  17. truefoundry-0.13.6/truefoundry/autodeploy/cli.py +388 -0
  18. truefoundry-0.13.6/truefoundry/autodeploy/constants.py +22 -0
  19. truefoundry-0.13.6/truefoundry/autodeploy/exception.py +4 -0
  20. truefoundry-0.13.6/truefoundry/autodeploy/logger.py +13 -0
  21. truefoundry-0.13.6/truefoundry/autodeploy/tools/__init__.py +26 -0
  22. truefoundry-0.13.6/truefoundry/autodeploy/tools/ask.py +33 -0
  23. truefoundry-0.13.6/truefoundry/autodeploy/tools/base.py +39 -0
  24. truefoundry-0.13.6/truefoundry/autodeploy/tools/commit.py +143 -0
  25. truefoundry-0.13.6/truefoundry/autodeploy/tools/docker_build.py +111 -0
  26. truefoundry-0.13.6/truefoundry/autodeploy/tools/docker_run.py +151 -0
  27. truefoundry-0.13.6/truefoundry/autodeploy/tools/file_type_counts.py +80 -0
  28. truefoundry-0.13.6/truefoundry/autodeploy/tools/list_files.py +84 -0
  29. truefoundry-0.13.6/truefoundry/autodeploy/tools/read_file.py +77 -0
  30. truefoundry-0.13.6/truefoundry/autodeploy/tools/send_request.py +56 -0
  31. truefoundry-0.13.6/truefoundry/autodeploy/tools/write_file.py +101 -0
  32. truefoundry-0.13.6/truefoundry/autodeploy/utils/client.py +12 -0
  33. truefoundry-0.13.6/truefoundry/autodeploy/utils/diff.py +157 -0
  34. truefoundry-0.13.6/truefoundry/autodeploy/utils/pydantic_compat.py +19 -0
  35. truefoundry-0.13.6/truefoundry/cli/__init__.py +0 -0
  36. truefoundry-0.13.6/truefoundry/cli/__main__.py +131 -0
  37. truefoundry-0.13.6/truefoundry/cli/config.py +10 -0
  38. truefoundry-0.13.6/truefoundry/cli/console.py +5 -0
  39. truefoundry-0.13.6/truefoundry/cli/const.py +12 -0
  40. truefoundry-0.13.6/truefoundry/cli/display_util.py +123 -0
  41. truefoundry-0.13.6/truefoundry/cli/util.py +186 -0
  42. truefoundry-0.13.6/truefoundry/common/__init__.py +0 -0
  43. truefoundry-0.13.6/truefoundry/common/auth_service_client.py +203 -0
  44. truefoundry-0.13.6/truefoundry/common/constants.py +130 -0
  45. truefoundry-0.13.6/truefoundry/common/credential_file_manager.py +116 -0
  46. truefoundry-0.13.6/truefoundry/common/credential_provider.py +118 -0
  47. truefoundry-0.13.6/truefoundry/common/entities.py +131 -0
  48. truefoundry-0.13.6/truefoundry/common/exceptions.py +16 -0
  49. truefoundry-0.13.6/truefoundry/common/request_utils.py +166 -0
  50. truefoundry-0.13.6/truefoundry/common/servicefoundry_client.py +107 -0
  51. truefoundry-0.13.6/truefoundry/common/session.py +97 -0
  52. truefoundry-0.13.6/truefoundry/common/storage_provider_utils.py +356 -0
  53. truefoundry-0.13.6/truefoundry/common/types.py +7 -0
  54. truefoundry-0.13.6/truefoundry/common/utils.py +216 -0
  55. truefoundry-0.13.6/truefoundry/common/warnings.py +29 -0
  56. truefoundry-0.13.6/truefoundry/deploy/__init__.py +141 -0
  57. truefoundry-0.13.6/truefoundry/deploy/_autogen/models.py +1892 -0
  58. truefoundry-0.13.6/truefoundry/deploy/builder/__init__.py +138 -0
  59. truefoundry-0.13.6/truefoundry/deploy/builder/builders/__init__.py +26 -0
  60. truefoundry-0.13.6/truefoundry/deploy/builder/builders/dockerfile.py +55 -0
  61. truefoundry-0.13.6/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +54 -0
  62. truefoundry-0.13.6/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/dockerfile_template.py +77 -0
  63. truefoundry-0.13.6/truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +53 -0
  64. truefoundry-0.13.6/truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +423 -0
  65. truefoundry-0.13.6/truefoundry/deploy/builder/builders/tfy_spark_buildpack/__init__.py +75 -0
  66. truefoundry-0.13.6/truefoundry/deploy/builder/builders/tfy_spark_buildpack/dockerfile_template.py +121 -0
  67. truefoundry-0.13.6/truefoundry/deploy/builder/builders/tfy_spark_buildpack/tfy_execute_notebook.py +171 -0
  68. truefoundry-0.13.6/truefoundry/deploy/builder/builders/tfy_task_pyspark_buildpack/__init__.py +48 -0
  69. truefoundry-0.13.6/truefoundry/deploy/builder/builders/tfy_task_pyspark_buildpack/dockerfile_template.py +111 -0
  70. truefoundry-0.13.6/truefoundry/deploy/builder/constants.py +27 -0
  71. truefoundry-0.13.6/truefoundry/deploy/builder/docker_service.py +134 -0
  72. truefoundry-0.13.6/truefoundry/deploy/builder/utils.py +322 -0
  73. truefoundry-0.13.6/truefoundry/deploy/cli/__init__.py +0 -0
  74. truefoundry-0.13.6/truefoundry/deploy/cli/commands/__init__.py +31 -0
  75. truefoundry-0.13.6/truefoundry/deploy/cli/commands/apply_command.py +74 -0
  76. truefoundry-0.13.6/truefoundry/deploy/cli/commands/build_command.py +45 -0
  77. truefoundry-0.13.6/truefoundry/deploy/cli/commands/delete_command.py +109 -0
  78. truefoundry-0.13.6/truefoundry/deploy/cli/commands/deploy_command.py +172 -0
  79. truefoundry-0.13.6/truefoundry/deploy/cli/commands/deploy_init_command.py +22 -0
  80. truefoundry-0.13.6/truefoundry/deploy/cli/commands/get_command.py +30 -0
  81. truefoundry-0.13.6/truefoundry/deploy/cli/commands/k8s_exec_credential_command.py +64 -0
  82. truefoundry-0.13.6/truefoundry/deploy/cli/commands/kubeconfig_command.py +98 -0
  83. truefoundry-0.13.6/truefoundry/deploy/cli/commands/login_command.py +39 -0
  84. truefoundry-0.13.6/truefoundry/deploy/cli/commands/logout_command.py +20 -0
  85. truefoundry-0.13.6/truefoundry/deploy/cli/commands/logs_command.py +134 -0
  86. truefoundry-0.13.6/truefoundry/deploy/cli/commands/patch_application_command.py +82 -0
  87. truefoundry-0.13.6/truefoundry/deploy/cli/commands/patch_command.py +80 -0
  88. truefoundry-0.13.6/truefoundry/deploy/cli/commands/terminate_comand.py +44 -0
  89. truefoundry-0.13.6/truefoundry/deploy/cli/commands/trigger_command.py +164 -0
  90. truefoundry-0.13.6/truefoundry/deploy/cli/commands/utils.py +118 -0
  91. truefoundry-0.13.6/truefoundry/deploy/core/__init__.py +7 -0
  92. truefoundry-0.13.6/truefoundry/deploy/core/login.py +9 -0
  93. truefoundry-0.13.6/truefoundry/deploy/core/logout.py +5 -0
  94. truefoundry-0.13.6/truefoundry/deploy/io/__init__.py +0 -0
  95. truefoundry-0.13.6/truefoundry/deploy/io/no_output_callback.py +27 -0
  96. truefoundry-0.13.6/truefoundry/deploy/io/output_callback.py +30 -0
  97. truefoundry-0.13.6/truefoundry/deploy/io/rich_output_callback.py +31 -0
  98. truefoundry-0.13.6/truefoundry/deploy/lib/__init__.py +0 -0
  99. truefoundry-0.13.6/truefoundry/deploy/lib/clients/__init__.py +0 -0
  100. truefoundry-0.13.6/truefoundry/deploy/lib/clients/servicefoundry_client.py +729 -0
  101. truefoundry-0.13.6/truefoundry/deploy/lib/const.py +4 -0
  102. truefoundry-0.13.6/truefoundry/deploy/lib/dao/__init__.py +0 -0
  103. truefoundry-0.13.6/truefoundry/deploy/lib/dao/application.py +266 -0
  104. truefoundry-0.13.6/truefoundry/deploy/lib/dao/apply.py +113 -0
  105. truefoundry-0.13.6/truefoundry/deploy/lib/dao/delete.py +88 -0
  106. truefoundry-0.13.6/truefoundry/deploy/lib/dao/version.py +33 -0
  107. truefoundry-0.13.6/truefoundry/deploy/lib/dao/workspace.py +71 -0
  108. truefoundry-0.13.6/truefoundry/deploy/lib/diff_utils.py +114 -0
  109. truefoundry-0.13.6/truefoundry/deploy/lib/logs_utils.py +43 -0
  110. truefoundry-0.13.6/truefoundry/deploy/lib/messages.py +13 -0
  111. truefoundry-0.13.6/truefoundry/deploy/lib/model/__init__.py +0 -0
  112. truefoundry-0.13.6/truefoundry/deploy/lib/model/entity.py +312 -0
  113. truefoundry-0.13.6/truefoundry/deploy/lib/session.py +136 -0
  114. truefoundry-0.13.6/truefoundry/deploy/lib/util.py +151 -0
  115. truefoundry-0.13.6/truefoundry/deploy/lib/win32.py +129 -0
  116. truefoundry-0.13.6/truefoundry/deploy/python_deploy_codegen.py +275 -0
  117. truefoundry-0.13.6/truefoundry/deploy/v2/__init__.py +0 -0
  118. truefoundry-0.13.6/truefoundry/deploy/v2/lib/__init__.py +3 -0
  119. truefoundry-0.13.6/truefoundry/deploy/v2/lib/deploy.py +322 -0
  120. truefoundry-0.13.6/truefoundry/deploy/v2/lib/deploy_workflow.py +340 -0
  121. truefoundry-0.13.6/truefoundry/deploy/v2/lib/deployable_patched_models.py +204 -0
  122. truefoundry-0.13.6/truefoundry/deploy/v2/lib/models.py +53 -0
  123. truefoundry-0.13.6/truefoundry/deploy/v2/lib/patched_models.py +633 -0
  124. truefoundry-0.13.6/truefoundry/deploy/v2/lib/source.py +244 -0
  125. truefoundry-0.13.6/truefoundry/logger.py +18 -0
  126. truefoundry-0.13.6/truefoundry/ml/__init__.py +88 -0
  127. truefoundry-0.13.6/truefoundry/ml/_autogen/__init__.py +0 -0
  128. truefoundry-0.13.6/truefoundry/ml/_autogen/client/__init__.py +457 -0
  129. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api/__init__.py +16 -0
  130. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api/auth_api.py +184 -0
  131. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api/deprecated_api.py +605 -0
  132. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api/experiments_api.py +1696 -0
  133. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api/generate_code_snippet_api.py +526 -0
  134. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api/health_api.py +298 -0
  135. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api/metrics_api.py +371 -0
  136. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api/mlfoundry_artifacts_api.py +7666 -0
  137. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api/run_artifacts_api.py +236 -0
  138. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api/runs_api.py +2919 -0
  139. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api_client.py +829 -0
  140. truefoundry-0.13.6/truefoundry/ml/_autogen/client/api_response.py +30 -0
  141. truefoundry-0.13.6/truefoundry/ml/_autogen/client/configuration.py +461 -0
  142. truefoundry-0.13.6/truefoundry/ml/_autogen/client/exceptions.py +161 -0
  143. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/__init__.py +428 -0
  144. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/agent_app.py +125 -0
  145. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/agent_manifest.py +178 -0
  146. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/agent_open_api_tool_manifest.py +202 -0
  147. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/agent_open_api_tool_with_fqn.py +203 -0
  148. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/agent_with_fqn.py +181 -0
  149. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/apply_request_dto.py +75 -0
  150. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/apply_response_dto.py +79 -0
  151. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/artifact_dto.py +126 -0
  152. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/artifact_manifest.py +178 -0
  153. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/artifact_path.py +70 -0
  154. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/artifact_response_dto.py +75 -0
  155. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/artifact_type.py +39 -0
  156. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/artifact_version_dto.py +157 -0
  157. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/artifact_version_response_dto.py +79 -0
  158. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/artifact_version_serialization_format.py +34 -0
  159. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/artifact_version_status.py +35 -0
  160. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/assistant_message.py +89 -0
  161. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/authorize_user_for_model_request_dto.py +69 -0
  162. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/authorize_user_for_model_version_request_dto.py +69 -0
  163. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/blob_storage_reference.py +90 -0
  164. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/body_get_search_runs_get.py +72 -0
  165. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/chat_prompt_manifest.py +196 -0
  166. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/chat_prompt_manifest_messages_inner.py +171 -0
  167. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/columns_dto.py +73 -0
  168. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/command.py +152 -0
  169. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/content.py +153 -0
  170. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/content1.py +153 -0
  171. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/content2.py +174 -0
  172. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/content2_any_of_inner.py +150 -0
  173. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_artifact_request_dto.py +74 -0
  174. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_artifact_response_dto.py +65 -0
  175. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_artifact_version_request_dto.py +74 -0
  176. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_artifact_version_response_dto.py +71 -0
  177. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_dataset_request_dto.py +92 -0
  178. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_experiment_request_dto.py +94 -0
  179. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_experiment_response_dto.py +67 -0
  180. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_model_version_request_dto.py +87 -0
  181. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_multi_part_upload_for_dataset_request_dto.py +73 -0
  182. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_multi_part_upload_for_dataset_response_dto.py +79 -0
  183. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_multi_part_upload_request_dto.py +73 -0
  184. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_python_deployment_config_request_dto.py +72 -0
  185. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_python_deployment_config_response_dto.py +67 -0
  186. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_run_request_dto.py +88 -0
  187. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_run_response_dto.py +75 -0
  188. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/create_workflow_task_config_request_dto.py +72 -0
  189. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/data_directory_manifest.py +124 -0
  190. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/dataset_dto.py +132 -0
  191. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/dataset_response_dto.py +75 -0
  192. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/delete_artifact_versions_request_dto.py +65 -0
  193. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/delete_dataset_request_dto.py +74 -0
  194. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/delete_files_for_dataset_request_dto.py +68 -0
  195. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/delete_model_version_request_dto.py +65 -0
  196. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/delete_run_request.py +65 -0
  197. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/delete_tag_request_dto.py +68 -0
  198. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/experiment_dto.py +138 -0
  199. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/experiment_id_request_dto.py +67 -0
  200. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/experiment_response_dto.py +75 -0
  201. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/experiment_tag_dto.py +69 -0
  202. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/export_deployment_files_request_dto.py +82 -0
  203. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/external_blob_storage_source.py +87 -0
  204. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/fast_ai_framework.py +72 -0
  205. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/file_info_dto.py +79 -0
  206. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/finalize_artifact_version_request_dto.py +102 -0
  207. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/framework.py +390 -0
  208. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_artifact_version_aliases_response_dto.py +67 -0
  209. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_experiment_response_dto.py +88 -0
  210. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_latest_run_log_response_dto.py +75 -0
  211. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_metric_history_response.py +79 -0
  212. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_signed_url_for_dataset_write_request_dto.py +68 -0
  213. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +68 -0
  214. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +81 -0
  215. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +69 -0
  216. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +83 -0
  217. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_signed_urls_for_dataset_read_request_dto.py +68 -0
  218. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_signed_urls_for_dataset_read_response_dto.py +81 -0
  219. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_signed_urls_for_dataset_write_response_dto.py +81 -0
  220. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/get_tenant_id_response_dto.py +73 -0
  221. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/gluon_framework.py +72 -0
  222. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/h2_o_framework.py +72 -0
  223. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/http_validation_error.py +82 -0
  224. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/image_content_part.py +86 -0
  225. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/image_url.py +75 -0
  226. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/infer_method_name.py +34 -0
  227. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/keras_framework.py +72 -0
  228. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/latest_run_log_dto.py +78 -0
  229. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/library_name.py +35 -0
  230. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/light_gbm_framework.py +72 -0
  231. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_artifact_versions_request_dto.py +107 -0
  232. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_artifact_versions_response_dto.py +89 -0
  233. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_artifacts_request_dto.py +96 -0
  234. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_artifacts_response_dto.py +86 -0
  235. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_colums_response_dto.py +75 -0
  236. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_datasets_request_dto.py +78 -0
  237. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_datasets_response_dto.py +86 -0
  238. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_experiments_response_dto.py +86 -0
  239. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_files_for_artifact_version_request_dto.py +76 -0
  240. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_files_for_artifact_versions_response_dto.py +82 -0
  241. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_files_for_dataset_request_dto.py +76 -0
  242. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_files_for_dataset_response_dto.py +82 -0
  243. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_latest_run_logs_response_dto.py +82 -0
  244. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_metric_history_request_dto.py +69 -0
  245. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_metric_history_response_dto.py +84 -0
  246. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_model_version_response_dto.py +87 -0
  247. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_model_versions_request_dto.py +93 -0
  248. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_models_request_dto.py +89 -0
  249. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_models_response_dto.py +84 -0
  250. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_run_artifacts_response_dto.py +84 -0
  251. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/list_run_logs_response_dto.py +82 -0
  252. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/local_artifact_source.py +91 -0
  253. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/local_model_source.py +77 -0
  254. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/log_batch_request_dto.py +106 -0
  255. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/log_metric_request_dto.py +80 -0
  256. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/log_param_request_dto.py +76 -0
  257. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/manifest.py +229 -0
  258. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/manifest1.py +217 -0
  259. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/manifest2.py +198 -0
  260. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/method.py +37 -0
  261. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/metric_collection_dto.py +82 -0
  262. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/metric_dto.py +76 -0
  263. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/mime_type.py +37 -0
  264. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/model_configuration.py +102 -0
  265. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/model_dto.py +131 -0
  266. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/model_manifest.py +198 -0
  267. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/model_response_dto.py +75 -0
  268. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/model_server.py +34 -0
  269. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/model_version_dto.py +193 -0
  270. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/model_version_environment.py +95 -0
  271. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/model_version_response_dto.py +75 -0
  272. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/multi_part_upload_dto.py +107 -0
  273. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/multi_part_upload_response_dto.py +79 -0
  274. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/multi_part_upload_storage_provider.py +34 -0
  275. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/notify_artifact_version_failure_dto.py +65 -0
  276. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/onnx_framework.py +72 -0
  277. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/openapi_spec.py +152 -0
  278. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/paddle_framework.py +72 -0
  279. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/param_dto.py +66 -0
  280. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/parameters.py +84 -0
  281. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/py_torch_framework.py +72 -0
  282. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/resolve_agent_app_response_dto.py +75 -0
  283. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/restore_run_request_dto.py +65 -0
  284. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/run_data_dto.py +104 -0
  285. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/run_dto.py +84 -0
  286. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/run_info_dto.py +114 -0
  287. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/run_log_dto.py +90 -0
  288. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/run_log_input_dto.py +80 -0
  289. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/run_response_dto.py +75 -0
  290. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/run_tag_dto.py +66 -0
  291. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/search_runs_request_dto.py +94 -0
  292. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/search_runs_response_dto.py +84 -0
  293. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/set_experiment_tag_request_dto.py +73 -0
  294. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/set_tag_request_dto.py +76 -0
  295. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/signed_url_dto.py +68 -0
  296. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/sklearn_framework.py +97 -0
  297. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/sklearn_model_schema.py +81 -0
  298. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/sklearn_serialization_format.py +35 -0
  299. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/source.py +179 -0
  300. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/source1.py +154 -0
  301. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/source2.py +177 -0
  302. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/spa_cy_framework.py +72 -0
  303. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/stats_models_framework.py +72 -0
  304. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/stop.py +152 -0
  305. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/store_run_logs_request_dto.py +83 -0
  306. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/subject.py +79 -0
  307. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/subject_type.py +34 -0
  308. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/system_message.py +87 -0
  309. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/tensor_flow_framework.py +72 -0
  310. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/text.py +153 -0
  311. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/text_content_part.py +84 -0
  312. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/transformers_framework.py +92 -0
  313. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/trigger_job_run_config_request_dto.py +90 -0
  314. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/trigger_job_run_config_response_dto.py +71 -0
  315. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/true_foundry_managed_source.py +88 -0
  316. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/update_artifact_version_request_dto.py +82 -0
  317. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/update_dataset_request_dto.py +84 -0
  318. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/update_experiment_request_dto.py +74 -0
  319. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/update_model_version_request_dto.py +90 -0
  320. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/update_run_request_dto.py +78 -0
  321. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/update_run_response_dto.py +75 -0
  322. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/url.py +153 -0
  323. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/user_message.py +89 -0
  324. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/validate_external_storage_root_request_dto.py +71 -0
  325. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/validate_external_storage_root_response_dto.py +69 -0
  326. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/validation_error.py +87 -0
  327. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/validation_error_loc_inner.py +154 -0
  328. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/xg_boost_framework.py +97 -0
  329. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/xg_boost_model_schema.py +87 -0
  330. truefoundry-0.13.6/truefoundry/ml/_autogen/client/models/xg_boost_serialization_format.py +36 -0
  331. truefoundry-0.13.6/truefoundry/ml/_autogen/client/rest.py +426 -0
  332. truefoundry-0.13.6/truefoundry/ml/_autogen/client_README.md +359 -0
  333. truefoundry-0.13.6/truefoundry/ml/_autogen/entities/artifacts.py +558 -0
  334. truefoundry-0.13.6/truefoundry/ml/_autogen/models/__init__.py +4 -0
  335. truefoundry-0.13.6/truefoundry/ml/_autogen/models/exceptions.py +30 -0
  336. truefoundry-0.13.6/truefoundry/ml/_autogen/models/schema.py +1547 -0
  337. truefoundry-0.13.6/truefoundry/ml/_autogen/models/signature.py +142 -0
  338. truefoundry-0.13.6/truefoundry/ml/_autogen/models/utils.py +704 -0
  339. truefoundry-0.13.6/truefoundry/ml/artifact/__init__.py +0 -0
  340. truefoundry-0.13.6/truefoundry/ml/artifact/truefoundry_artifact_repo.py +904 -0
  341. truefoundry-0.13.6/truefoundry/ml/cli/__init__.py +0 -0
  342. truefoundry-0.13.6/truefoundry/ml/cli/cli.py +22 -0
  343. truefoundry-0.13.6/truefoundry/ml/cli/commands/__init__.py +3 -0
  344. truefoundry-0.13.6/truefoundry/ml/cli/commands/download.py +100 -0
  345. truefoundry-0.13.6/truefoundry/ml/cli/commands/model_init.py +97 -0
  346. truefoundry-0.13.6/truefoundry/ml/cli/utils.py +34 -0
  347. truefoundry-0.13.6/truefoundry/ml/clients/__init__.py +0 -0
  348. truefoundry-0.13.6/truefoundry/ml/constants.py +84 -0
  349. truefoundry-0.13.6/truefoundry/ml/entities.py +62 -0
  350. truefoundry-0.13.6/truefoundry/ml/enums.py +70 -0
  351. truefoundry-0.13.6/truefoundry/ml/exceptions.py +9 -0
  352. truefoundry-0.13.6/truefoundry/ml/git_info.py +60 -0
  353. truefoundry-0.13.6/truefoundry/ml/integrations/__init__.py +0 -0
  354. truefoundry-0.13.6/truefoundry/ml/integrations/huggingface/__init__.py +0 -0
  355. truefoundry-0.13.6/truefoundry/ml/integrations/huggingface/trainer_callback.py +217 -0
  356. truefoundry-0.13.6/truefoundry/ml/internal_namespace.py +52 -0
  357. truefoundry-0.13.6/truefoundry/ml/log_types/__init__.py +4 -0
  358. truefoundry-0.13.6/truefoundry/ml/log_types/artifacts/__init__.py +0 -0
  359. truefoundry-0.13.6/truefoundry/ml/log_types/artifacts/artifact.py +549 -0
  360. truefoundry-0.13.6/truefoundry/ml/log_types/artifacts/constants.py +41 -0
  361. truefoundry-0.13.6/truefoundry/ml/log_types/artifacts/dataset.py +389 -0
  362. truefoundry-0.13.6/truefoundry/ml/log_types/artifacts/general_artifact.py +84 -0
  363. truefoundry-0.13.6/truefoundry/ml/log_types/artifacts/model.py +670 -0
  364. truefoundry-0.13.6/truefoundry/ml/log_types/artifacts/utils.py +299 -0
  365. truefoundry-0.13.6/truefoundry/ml/log_types/image/__init__.py +3 -0
  366. truefoundry-0.13.6/truefoundry/ml/log_types/image/constants.py +8 -0
  367. truefoundry-0.13.6/truefoundry/ml/log_types/image/image.py +359 -0
  368. truefoundry-0.13.6/truefoundry/ml/log_types/image/image_normalizer.py +102 -0
  369. truefoundry-0.13.6/truefoundry/ml/log_types/image/types.py +68 -0
  370. truefoundry-0.13.6/truefoundry/ml/log_types/plot.py +283 -0
  371. truefoundry-0.13.6/truefoundry/ml/log_types/pydantic_base.py +10 -0
  372. truefoundry-0.13.6/truefoundry/ml/log_types/utils.py +12 -0
  373. truefoundry-0.13.6/truefoundry/ml/logger.py +17 -0
  374. truefoundry-0.13.6/truefoundry/ml/mlfoundry_api.py +1576 -0
  375. truefoundry-0.13.6/truefoundry/ml/mlfoundry_run.py +1198 -0
  376. truefoundry-0.13.6/truefoundry/ml/model_framework.py +540 -0
  377. truefoundry-0.13.6/truefoundry/ml/prompt_utils.py +70 -0
  378. truefoundry-0.13.6/truefoundry/ml/run_utils.py +79 -0
  379. truefoundry-0.13.6/truefoundry/ml/session.py +145 -0
  380. truefoundry-0.13.6/truefoundry/ml/validation_utils.py +348 -0
  381. truefoundry-0.13.6/truefoundry/pydantic_v1.py +12 -0
  382. truefoundry-0.13.6/truefoundry/version.py +9 -0
  383. truefoundry-0.13.6/truefoundry/workflow/__init__.py +53 -0
  384. truefoundry-0.13.6/truefoundry/workflow/container_task.py +12 -0
  385. truefoundry-0.13.6/truefoundry/workflow/map_task.py +48 -0
  386. truefoundry-0.13.6/truefoundry/workflow/python_task.py +32 -0
  387. truefoundry-0.13.6/truefoundry/workflow/remote_filesystem/__init__.py +6 -0
  388. truefoundry-0.13.6/truefoundry/workflow/remote_filesystem/logger.py +36 -0
  389. truefoundry-0.13.6/truefoundry/workflow/remote_filesystem/tfy_signed_url_client.py +330 -0
  390. truefoundry-0.13.6/truefoundry/workflow/remote_filesystem/tfy_signed_url_fs.py +367 -0
  391. truefoundry-0.13.6/truefoundry/workflow/spark_task.py +91 -0
  392. truefoundry-0.13.6/truefoundry/workflow/task.py +50 -0
  393. truefoundry-0.13.6/truefoundry/workflow/workflow.py +121 -0
@@ -0,0 +1,156 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib64/
18
+ parts/
19
+ sdist/
20
+ var/
21
+ wheels/
22
+ pip-wheel-metadata/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+
53
+ # Translations
54
+ *.mo
55
+ *.pot
56
+
57
+ # Django stuff:
58
+ *.log
59
+ local_settings.py
60
+ db.sqlite3
61
+ db.sqlite3-journal
62
+
63
+ # Flask stuff:
64
+ instance/
65
+ .webassets-cache
66
+
67
+ # Scrapy stuff:
68
+ .scrapy
69
+
70
+ # Sphinx documentation
71
+ docs/_build/
72
+
73
+ # PyBuilder
74
+ target/
75
+
76
+ # Jupyter Notebook
77
+ .ipynb_checkpoints
78
+
79
+ # IPython
80
+ profile_default/
81
+ ipython_config.py
82
+
83
+ # pyenv
84
+ .python-version
85
+
86
+ # pipenv
87
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
88
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
89
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
90
+ # install all needed dependencies.
91
+ #Pipfile.lock
92
+
93
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
94
+ __pypackages__/
95
+
96
+ # Celery stuff
97
+ celerybeat-schedule
98
+ celerybeat.pid
99
+
100
+ # SageMath parsed files
101
+ *.sage.py
102
+
103
+ # Environments
104
+ *.env
105
+ .venv
106
+ env/
107
+ venv/
108
+ ENV/
109
+ env.bak/
110
+ venv.bak/
111
+
112
+ # Spyder project settings
113
+ .spyderproject
114
+ .spyproject
115
+
116
+ # Rope project settings
117
+ .ropeproject
118
+
119
+ # mkdocs documentation
120
+ /site
121
+
122
+ # mypy
123
+ .mypy_cache/
124
+ .dmypy.json
125
+ dmypy.json
126
+
127
+ # Pyre type checker
128
+ .pyre/
129
+
130
+
131
+ # mlflow local files
132
+ mlruns/
133
+ mlf/
134
+
135
+ # local build files
136
+ servicefoundry/
137
+ tmp/
138
+
139
+ # dataset files
140
+ *.gz
141
+ aclImdb/
142
+
143
+ # Jetbrains files
144
+ .idea/
145
+
146
+ # VSCode files
147
+ .vscode/
148
+
149
+ # Mac Poop
150
+ **/.DS_Store
151
+
152
+ .mypy-errors.txt
153
+
154
+ almond-output*
155
+ rt*.jar
156
+ hsperfdata_*
@@ -0,0 +1,76 @@
1
+ Metadata-Version: 2.4
2
+ Name: truefoundry
3
+ Version: 0.13.6
4
+ Summary: TrueFoundry CLI
5
+ Author-email: TrueFoundry Team <abhishek@truefoundry.com>
6
+ Requires-Python: <3.15,>=3.8.1
7
+ Requires-Dist: aenum<4.0.0,>=3.0.0
8
+ Requires-Dist: click<9.0.0,>=7.0.0
9
+ Requires-Dist: coolname<2.0.0,>=1.1.0
10
+ Requires-Dist: docker<8.0.0,>=6.1.2
11
+ Requires-Dist: filelock<4.0.0,>=3.8.0
12
+ Requires-Dist: gitignorefile<2.0.0,>=1.1.2
13
+ Requires-Dist: gitpython<4.0.0,>=3.1.43
14
+ Requires-Dist: importlib-metadata<9.0.0,>=4.11.3
15
+ Requires-Dist: importlib-resources<7.0.0,>=5.2.0
16
+ Requires-Dist: jinja2<4.0.0,>=3.1.6
17
+ Requires-Dist: mako<2.0.0,>=1.1.6
18
+ Requires-Dist: numpy<3.0.0,>=1.23.0
19
+ Requires-Dist: openai<2.0.0,>=1.16.2
20
+ Requires-Dist: packaging<26.0,>=20.0
21
+ Requires-Dist: pydantic<3.0.0,>=1.8.2
22
+ Requires-Dist: pygments<3.0.0,>=2.12.0
23
+ Requires-Dist: pyjwt<3.0.0,>=2.0.0
24
+ Requires-Dist: python-dateutil<3.0.0,>=2.8.2
25
+ Requires-Dist: python-dotenv<2.0.0,>=1.0.1
26
+ Requires-Dist: python-socketio[client]<6.0.0,>=5.5.2
27
+ Requires-Dist: pyyaml<7.0.0,>=6.0.0
28
+ Requires-Dist: questionary<2.0.0,>=1.10.0
29
+ Requires-Dist: requests<3.0.0,>=2.18.0
30
+ Requires-Dist: requirements-parser<0.12.0,>=0.11.0
31
+ Requires-Dist: rich-click<2.0.0,>=1.2.1
32
+ Requires-Dist: rich<14.0.0,>=13.7.1
33
+ Requires-Dist: tqdm<5.0.0,>=4.0.0
34
+ Requires-Dist: truefoundry-sdk<0.2.0,>=0.1.16
35
+ Requires-Dist: typing-extensions>=4.0
36
+ Requires-Dist: urllib3<3,>=1.26.18
37
+ Requires-Dist: yq<4.0.0,>=3.1.0
38
+ Provides-Extra: ai
39
+ Requires-Dist: mcp==1.9.4; (python_version >= '3.10') and extra == 'ai'
40
+ Provides-Extra: spark
41
+ Requires-Dist: flytekit==1.15.3; (python_version >= '3.9' and python_version <= '3.12') and extra == 'spark'
42
+ Requires-Dist: flytekitplugins-spark==1.15.3; (python_version >= '3.9' and python_version <= '3.12') and extra == 'spark'
43
+ Provides-Extra: workflow
44
+ Requires-Dist: flytekit==1.15.3; (python_version >= '3.9' and python_version <= '3.12') and extra == 'workflow'
45
+ Description-Content-Type: text/markdown
46
+
47
+ # TrueFoundry
48
+
49
+ TrueFoundry library to help you interact with the platform programmatically by
50
+
51
+ - Interacting with the deployments side of TrueFoundry, enabling you to manage workspaces, deployments, applications, and view logs.
52
+ - Providing experiment tracking capabilities, allowing you to track ML experiments and interact with ML repositories within TrueFoundry.
53
+
54
+ You can access the health of your service, monitoring links, deployed endpoints and track metadata and artifacts by logging on to TrueFoundry's dashboard.
55
+
56
+ ## Installation
57
+
58
+ To install the `TrueFoundry CLI`, you can use pip:
59
+
60
+ ```bash
61
+ pip install truefoundry
62
+ ```
63
+
64
+ To install the `TrueFoundry CLI` with Workflow deployment features, you can use pip:
65
+
66
+ ```bash
67
+ pip install truefoundry[workflow]
68
+ ```
69
+
70
+ ## Examples
71
+
72
+ https://github.com/truefoundry/getting-started-examples
73
+
74
+ ## Documentation
75
+
76
+ https://docs.truefoundry.com/
@@ -0,0 +1,30 @@
1
+ # TrueFoundry
2
+
3
+ TrueFoundry library to help you interact with the platform programmatically by
4
+
5
+ - Interacting with the deployments side of TrueFoundry, enabling you to manage workspaces, deployments, applications, and view logs.
6
+ - Providing experiment tracking capabilities, allowing you to track ML experiments and interact with ML repositories within TrueFoundry.
7
+
8
+ You can access the health of your service, monitoring links, deployed endpoints and track metadata and artifacts by logging on to TrueFoundry's dashboard.
9
+
10
+ ## Installation
11
+
12
+ To install the `TrueFoundry CLI`, you can use pip:
13
+
14
+ ```bash
15
+ pip install truefoundry
16
+ ```
17
+
18
+ To install the `TrueFoundry CLI` with Workflow deployment features, you can use pip:
19
+
20
+ ```bash
21
+ pip install truefoundry[workflow]
22
+ ```
23
+
24
+ ## Examples
25
+
26
+ https://github.com/truefoundry/getting-started-examples
27
+
28
+ ## Documentation
29
+
30
+ https://docs.truefoundry.com/
@@ -0,0 +1,194 @@
1
+ [project]
2
+ name = "truefoundry"
3
+ version = "0.13.6" # This is a placeholder version, it will be replaced when releasing
4
+ requires-python = ">=3.8.1,<3.15"
5
+ description = "TrueFoundry CLI"
6
+ authors = [{ name = "TrueFoundry Team", email = "abhishek@truefoundry.com" }]
7
+ readme = "README.md"
8
+ dependencies = [
9
+ "aenum>=3.0.0,<4.0.0",
10
+ "click>=7.0.0,<9.0.0",
11
+ "coolname>=1.1.0,<2.0.0",
12
+ "docker>=6.1.2,<8.0.0",
13
+ "filelock>=3.8.0,<4.0.0",
14
+ "gitignorefile>=1.1.2,<2.0.0",
15
+ "GitPython>=3.1.43,<4.0.0",
16
+ "importlib-metadata>=4.11.3,<9.0.0",
17
+ "importlib-resources>=5.2.0,<7.0.0",
18
+ "Mako>=1.1.6,<2.0.0",
19
+ "openai>=1.16.2,<2.0.0",
20
+ "packaging>=20.0,<26.0",
21
+ "pydantic>=1.8.2,<3.0.0",
22
+ "pygments>=2.12.0,<3.0.0",
23
+ "PyJWT>=2.0.0,<3.0.0",
24
+ "python-dateutil>=2.8.2,<3.0.0",
25
+ "python-dotenv>=1.0.1,<2.0.0",
26
+ "python-socketio[client]>=5.5.2,<6.0.0",
27
+ "PyYAML>=6.0.0,<7.0.0",
28
+ "questionary>=1.10.0,<2.0.0",
29
+ "requests>=2.18.0,<3.0.0",
30
+ "requirements-parser>=0.11.0,<0.12.0",
31
+ "rich-click>=1.2.1,<2.0.0",
32
+ "rich>=13.7.1,<14.0.0",
33
+ "tqdm>=4.0.0,<5.0.0",
34
+ "truefoundry-sdk>=0.1.16,<0.2.0",
35
+ "typing-extensions>=4.0",
36
+ "urllib3>=1.26.18,<3",
37
+ "yq>=3.1.0,<4.0.0",
38
+ # Check and try to eliminate libs below this comment
39
+ "numpy>=1.23.0,<3.0.0",
40
+ "Jinja2>=3.1.6,<4.0.0"
41
+ ]
42
+
43
+ [project.optional-dependencies]
44
+ workflow = [
45
+ "flytekit==1.15.3; python_version >= '3.9' and python_version <= '3.12'",
46
+ ]
47
+ spark = [
48
+ "flytekit==1.15.3; python_version >= '3.9' and python_version <= '3.12'",
49
+ "flytekitplugins-spark==1.15.3; python_version >= '3.9' and python_version <= '3.12'",
50
+ ]
51
+ ai = [
52
+ "mcp==1.9.4 ; python_version >= '3.10'",
53
+ ]
54
+
55
+ [project.scripts]
56
+ tfy = "truefoundry.cli.__main__:main"
57
+ truefoundry = "truefoundry.cli.__main__:main"
58
+
59
+ [dependency-groups]
60
+ dev = [
61
+ "accelerate>=1.0.0,<2.0.0",
62
+ "datasets>=3.0.0,<5.0.0",
63
+ "ipykernel>=6.16.0",
64
+ "ipython>=7.10.0",
65
+ "ipywidgets>=8.0.0",
66
+ "matplotlib>=3.0.0,<4.0.0",
67
+ "mypy>=1.14.1",
68
+ "omegaconf==2.3",
69
+ "pandas>=1.0.0,<3.0.0; python_version < '3.10'",
70
+ "pandas>=1.4.0,<3.0.0; python_version >= '3.10'",
71
+ "Pillow>=9.1.1,<11.0.0",
72
+ "plotly>=5.8.2,<6.0.0",
73
+ "pre-commit>=3.5.0,<4.0.0",
74
+ "pytest-env>=1.1.5,<2.0.0",
75
+ "pytest>=8.2.2,<9.0.0",
76
+ "ruff>=0.9.4",
77
+ "scikit-learn>=1.3.0,<2.0.0",
78
+ "seaborn>=0.13.0,<0.14.0",
79
+ "transformers>=4.0.0,<5.0.0",
80
+ "xgboost>=2.1.3,<3.0.0",
81
+
82
+ # typing stubs
83
+ "types-PyYAML",
84
+ "types-pytz",
85
+ "types-python-dateutil",
86
+ "types-protobuf",
87
+ "types-pexpect",
88
+ "types-docutils",
89
+ "types-defusedxml",
90
+ "types-decorator",
91
+ "types-colorama",
92
+ "types-cffi",
93
+ "types-requests",
94
+ "types-Pygments",
95
+ "pandas-stubs",
96
+ "types-tqdm",
97
+ ]
98
+
99
+ [build-system]
100
+ requires = ["hatchling"]
101
+ build-backend = "hatchling.build"
102
+ [tool.hatch.build.targets.sdist]
103
+ include = [
104
+ "truefoundry/"
105
+ ]
106
+ [tool.hatch.metadata]
107
+ allow-direct-references = true
108
+
109
+ [tool.ruff]
110
+ target-version = "py38"
111
+ exclude = [
112
+ ".venv",
113
+ "venv",
114
+ "repos",
115
+ ]
116
+
117
+ [tool.ruff.lint]
118
+ select = [
119
+ "E", # pycodestyle errors
120
+ "W", # pycodestyle warnings
121
+ "F", # pyflakes
122
+ "C", # flake8-comprehensions
123
+ "B", # flake8-bugbear
124
+ "Q", # flake8-quotes
125
+ "I",
126
+ "T10",
127
+ "ASYNC",
128
+ "NPY201",
129
+ ]
130
+ ignore = ["E501"]
131
+
132
+ [tool.ruff.lint.flake8-quotes]
133
+ docstring-quotes = "double"
134
+ inline-quotes = "double"
135
+
136
+ [tool.ruff.lint.per-file-ignores]
137
+ "__init__.py" = ["F401"]
138
+ "truefoundry/ml/_autogen/client/*" = ["B028", "B904", "C901", "C409", "F841"]
139
+ "truefoundry/ml/_autogen/models/*" = ["E721"]
140
+ "truefoundry/ml/_autogen/client/models/*" = ["F821"]
141
+ "truefoundry/ml/_autogen/client/api_client.py" = ["E721"]
142
+ "truefoundry/deploy/lib/clients/_mcp_streamable_http.py" = ["C901", "ASYNC109"]
143
+
144
+ [tool.ruff.format]
145
+ quote-style = "double"
146
+
147
+ [tool.mypy]
148
+ plugins = ["pydantic.v1.mypy"]
149
+ install_types = true
150
+ non_interactive = true
151
+
152
+ allow_redefinition = false
153
+ allow_untyped_globals = false
154
+ check_untyped_defs = true
155
+ disallow_any_generics = true
156
+ disallow_incomplete_defs = true
157
+ disallow_subclassing_any = true
158
+ disallow_untyped_calls = true
159
+ disallow_untyped_decorators = true
160
+ disallow_untyped_defs = true
161
+ follow_imports = "silent"
162
+ force_uppercase_builtins = true
163
+ no_implicit_optional = true
164
+ no_implicit_reexport = true
165
+ strict_equality = true
166
+ strict_optional = true
167
+ warn_no_return = true
168
+ warn_redundant_casts = true
169
+ warn_return_any = true
170
+ warn_unreachable = true
171
+ warn_unused_ignores = true
172
+
173
+ packages = ["truefoundry"]
174
+ exclude = [
175
+ "^truefoundry/ml/_autogen",
176
+ "^truefoundry/deploy/_autogen",
177
+ "^truefoundry/pydantic_v1.py$",
178
+ "^truefoundry/autodeploy/",
179
+ ]
180
+ disable_error_code = ["import-untyped", "method-assign"]
181
+
182
+ [tool.pydantic-mypy]
183
+ init_forbid_extra = true
184
+ init_typed = true
185
+ warn_required_dynamic_aliases = true
186
+
187
+ [tool.pytest.ini_options]
188
+ env = [
189
+ "TFY_PYTHONBUILD_PYTHON_IMAGE_REPO=docker.io/truefoundrycloud/test/python",
190
+ "TFY_SPARK_BUILD_SPARK_IMAGE_REPO=public.ecr.aws/bitnami/spark",
191
+ ]
192
+
193
+ [tool.uv]
194
+ default-groups = ["dev"]
@@ -0,0 +1,48 @@
1
+ from truefoundry_sdk import (
2
+ AssistantMessage,
3
+ ChatPromptManifest,
4
+ DeveloperMessage,
5
+ FunctionSchema,
6
+ ModelConfiguration,
7
+ Parameters,
8
+ PromptVersion,
9
+ SystemMessage,
10
+ ToolCall,
11
+ ToolMessage,
12
+ ToolSchema,
13
+ UserMessage,
14
+ )
15
+ from truefoundry_sdk.client import TrueFoundry
16
+
17
+ from truefoundry._client import client
18
+ from truefoundry.common.warnings import (
19
+ suppress_truefoundry_deprecation_warnings,
20
+ suppress_truefoundry_ml_autogen_warnings,
21
+ surface_truefoundry_deprecation_warnings,
22
+ )
23
+ from truefoundry.deploy.core import login, logout
24
+ from truefoundry.ml.prompt_utils import render_prompt
25
+
26
+ suppress_truefoundry_ml_autogen_warnings()
27
+ surface_truefoundry_deprecation_warnings()
28
+
29
+ __all__ = [
30
+ "AssistantMessage",
31
+ "ChatPromptManifest",
32
+ "client",
33
+ "DeveloperMessage",
34
+ "FunctionSchema",
35
+ "login",
36
+ "logout",
37
+ "ModelConfiguration",
38
+ "Parameters",
39
+ "PromptVersion",
40
+ "render_prompt",
41
+ "suppress_truefoundry_deprecation_warnings",
42
+ "SystemMessage",
43
+ "TrueFoundry",
44
+ "ToolCall",
45
+ "ToolMessage",
46
+ "ToolSchema",
47
+ "UserMessage",
48
+ ]
File without changes
@@ -0,0 +1,156 @@
1
+ import asyncio
2
+ import logging
3
+ from typing import Callable, Dict, Optional, Tuple, Union
4
+
5
+ import rich_click as click
6
+ from openai import AsyncOpenAI
7
+ from rich.console import Console
8
+
9
+ from truefoundry.cli.config import CliConfig
10
+ from truefoundry.cli.const import COMMAND_CLS
11
+ from truefoundry.cli.util import handle_exception_wrapper, select_cluster
12
+ from truefoundry.common.constants import (
13
+ ENV_VARS,
14
+ TFY_ASK_MODEL_NAME_KEY,
15
+ TFY_ASK_OPENAI_API_KEY_KEY,
16
+ TFY_ASK_OPENAI_BASE_URL_KEY,
17
+ )
18
+ from truefoundry.common.session import Session
19
+ from truefoundry.common.utils import get_tfy_servers_config
20
+
21
+ console = Console()
22
+
23
+
24
+ class CustomAsyncOpenAI(AsyncOpenAI):
25
+ def __init__(
26
+ self, *, api_key: Optional[Union[str, Callable[[], str]]] = None, **kwargs
27
+ ):
28
+ self.__api_key_fn = None
29
+ if isinstance(api_key, str) or api_key is None:
30
+ _api_key = api_key
31
+ else:
32
+ self.__api_key_fn = api_key
33
+ _api_key = self.__api_key_fn()
34
+ super().__init__(api_key=_api_key, **kwargs)
35
+
36
+ @property
37
+ def auth_headers(self) -> Dict[str, str]:
38
+ if self.__api_key_fn is not None:
39
+ api_key = self.__api_key_fn()
40
+ else:
41
+ api_key = self.api_key
42
+ return {"Authorization": f"Bearer {api_key}"}
43
+
44
+
45
+ def _get_openai_client(session: Session) -> Tuple[CustomAsyncOpenAI, str]:
46
+ """
47
+ Returns an AsyncOpenAI client using either user-provided credentials or TrueFoundry LLM gateway.
48
+ """
49
+ if ENV_VARS.TFY_ASK_OPENAI_BASE_URL:
50
+ console.print(
51
+ f"Found custom OpenAI compatible API settings ([green]{TFY_ASK_OPENAI_BASE_URL_KEY}[/green]) in env"
52
+ )
53
+ if ENV_VARS.TFY_ASK_OPENAI_API_KEY:
54
+ console.print(
55
+ f"Found API key ([green]{TFY_ASK_OPENAI_API_KEY_KEY}[/green]) in env"
56
+ )
57
+ api_key = ENV_VARS.TFY_ASK_OPENAI_API_KEY
58
+ else:
59
+ console.print(
60
+ f"No API key found in env, using [yellow]EMPTY[/yellow] as API key"
61
+ f"\n[dim]Tip: To use a different API key, set the env var "
62
+ f"[green]{TFY_ASK_OPENAI_API_KEY_KEY}[/green] to the API key you want to use.[/dim]"
63
+ )
64
+ api_key = "EMPTY"
65
+ base_url = ENV_VARS.TFY_ASK_OPENAI_BASE_URL
66
+ default_model = "gpt-4o"
67
+ else:
68
+ tfy_servers_config = get_tfy_servers_config(session.tfy_host)
69
+ base_url = f"{tfy_servers_config.servicefoundry_server_url}/v1/tfy-ai/proxy/api/inference/openai"
70
+ console.print(
71
+ f"Using TrueFoundry Managed AI."
72
+ f"\n[dim]Tip: To use your own OpenAI API compatible API for the ask command, set the following env vars"
73
+ f"\n * [green]{TFY_ASK_OPENAI_BASE_URL_KEY}[/] to the base URL of your OpenAI compatible API. E.g. [yellow]https://api.openai.com/v1[/yellow]"
74
+ f"\n * [green]{TFY_ASK_OPENAI_API_KEY_KEY}[/] to the API key of your OpenAI compatible API."
75
+ f"[/dim]"
76
+ )
77
+ console.print("")
78
+
79
+ api_key = lambda: session.access_token # noqa: E731
80
+ default_model = "tfy-ai-openai/gpt-4o"
81
+ client = CustomAsyncOpenAI(
82
+ base_url=base_url,
83
+ api_key=api_key,
84
+ )
85
+ if ENV_VARS.TFY_ASK_MODEL_NAME:
86
+ openai_model = ENV_VARS.TFY_ASK_MODEL_NAME
87
+ console.print(
88
+ f"Using custom model from env [green]{TFY_ASK_MODEL_NAME_KEY}[/green]: [yellow]{openai_model}[/yellow]"
89
+ )
90
+ else:
91
+ openai_model = default_model
92
+ console.print(
93
+ f"Using default model: [yellow]{openai_model}[/yellow]"
94
+ f"\n[dim]Tip: To use a different model, set the env var "
95
+ f"[green]{TFY_ASK_MODEL_NAME_KEY}[/green] to the model name you want to use.[/dim]"
96
+ )
97
+ console.print("")
98
+
99
+ if ENV_VARS.TFY_ASK_OPENAI_BASE_URL:
100
+ console.print(
101
+ "[dim][yellow]This operation will use tokens from your model provider and may incur costs.[/yellow][/dim]"
102
+ )
103
+ console.print("")
104
+ return client, openai_model
105
+
106
+
107
+ @click.command(name="ask", cls=COMMAND_CLS)
108
+ @click.option(
109
+ "-c",
110
+ "--cluster",
111
+ type=str,
112
+ required=False,
113
+ help="The cluster id from TrueFoundry. If not provided, an interactive prompt will list available clusters",
114
+ )
115
+ @click.pass_context
116
+ @handle_exception_wrapper
117
+ def ask_command(ctx, cluster: str) -> None:
118
+ """
119
+ Ask questions related to your Cluster in TrueFoundry.
120
+ """
121
+ from truefoundry._ask.client import ask_client
122
+
123
+ debug = CliConfig.debug
124
+ if debug:
125
+ _mcp_logger = logging.getLogger("mcp")
126
+ _mcp_logger.setLevel(logging.DEBUG)
127
+ _mcp_logger.addHandler(logging.StreamHandler())
128
+
129
+ session = Session.new()
130
+ console.print(
131
+ "\n[bold green]Welcome to the Ask Command![/bold green]\n"
132
+ "Use this command to ask questions and troubleshoot issues in your Kubernetes cluster managed by the TrueFoundry Control Plane.\n"
133
+ "It helps you investigate and identify potential problems across services, pods, deployments, and more.\n"
134
+ )
135
+ openai_client, openai_model = _get_openai_client(session=session)
136
+ if not cluster:
137
+ console.print(
138
+ "[dim]Tip: You can specify a cluster using the '--cluster' option, or select one interactively from the list.[/dim]\n"
139
+ )
140
+ cluster = select_cluster(cluster)
141
+ tfy_servers_config = get_tfy_servers_config(session.tfy_host)
142
+ mcp_server_url = f"{tfy_servers_config.servicefoundry_server_url}/v1/k8s-mcp"
143
+ asyncio.run(
144
+ ask_client(
145
+ cluster=cluster,
146
+ server_url=mcp_server_url,
147
+ token=session.access_token,
148
+ openai_client=openai_client,
149
+ openai_model=openai_model,
150
+ debug=debug,
151
+ )
152
+ )
153
+
154
+
155
+ def get_ask_command():
156
+ return ask_command