truefoundry 0.4.0rc2__tar.gz → 0.4.0rc3__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 (349) hide show
  1. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/PKG-INFO +1 -1
  2. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/pyproject.toml +13 -1
  3. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/__init__.py +2 -0
  4. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/agents/developer.py +1 -1
  5. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/agents/project_identifier.py +2 -2
  6. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/agents/tester.py +1 -1
  7. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/cli.py +1 -1
  8. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/tools/list_files.py +1 -1
  9. {truefoundry-0.4.0rc2/truefoundry/deploy/lib/auth → truefoundry-0.4.0rc3/truefoundry/common}/auth_service_client.py +50 -40
  10. truefoundry-0.4.0rc3/truefoundry/common/constants.py +12 -0
  11. {truefoundry-0.4.0rc2/truefoundry/deploy/lib/auth → truefoundry-0.4.0rc3/truefoundry/common}/credential_file_manager.py +7 -7
  12. {truefoundry-0.4.0rc2/truefoundry/deploy/lib/auth → truefoundry-0.4.0rc3/truefoundry/common}/credential_provider.py +9 -12
  13. {truefoundry-0.4.0rc2/truefoundry/ml/services → truefoundry-0.4.0rc3/truefoundry/common}/entities.py +57 -41
  14. {truefoundry-0.4.0rc2/truefoundry/deploy/lib → truefoundry-0.4.0rc3/truefoundry/common}/exceptions.py +0 -9
  15. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/common/request_utils.py +36 -8
  16. truefoundry-0.4.0rc3/truefoundry/common/servicefoundry_client.py +91 -0
  17. truefoundry-0.4.0rc3/truefoundry/common/utils.py +56 -0
  18. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/auto_gen/models.py +4 -6
  19. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/cli.py +2 -0
  20. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/apply_command.py +1 -1
  21. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/build_command.py +1 -1
  22. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/deploy_command.py +1 -1
  23. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/login_command.py +2 -2
  24. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/patch_application_command.py +1 -1
  25. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/patch_command.py +1 -1
  26. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/terminate_comand.py +1 -1
  27. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/util.py +1 -1
  28. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/function_service/remote/remote.py +1 -1
  29. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/auth/servicefoundry_session.py +2 -2
  30. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/clients/servicefoundry_client.py +120 -150
  31. truefoundry-0.4.0rc3/truefoundry/deploy/lib/const.py +9 -0
  32. truefoundry-0.4.0rc3/truefoundry/deploy/lib/exceptions.py +10 -0
  33. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/model/entity.py +1 -112
  34. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/session.py +13 -26
  35. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/util.py +0 -37
  36. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/v2/lib/deploy.py +3 -3
  37. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/__init__.py +0 -2
  38. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/artifact/truefoundry_artifact_repo.py +63 -22
  39. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/__init__.py +0 -3
  40. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api/experiments_api.py +0 -165
  41. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/__init__.py +0 -3
  42. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/artifact_dto.py +6 -6
  43. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/artifact_version_dto.py +8 -8
  44. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_artifact_response_dto.py +2 -3
  45. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +2 -3
  46. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_python_deployment_config_request_dto.py +2 -2
  47. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_python_deployment_config_response_dto.py +2 -3
  48. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_run_request_dto.py +5 -5
  49. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_run_response_dto.py +2 -3
  50. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/dataset_dto.py +10 -10
  51. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/experiment_dto.py +18 -18
  52. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_latest_run_log_response_dto.py +2 -3
  53. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_tenant_id_response_dto.py +4 -5
  54. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/model_dto.py +6 -6
  55. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/model_version_dto.py +15 -8
  56. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/run_info_dto.py +10 -10
  57. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/update_run_response_dto.py +2 -3
  58. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client_README.md +0 -2
  59. truefoundry-0.4.0rc3/truefoundry/ml/clients/entities.py +8 -0
  60. truefoundry-0.4.0rc2/truefoundry/ml/services/servicefoundry_service.py → truefoundry-0.4.0rc3/truefoundry/ml/clients/servicefoundry_client.py +20 -10
  61. {truefoundry-0.4.0rc2/truefoundry/ml/services → truefoundry-0.4.0rc3/truefoundry/ml/clients}/utils.py +2 -2
  62. truefoundry-0.4.0rc3/truefoundry/ml/env_vars.py +9 -0
  63. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/internal_namespace.py +8 -8
  64. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/artifacts/artifact.py +7 -3
  65. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/artifacts/dataset.py +1 -1
  66. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/artifacts/model.py +7 -8
  67. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/image/image.py +7 -8
  68. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/image/image_normalizer.py +7 -6
  69. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/mlfoundry_api.py +5 -17
  70. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/mlfoundry_run.py +0 -5
  71. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/run_utils.py +1 -10
  72. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/session.py +14 -117
  73. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/pydantic_v1.py +1 -1
  74. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/workflow/__init__.py +16 -1
  75. truefoundry-0.4.0rc2/truefoundry/deploy/lib/clients/utils.py +0 -41
  76. truefoundry-0.4.0rc2/truefoundry/deploy/lib/const.py +0 -43
  77. truefoundry-0.4.0rc2/truefoundry/ml/autogen/client/models/backfill_default_storage_integration_id_request_dto.py +0 -67
  78. truefoundry-0.4.0rc2/truefoundry/ml/env_vars.py +0 -13
  79. truefoundry-0.4.0rc2/truefoundry/ml/login.py +0 -241
  80. truefoundry-0.4.0rc2/truefoundry/ml/services/auth_service.py +0 -109
  81. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/README.md +0 -0
  82. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/__init__.py +0 -0
  83. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/agents/__init__.py +0 -0
  84. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/agents/base.py +0 -0
  85. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/constants.py +0 -0
  86. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/exception.py +0 -0
  87. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/logger.py +0 -0
  88. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/tools/__init__.py +0 -0
  89. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/tools/ask.py +0 -0
  90. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/tools/base.py +0 -0
  91. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/tools/commit.py +0 -0
  92. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/tools/docker_build.py +0 -0
  93. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/tools/docker_run.py +0 -0
  94. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/tools/file_type_counts.py +0 -0
  95. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/tools/read_file.py +0 -0
  96. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/tools/send_request.py +0 -0
  97. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/tools/write_file.py +0 -0
  98. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/utils/client.py +0 -0
  99. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/utils/diff.py +0 -0
  100. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/autodeploy/utils/pydantic_compat.py +0 -0
  101. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/cli/__init__.py +0 -0
  102. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/cli/__main__.py +0 -0
  103. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/common/__init__.py +0 -0
  104. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/__init__.py +0 -0
  105. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/builder/__init__.py +0 -0
  106. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/builder/builders/__init__.py +0 -0
  107. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/builder/builders/dockerfile.py +0 -0
  108. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +0 -0
  109. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/dockerfile_template.py +0 -0
  110. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +0 -0
  111. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +0 -0
  112. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/builder/docker_service.py +0 -0
  113. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/__init__.py +0 -0
  114. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/__init__.py +0 -0
  115. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/build_logs_command.py +0 -0
  116. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/create_command.py +0 -0
  117. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/delete_command.py +0 -0
  118. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/get_command.py +0 -0
  119. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/list_command.py +0 -0
  120. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/logout_command.py +0 -0
  121. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/logs_command.py +0 -0
  122. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/redeploy_command.py +0 -0
  123. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/commands/trigger_command.py +0 -0
  124. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/config.py +0 -0
  125. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/console.py +0 -0
  126. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/const.py +0 -0
  127. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/cli/display_util.py +0 -0
  128. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/core/__init__.py +0 -0
  129. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/core/login.py +0 -0
  130. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/core/logout.py +0 -0
  131. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/function_service/__init__.py +0 -0
  132. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/function_service/__main__.py +0 -0
  133. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/function_service/app.py +0 -0
  134. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/function_service/build.py +0 -0
  135. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/function_service/remote/__init__.py +0 -0
  136. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/function_service/remote/context.py +0 -0
  137. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/function_service/remote/method.py +0 -0
  138. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/function_service/route.py +0 -0
  139. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/function_service/service.py +0 -0
  140. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/function_service/utils.py +0 -0
  141. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/io/__init__.py +0 -0
  142. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/io/output_callback.py +0 -0
  143. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/io/rich_output_callback.py +0 -0
  144. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/json_util.py +0 -0
  145. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/__init__.py +0 -0
  146. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/clients/__init__.py +0 -0
  147. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/clients/shell_client.py +0 -0
  148. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/dao/__init__.py +0 -0
  149. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/dao/application.py +0 -0
  150. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/dao/apply.py +0 -0
  151. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/dao/version.py +0 -0
  152. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/dao/workspace.py +0 -0
  153. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/logs_utils.py +0 -0
  154. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/messages.py +0 -0
  155. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/model/__init__.py +0 -0
  156. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/lib/win32.py +0 -0
  157. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/python_deploy_codegen.py +0 -0
  158. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/v2/__init__.py +0 -0
  159. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/v2/lib/__init__.py +0 -0
  160. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/v2/lib/deploy_workflow.py +0 -0
  161. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/v2/lib/deployable_patched_models.py +0 -0
  162. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/v2/lib/models.py +0 -0
  163. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/v2/lib/patched_models.py +0 -0
  164. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/deploy/v2/lib/source.py +0 -0
  165. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/langchain/__init__.py +0 -0
  166. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/langchain/deprecated.py +0 -0
  167. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/langchain/truefoundry_chat.py +0 -0
  168. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/langchain/truefoundry_embeddings.py +0 -0
  169. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/langchain/truefoundry_llm.py +0 -0
  170. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/langchain/utils.py +0 -0
  171. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/logger.py +0 -0
  172. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/artifact/__init__.py +0 -0
  173. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/__init__.py +0 -0
  174. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api/__init__.py +0 -0
  175. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api/auth_api.py +0 -0
  176. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api/deprecated_api.py +0 -0
  177. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api/health_api.py +0 -0
  178. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api/metrics_api.py +0 -0
  179. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +0 -0
  180. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api/python_deployment_config_api.py +0 -0
  181. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api/run_artifacts_api.py +0 -0
  182. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api/runs_api.py +0 -0
  183. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api_client.py +0 -0
  184. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/api_response.py +0 -0
  185. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/configuration.py +0 -0
  186. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/exceptions.py +0 -0
  187. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/add_custom_metrics_to_model_version_request_dto.py +0 -0
  188. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py +0 -0
  189. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/agent.py +0 -0
  190. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/agent_app.py +0 -0
  191. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/agent_open_api_tool.py +0 -0
  192. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +0 -0
  193. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/agent_with_fqn.py +0 -0
  194. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/artifact_response_dto.py +0 -0
  195. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/artifact_type.py +0 -0
  196. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/artifact_version_response_dto.py +0 -0
  197. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/artifact_version_status.py +0 -0
  198. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/assistant_message.py +0 -0
  199. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/authorize_user_for_model_request_dto.py +0 -0
  200. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/authorize_user_for_model_version_request_dto.py +0 -0
  201. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/blob_storage_reference.py +0 -0
  202. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/body_get_search_runs_get.py +0 -0
  203. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/chat_prompt.py +0 -0
  204. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/chat_prompt_messages_inner.py +0 -0
  205. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/columns_dto.py +0 -0
  206. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/content.py +0 -0
  207. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/content1.py +0 -0
  208. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/content2.py +0 -0
  209. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/content2_any_of_inner.py +0 -0
  210. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_artifact_request_dto.py +0 -0
  211. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_artifact_version_request_dto.py +0 -0
  212. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_dataset_request_dto.py +0 -0
  213. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_experiment_request_dto.py +0 -0
  214. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_experiment_response_dto.py +0 -0
  215. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_model_version_request_dto.py +0 -0
  216. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_request_dto.py +0 -0
  217. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_response_dto.py +0 -0
  218. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/create_multi_part_upload_request_dto.py +0 -0
  219. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/dataset_response_dto.py +0 -0
  220. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/delete_artifact_versions_request_dto.py +0 -0
  221. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/delete_dataset_request_dto.py +0 -0
  222. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/delete_model_version_request_dto.py +0 -0
  223. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/delete_run_request.py +0 -0
  224. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/delete_tag_request_dto.py +0 -0
  225. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/experiment_id_request_dto.py +0 -0
  226. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/experiment_response_dto.py +0 -0
  227. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/experiment_tag_dto.py +0 -0
  228. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/feature_dto.py +0 -0
  229. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/feature_value_type.py +0 -0
  230. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/file_info_dto.py +0 -0
  231. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +0 -0
  232. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_experiment_response_dto.py +0 -0
  233. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_metric_history_response.py +0 -0
  234. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_signed_url_for_dataset_write_request_dto.py +0 -0
  235. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +0 -0
  236. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +0 -0
  237. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +0 -0
  238. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +0 -0
  239. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_request_dto.py +0 -0
  240. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_response_dto.py +0 -0
  241. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_write_response_dto.py +0 -0
  242. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/http_validation_error.py +0 -0
  243. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/image_content_part.py +0 -0
  244. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/image_url.py +0 -0
  245. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/internal_metadata.py +0 -0
  246. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/latest_run_log_dto.py +0 -0
  247. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_artifact_versions_request_dto.py +0 -0
  248. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_artifact_versions_response_dto.py +0 -0
  249. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_artifacts_request_dto.py +0 -0
  250. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_artifacts_response_dto.py +0 -0
  251. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_colums_response_dto.py +0 -0
  252. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_datasets_request_dto.py +0 -0
  253. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_datasets_response_dto.py +0 -0
  254. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_experiments_response_dto.py +0 -0
  255. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_files_for_artifact_version_request_dto.py +0 -0
  256. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_files_for_artifact_versions_response_dto.py +0 -0
  257. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_files_for_dataset_request_dto.py +0 -0
  258. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_files_for_dataset_response_dto.py +0 -0
  259. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_latest_run_logs_response_dto.py +0 -0
  260. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_metric_history_request_dto.py +0 -0
  261. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_metric_history_response_dto.py +0 -0
  262. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_model_version_response_dto.py +0 -0
  263. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_model_versions_request_dto.py +0 -0
  264. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_models_request_dto.py +0 -0
  265. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_models_response_dto.py +0 -0
  266. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_run_artifacts_response_dto.py +0 -0
  267. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_run_logs_response_dto.py +0 -0
  268. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/list_seed_experiments_response_dto.py +0 -0
  269. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/log_batch_request_dto.py +0 -0
  270. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/log_metric_request_dto.py +0 -0
  271. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/log_param_request_dto.py +0 -0
  272. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/method.py +0 -0
  273. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/metric_collection_dto.py +0 -0
  274. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/metric_dto.py +0 -0
  275. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/mime_type.py +0 -0
  276. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/model_configuration.py +0 -0
  277. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/model_response_dto.py +0 -0
  278. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/model_schema_dto.py +0 -0
  279. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/model_version_response_dto.py +0 -0
  280. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/multi_part_upload_dto.py +0 -0
  281. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/multi_part_upload_response_dto.py +0 -0
  282. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/multi_part_upload_storage_provider.py +0 -0
  283. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/notify_artifact_version_failure_dto.py +0 -0
  284. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/openapi_spec.py +0 -0
  285. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/param_dto.py +0 -0
  286. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/parameters.py +0 -0
  287. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/prediction_type.py +0 -0
  288. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/resolve_agent_app_response_dto.py +0 -0
  289. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/restore_run_request_dto.py +0 -0
  290. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/run_data_dto.py +0 -0
  291. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/run_dto.py +0 -0
  292. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/run_log_dto.py +0 -0
  293. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/run_log_input_dto.py +0 -0
  294. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/run_response_dto.py +0 -0
  295. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/run_tag_dto.py +0 -0
  296. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/search_runs_request_dto.py +0 -0
  297. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/search_runs_response_dto.py +0 -0
  298. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/set_experiment_tag_request_dto.py +0 -0
  299. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/set_tag_request_dto.py +0 -0
  300. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/signed_url_dto.py +0 -0
  301. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/stop.py +0 -0
  302. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/store_run_logs_request_dto.py +0 -0
  303. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/system_message.py +0 -0
  304. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/text.py +0 -0
  305. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/text_content_part.py +0 -0
  306. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/update_artifact_version_request_dto.py +0 -0
  307. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/update_dataset_request_dto.py +0 -0
  308. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/update_experiment_request_dto.py +0 -0
  309. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +0 -0
  310. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/update_run_request_dto.py +0 -0
  311. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/url.py +0 -0
  312. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/user_message.py +0 -0
  313. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/validation_error.py +0 -0
  314. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/models/validation_error_loc_inner.py +0 -0
  315. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/autogen/client/rest.py +0 -0
  316. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/cli/__init__.py +0 -0
  317. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/cli/cli.py +0 -0
  318. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/cli/commands/__init__.py +0 -0
  319. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/cli/commands/download.py +0 -0
  320. {truefoundry-0.4.0rc2/truefoundry/ml/services → truefoundry-0.4.0rc3/truefoundry/ml/clients}/__init__.py +0 -0
  321. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/constants.py +0 -0
  322. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/entities.py +0 -0
  323. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/enums.py +0 -0
  324. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/exceptions.py +0 -0
  325. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/git_info.py +0 -0
  326. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/__init__.py +0 -0
  327. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/artifacts/constants.py +0 -0
  328. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/artifacts/general_artifact.py +0 -0
  329. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/artifacts/model_extras.py +0 -0
  330. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/artifacts/utils.py +0 -0
  331. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/image/__init__.py +0 -0
  332. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/image/constants.py +0 -0
  333. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/image/types.py +0 -0
  334. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/plot.py +0 -0
  335. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/pydantic_base.py +0 -0
  336. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/log_types/utils.py +0 -0
  337. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/logger.py +0 -0
  338. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/ml/validation_utils.py +0 -0
  339. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/version.py +0 -0
  340. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/workflow/container_task.py +0 -0
  341. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/workflow/example/deploy.sh +0 -0
  342. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/workflow/example/hello_world_package/workflow.py +0 -0
  343. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/workflow/example/package/test_workflow.py +0 -0
  344. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/workflow/example/truefoundry.yaml +0 -0
  345. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/workflow/example/workflow.yaml +0 -0
  346. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/workflow/map_task.py +0 -0
  347. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/workflow/python_task.py +0 -0
  348. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/workflow/task.py +0 -0
  349. {truefoundry-0.4.0rc2 → truefoundry-0.4.0rc3}/truefoundry/workflow/workflow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: truefoundry
3
- Version: 0.4.0rc2
3
+ Version: 0.4.0rc3
4
4
  Summary: Truefoundry CLI
5
5
  Author: Abhishek Choudhary
6
6
  Author-email: abhishek@truefoundry.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "truefoundry"
3
- version = "0.4.0rc2"
3
+ version = "0.4.0rc3"
4
4
  description = "Truefoundry CLI"
5
5
  authors = ["Abhishek Choudhary <abhishek@truefoundry.com>"]
6
6
  readme = "README.md"
@@ -77,6 +77,17 @@ shap = [
77
77
  { version = ">=0.40.0", python = "<3.12" },
78
78
  { version = ">=0.45.0", python = ">=3.12" },
79
79
  ]
80
+ pandas-stubs = "*"
81
+ types-Pygments = "*"
82
+ types-cffi = "*"
83
+ types-colorama = "*"
84
+ types-decorator = "*"
85
+ types-protobuf = "*"
86
+ types-python-dateutil = "*"
87
+ types-requests = "*"
88
+ types-six = "*"
89
+ types-tqdm = "*"
90
+
80
91
 
81
92
  [tool.poetry-dynamic-versioning]
82
93
  enable = false
@@ -137,6 +148,7 @@ warn_unreachable = true
137
148
  warn_unused_ignores = true
138
149
 
139
150
  packages = [
151
+ "truefoundry.common",
140
152
  "truefoundry.ml",
141
153
  ]
142
154
  exclude = [
@@ -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,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()
@@ -32,20 +29,20 @@ class CredentialProvider(ABC):
32
29
  class EnvCredentialProvider(CredentialProvider):
33
30
  def __init__(self) -> None:
34
31
  logger.debug("Using env var credential provider")
35
- api_key = os.getenv(API_KEY_ENV_NAME)
32
+ api_key = os.getenv(TFY_API_KEY_ENV_KEY)
36
33
  if not api_key:
37
34
  raise Exception(
38
- 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"
39
36
  )
40
37
  # TODO: Read host from cred file as well.
41
38
  base_url = resolve_base_url().strip("/")
42
39
  self._host = base_url
43
40
  self._auth_service = AuthServiceClient.from_base_url(base_url=base_url)
44
- self._token: Token = Token(access_token=api_key, refresh_token=None)
41
+ self._token: Token = Token(access_token=api_key, refresh_token=None) # type: ignore[call-arg]
45
42
 
46
43
  @staticmethod
47
44
  def can_provide() -> bool:
48
- return API_KEY_ENV_NAME in os.environ
45
+ return TFY_API_KEY_ENV_KEY in os.environ
49
46
 
50
47
  @property
51
48
  def token(self) -> Token:
@@ -1,7 +1,6 @@
1
- import enum
2
1
  import time
2
+ from enum import Enum
3
3
  from typing import Optional
4
- from urllib.parse import urlparse
5
4
 
6
5
  import jwt
7
6
  from typing_extensions import TypedDict
@@ -9,40 +8,21 @@ from typing_extensions import TypedDict
9
8
  from truefoundry.pydantic_v1 import BaseModel, Field, NonEmptyStr, validator
10
9
 
11
10
 
12
- class HostCreds(BaseModel):
13
- host: str
14
- token: Optional[str] = None
15
-
16
-
17
- class AuthServerInfo(BaseModel):
18
- tenant_name: NonEmptyStr
19
- auth_server_url: str
20
-
21
- class Config:
22
- allow_mutation = False
23
-
24
-
25
- class ArtifactCredential(BaseModel):
26
- run_id: str
27
- path: str
28
- signed_uri: str
29
-
30
-
31
- class UserType(enum.Enum):
11
+ class UserType(Enum):
32
12
  user = "user"
33
13
  serviceaccount = "serviceaccount"
34
14
 
35
15
 
36
16
  class UserInfo(BaseModel):
17
+ class Config:
18
+ allow_population_by_field_name = True
19
+ allow_mutation = False
20
+
37
21
  user_id: NonEmptyStr
38
22
  user_type: UserType = UserType.user
39
23
  email: Optional[str] = None
40
24
  tenant_name: NonEmptyStr = Field(alias="tenantName")
41
25
 
42
- class Config:
43
- allow_population_by_field_name = True
44
- allow_mutation = False
45
-
46
26
 
47
27
  class _DecodedToken(TypedDict):
48
28
  tenantName: str
@@ -62,7 +42,7 @@ class Token(BaseModel):
62
42
  allow_mutation = False
63
43
 
64
44
  @validator("decoded_value", always=True, pre=True)
65
- def _decode_jwt(cls, v, values, **kwargs):
45
+ def _decode_jwt(cls, v, values, **kwargs) -> _DecodedToken:
66
46
  access_token = values["access_token"]
67
47
  return jwt.decode(
68
48
  access_token,
@@ -75,34 +55,70 @@ class Token(BaseModel):
75
55
 
76
56
  @property
77
57
  def tenant_name(self) -> str:
78
- assert self.decoded_value is not None
79
58
  return self.decoded_value["tenantName"]
80
59
 
81
60
  def is_going_to_be_expired(self, buffer_in_seconds: int = 120) -> bool:
82
- assert self.decoded_value is not None
83
61
  exp = int(self.decoded_value["exp"])
84
62
  return (exp - time.time()) < buffer_in_seconds
85
63
 
86
64
  def to_user_info(self) -> UserInfo:
87
- assert self.decoded_value is not None
88
- return UserInfo(
65
+ return UserInfo( # type: ignore[call-arg]
89
66
  user_id=self.decoded_value["username"],
90
- email=(
91
- self.decoded_value["email"] if "email" in self.decoded_value else None
92
- ),
67
+ email=self.decoded_value["email"]
68
+ if "email" in self.decoded_value
69
+ else None,
93
70
  user_type=UserType(self.decoded_value.get("userType", UserType.user.value)),
94
- tenant_name=self.tenant_name, # type: ignore[call-arg]
71
+ tenant_name=self.tenant_name,
95
72
  )
96
73
 
97
74
 
98
- class DeviceCode(BaseModel):
99
- user_code: str = Field(alias="userCode")
100
- device_code: str = Field(alias="deviceCode")
75
+ class CredentialsFileContent(BaseModel):
76
+ class Config:
77
+ allow_mutation = False
78
+
79
+ access_token: NonEmptyStr = Field(repr=False)
80
+ refresh_token: Optional[NonEmptyStr] = Field(repr=False)
81
+ host: NonEmptyStr
82
+
83
+ def to_token(self) -> Token:
84
+ return Token( # type: ignore[call-arg]
85
+ access_token=self.access_token, refresh_token=self.refresh_token
86
+ )
87
+
88
+
89
+ class TenantInfo(BaseModel):
90
+ class Config:
91
+ allow_population_by_field_name = True
92
+ allow_mutation = False
93
+
94
+ tenant_name: NonEmptyStr = Field(alias="tenantName")
95
+ auth_server_url: str
96
+
101
97
 
98
+ class PythonSDKConfig(BaseModel):
102
99
  class Config:
103
100
  allow_population_by_field_name = True
104
101
  allow_mutation = False
105
102
 
106
- def get_user_clickable_url(self, tracking_uri: str) -> str:
107
- parsed_tracking_uri = urlparse(tracking_uri)
108
- return f"{parsed_tracking_uri.scheme}://{parsed_tracking_uri.netloc}/authorize/device?userCode={self.user_code}"
103
+ min_version: str = Field(alias="minVersion")
104
+ truefoundry_cli_min_version: str = Field(alias="truefoundryCliMinVersion")
105
+ use_sfy_server_auth_apis: Optional[bool] = Field(
106
+ alias="useSFYServerAuthAPIs", default=False
107
+ )
108
+
109
+
110
+ class DeviceCode(BaseModel):
111
+ class Config:
112
+ allow_population_by_field_name = True
113
+ allow_mutation = False
114
+
115
+ user_code: str = Field(alias="userCode")
116
+ device_code: str = Field(alias="deviceCode")
117
+ verification_url: Optional[str] = Field(alias="verificationURI")
118
+ complete_verification_url: Optional[str] = Field(alias="verificationURIComplete")
119
+ expires_in_seconds: int = Field(alias="expiresInSeconds", default=60)
120
+ interval_in_seconds: int = Field(alias="intervalInSeconds", default=1)
121
+ message: Optional[str] = Field(alias="message")
122
+
123
+ def get_user_clickable_url(self, auth_host: str) -> str:
124
+ return f"{auth_host}/authorize/device?userCode={self.user_code}"
@@ -10,12 +10,3 @@ class BadRequestException(Exception):
10
10
 
11
11
  def __str__(self):
12
12
  return self.message
13
-
14
-
15
- class ConfigurationException(Exception):
16
- def __init__(self, message: Optional[str] = None):
17
- super().__init__()
18
- self.message = message
19
-
20
- def __str__(self):
21
- return self.message
@@ -1,13 +1,38 @@
1
+ from typing import Optional
2
+
1
3
  import requests
4
+ from requests import Response
2
5
  from requests.adapters import HTTPAdapter
3
6
  from urllib3 import Retry
4
7
 
8
+ from truefoundry.common.exceptions import BadRequestException
9
+
10
+
11
+ def request_handling(response: Response):
12
+ try:
13
+ status_code = response.status_code
14
+ except Exception as e:
15
+ raise Exception("Unknown error occurred. Couldn't get status code.") from e
16
+ if 200 <= status_code <= 299:
17
+ if response.content == b"":
18
+ return None
19
+ return response.json()
20
+ if 400 <= status_code <= 499:
21
+ try:
22
+ message = str(response.json()["message"])
23
+ except Exception:
24
+ message = response.text
25
+ raise BadRequestException(status_code=response.status_code, message=message)
26
+ if 500 <= status_code <= 599:
27
+ raise Exception(response.content)
28
+
5
29
 
6
30
  def urllib3_retry(
7
- retries=5,
8
- backoff_factor=0.3,
9
- status_forcelist=(408, 429, 500, 502, 503, 504),
31
+ retries: int = 2,
32
+ backoff_factor: float = 0.3,
33
+ status_forcelist=(408, 429, 500, 502, 503, 504, 524),
10
34
  method_whitelist=frozenset({"GET", "POST"}),
35
+ raise_on_status: bool = False,
11
36
  ):
12
37
  retry = Retry(
13
38
  total=retries,
@@ -18,17 +43,19 @@ def urllib3_retry(
18
43
  allowed_methods=method_whitelist,
19
44
  status_forcelist=status_forcelist,
20
45
  respect_retry_after_header=True,
46
+ raise_on_status=raise_on_status,
21
47
  )
22
48
  return retry
23
49
 
24
50
 
25
51
  def requests_retry_session(
26
- retries=5,
27
- backoff_factor=0.3,
28
- status_forcelist=(408, 429, 500, 502, 503, 504),
52
+ retries: int = 2,
53
+ backoff_factor: float = 0.3,
54
+ status_forcelist=(408, 429, 500, 502, 503, 504, 524),
29
55
  method_whitelist=frozenset({"GET", "POST"}),
30
- session=None,
31
- ):
56
+ raise_on_status: bool = False,
57
+ session: Optional[requests.Session] = None,
58
+ ) -> requests.Session:
32
59
  """
33
60
  Returns a `requests` session with retry capabilities for certain HTTP status codes.
34
61
 
@@ -49,6 +76,7 @@ def requests_retry_session(
49
76
  backoff_factor=backoff_factor,
50
77
  status_forcelist=status_forcelist,
51
78
  method_whitelist=method_whitelist,
79
+ raise_on_status=raise_on_status,
52
80
  )
53
81
  adapter = HTTPAdapter(max_retries=retry)
54
82
  session.mount("http://", adapter)