flow-compute 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. flow_compute-2.0.0/.cache/uv/.gitignore +1 -0
  2. flow_compute-2.0.0/.cache/uv/CACHEDIR.TAG +1 -0
  3. flow_compute-2.0.0/.cache/uv/interpreter-v4/3f8e6472c467bf22/87e75c80a638d28d.msgpack +0 -0
  4. flow_compute-2.0.0/.cache/uv/sdists-v9/.git +0 -0
  5. flow_compute-2.0.0/.cache/uv/sdists-v9/.gitignore +0 -0
  6. flow_compute-2.0.0/.claude/settings.local.json +16 -0
  7. flow_compute-2.0.0/.github/workflows/publish.yml +59 -0
  8. flow_compute-2.0.0/.gitignore +118 -0
  9. flow_compute-2.0.0/COMPREHENSIVE_REVIEW_REPORT.md +212 -0
  10. flow_compute-2.0.0/CONTRIBUTING.md +47 -0
  11. flow_compute-2.0.0/LICENSE.txt +202 -0
  12. flow_compute-2.0.0/Makefile +31 -0
  13. flow_compute-2.0.0/PKG-INFO +1115 -0
  14. flow_compute-2.0.0/README.md +1052 -0
  15. flow_compute-2.0.0/RELEASE.md +79 -0
  16. flow_compute-2.0.0/SECURITY.md +23 -0
  17. flow_compute-2.0.0/TESTING.md +77 -0
  18. flow_compute-2.0.0/api_sketch.md +500 -0
  19. flow_compute-2.0.0/docs/API_REFERENCE.md +525 -0
  20. flow_compute-2.0.0/docs/README.md +99 -0
  21. flow_compute-2.0.0/docs/USER_GUIDE.md +280 -0
  22. flow_compute-2.0.0/docs/architecture/ARCHITECTURE.md +429 -0
  23. flow_compute-2.0.0/docs/architecture/ARCHITECTURE_OVERVIEW.md +145 -0
  24. flow_compute-2.0.0/docs/architecture/README.md +22 -0
  25. flow_compute-2.0.0/docs/getting-started/authentication.md +299 -0
  26. flow_compute-2.0.0/docs/getting-started/core-concepts.md +352 -0
  27. flow_compute-2.0.0/docs/getting-started/first-gpu-job.md +314 -0
  28. flow_compute-2.0.0/docs/getting-started/installation.md +105 -0
  29. flow_compute-2.0.0/docs/getting-started/quickstart.md +204 -0
  30. flow_compute-2.0.0/docs/guides/CONFIGURATION.md +85 -0
  31. flow_compute-2.0.0/docs/guides/DATA_HANDLING.md +284 -0
  32. flow_compute-2.0.0/docs/guides/DATA_MOUNTING_GUIDE.md +383 -0
  33. flow_compute-2.0.0/docs/guides/INVOKER_PATTERN.md +145 -0
  34. flow_compute-2.0.0/docs/guides/INVOKE_BEST_PRACTICES.md +286 -0
  35. flow_compute-2.0.0/docs/guides/README.md +50 -0
  36. flow_compute-2.0.0/docs/guides/decorator-pattern.md +207 -0
  37. flow_compute-2.0.0/docs/guides/running-jobs.md +526 -0
  38. flow_compute-2.0.0/docs/integrations/README.md +8 -0
  39. flow_compute-2.0.0/docs/integrations/pulumi/PULUMI_INTEGRATION.md +132 -0
  40. flow_compute-2.0.0/docs/integrations/pulumi/PULUMI_PATTERN.md +120 -0
  41. flow_compute-2.0.0/docs/integrations/pulumi/PULUMI_XAI_RECOMMENDATION.md +121 -0
  42. flow_compute-2.0.0/docs/integrations/pulumi/README.md +27 -0
  43. flow_compute-2.0.0/docs/integrations/pulumi/examples/basic.py +18 -0
  44. flow_compute-2.0.0/docs/integrations/pulumi/examples/infrastructure.py +113 -0
  45. flow_compute-2.0.0/docs/quickstart/COMPARISON_REPORT.md +193 -0
  46. flow_compute-2.0.0/docs/quickstart/IMPLEMENTATION_SUMMARY.md +141 -0
  47. flow_compute-2.0.0/docs/quickstart/_shared/cost-estimates.md +276 -0
  48. flow_compute-2.0.0/docs/quickstart/_shared/gpu-validation.py +343 -0
  49. flow_compute-2.0.0/docs/quickstart/cli/fine-tuning.md +534 -0
  50. flow_compute-2.0.0/docs/quickstart/cli/inference.md +484 -0
  51. flow_compute-2.0.0/docs/quickstart/cli/slurm-migration.md +433 -0
  52. flow_compute-2.0.0/docs/quickstart/cli/training.md +623 -0
  53. flow_compute-2.0.0/docs/quickstart/iac/examples/README.md +151 -0
  54. flow_compute-2.0.0/docs/quickstart/iac/examples/pulumi-typescript/Pulumi.yaml +6 -0
  55. flow_compute-2.0.0/docs/quickstart/iac/examples/pulumi-typescript/README.md +82 -0
  56. flow_compute-2.0.0/docs/quickstart/iac/examples/pulumi-typescript/index.ts +60 -0
  57. flow_compute-2.0.0/docs/quickstart/iac/examples/pulumi-typescript/package.json +20 -0
  58. flow_compute-2.0.0/docs/quickstart/iac/examples/terraform-basic/README.md +56 -0
  59. flow_compute-2.0.0/docs/quickstart/iac/examples/terraform-basic/main.tf +63 -0
  60. flow_compute-2.0.0/docs/quickstart/iac/examples/terraform-production/environments/prod/main.tf +228 -0
  61. flow_compute-2.0.0/docs/quickstart/iac/examples/terraform-production/modules/flow-task/main.tf +188 -0
  62. flow_compute-2.0.0/docs/quickstart/iac/pulumi.md +741 -0
  63. flow_compute-2.0.0/docs/quickstart/iac/terraform.md +698 -0
  64. flow_compute-2.0.0/docs/quickstart/index.md +190 -0
  65. flow_compute-2.0.0/docs/quickstart/notebook/fine-tuning.ipynb +1081 -0
  66. flow_compute-2.0.0/docs/quickstart/notebook/getting-started.ipynb +419 -0
  67. flow_compute-2.0.0/docs/quickstart/notebook/inference.ipynb +725 -0
  68. flow_compute-2.0.0/docs/quickstart/notebook/training.ipynb +1081 -0
  69. flow_compute-2.0.0/docs/quickstart/sdk/fine-tuning.md +692 -0
  70. flow_compute-2.0.0/docs/quickstart/sdk/inference.md +337 -0
  71. flow_compute-2.0.0/docs/quickstart/sdk/training.md +583 -0
  72. flow_compute-2.0.0/docs/troubleshooting/COLAB_TROUBLESHOOTING.md +169 -0
  73. flow_compute-2.0.0/docs/troubleshooting/README.md +38 -0
  74. flow_compute-2.0.0/examples/01_basics/cancel_task.py +61 -0
  75. flow_compute-2.0.0/examples/01_basics/hello_gpu.py +121 -0
  76. flow_compute-2.0.0/examples/01_basics/instance_types.py +132 -0
  77. flow_compute-2.0.0/examples/01_basics/task_lifecycle.py +273 -0
  78. flow_compute-2.0.0/examples/02_storage/data_pipeline.py +253 -0
  79. flow_compute-2.0.0/examples/03_development/jupyter_server.py +186 -0
  80. flow_compute-2.0.0/examples/03_development/local_testing.py +235 -0
  81. flow_compute-2.0.0/examples/04_distributed/multi_node.py +235 -0
  82. flow_compute-2.0.0/examples/05_production/logging_patterns.py +159 -0
  83. flow_compute-2.0.0/examples/README.md +98 -0
  84. flow_compute-2.0.0/examples/configs/basic.yaml +32 -0
  85. flow_compute-2.0.0/examples/configs/full_example.yaml +180 -0
  86. flow_compute-2.0.0/examples/configs/gpu_instance.yaml +59 -0
  87. flow_compute-2.0.0/examples/configs/multi_node.yaml +58 -0
  88. flow_compute-2.0.0/examples/configs/single_node_multi_gpu.yaml +28 -0
  89. flow_compute-2.0.0/examples/notebooks/2_configuration_auth.ipynb +697 -0
  90. flow_compute-2.0.0/examples/notebooks/3_frontends_comparison.ipynb +828 -0
  91. flow_compute-2.0.0/examples/notebooks/4_advanced_features.ipynb +775 -0
  92. flow_compute-2.0.0/examples/notebooks/5_real_world_examples.ipynb +1118 -0
  93. flow_compute-2.0.0/examples/notebooks/README.md +136 -0
  94. flow_compute-2.0.0/llms.txt +1364 -0
  95. flow_compute-2.0.0/mithril/.claude/settings.local.json +9 -0
  96. flow_compute-2.0.0/mithril/API_ENDPOINT.md +34 -0
  97. flow_compute-2.0.0/mithril/ARCHITECTURE.md +218 -0
  98. flow_compute-2.0.0/mithril/DESIGN.md +262 -0
  99. flow_compute-2.0.0/mithril/README.md +70 -0
  100. flow_compute-2.0.0/mithril/__init__.py +17 -0
  101. flow_compute-2.0.0/mithril/__main__.py +306 -0
  102. flow_compute-2.0.0/mithril/catalog.py +73 -0
  103. flow_compute-2.0.0/mithril/client.py +263 -0
  104. flow_compute-2.0.0/mithril/errors.py +39 -0
  105. flow_compute-2.0.0/mithril/pyproject.toml +19 -0
  106. flow_compute-2.0.0/mithril/setup.py +34 -0
  107. flow_compute-2.0.0/mithril/ssh.py +59 -0
  108. flow_compute-2.0.0/mithril/tests/__init__.py +5 -0
  109. flow_compute-2.0.0/mithril/tests/conftest.py +23 -0
  110. flow_compute-2.0.0/mithril/tests/test_cli.py +332 -0
  111. flow_compute-2.0.0/mithril/tests/test_client.py +277 -0
  112. flow_compute-2.0.0/mithril/tests/test_config_fallback.py +119 -0
  113. flow_compute-2.0.0/mithril/tests/test_ssh.py +86 -0
  114. flow_compute-2.0.0/mithril-js/.gitignore +39 -0
  115. flow_compute-2.0.0/mithril-js/LICENSE +202 -0
  116. flow_compute-2.0.0/mithril-js/README.md +265 -0
  117. flow_compute-2.0.0/mithril-js/cli.js +197 -0
  118. flow_compute-2.0.0/mithril-js/client.js +217 -0
  119. flow_compute-2.0.0/mithril-js/format.js +113 -0
  120. flow_compute-2.0.0/mithril-js/package-lock.json +2101 -0
  121. flow_compute-2.0.0/mithril-js/package.json +62 -0
  122. flow_compute-2.0.0/mithril-js/test/e2e/cli-e2e.test.js +354 -0
  123. flow_compute-2.0.0/mithril-js/test/fixtures/api-responses.js +235 -0
  124. flow_compute-2.0.0/mithril-js/test/helpers/cli-runner.js +125 -0
  125. flow_compute-2.0.0/mithril-js/test/helpers/http-recorder.js +61 -0
  126. flow_compute-2.0.0/mithril-js/test/helpers/mock-api.js +186 -0
  127. flow_compute-2.0.0/mithril-js/test/helpers/mock-server.js +93 -0
  128. flow_compute-2.0.0/mithril-js/test/helpers/temp-files.js +83 -0
  129. flow_compute-2.0.0/mithril-js/test/integration/api-integration.test.js +251 -0
  130. flow_compute-2.0.0/mithril-js/test/integration/ssh-integration.test.js +281 -0
  131. flow_compute-2.0.0/mithril-js/test/unit/client.test.js +386 -0
  132. flow_compute-2.0.0/mithril-js/test/unit/config-fallback.test.js +128 -0
  133. flow_compute-2.0.0/mithril-js/test/unit/format.test.js +258 -0
  134. flow_compute-2.0.0/pyproject.toml +155 -0
  135. flow_compute-2.0.0/pyproject.toml.backup +155 -0
  136. flow_compute-2.0.0/pytest.ini +29 -0
  137. flow_compute-2.0.0/scripts/reserve_packages.py +116 -0
  138. flow_compute-2.0.0/scripts/setup_pypi.sh +52 -0
  139. flow_compute-2.0.0/setup-dev.sh +25 -0
  140. flow_compute-2.0.0/src/__init__.py +0 -0
  141. flow_compute-2.0.0/src/flow/__init__.py +68 -0
  142. flow_compute-2.0.0/src/flow/_internal/auth.py +333 -0
  143. flow_compute-2.0.0/src/flow/_internal/config.py +217 -0
  144. flow_compute-2.0.0/src/flow/_internal/config_loader.py +224 -0
  145. flow_compute-2.0.0/src/flow/_internal/data/__init__.py +11 -0
  146. flow_compute-2.0.0/src/flow/_internal/data/loaders.py +303 -0
  147. flow_compute-2.0.0/src/flow/_internal/data/mount_processor.py +137 -0
  148. flow_compute-2.0.0/src/flow/_internal/data/resolver.py +106 -0
  149. flow_compute-2.0.0/src/flow/_internal/frontends/__init__.py +10 -0
  150. flow_compute-2.0.0/src/flow/_internal/frontends/base.py +72 -0
  151. flow_compute-2.0.0/src/flow/_internal/frontends/cli/__init__.py +9 -0
  152. flow_compute-2.0.0/src/flow/_internal/frontends/cli/adapter.py +173 -0
  153. flow_compute-2.0.0/src/flow/_internal/frontends/registry.py +58 -0
  154. flow_compute-2.0.0/src/flow/_internal/frontends/slurm/__init__.py +17 -0
  155. flow_compute-2.0.0/src/flow/_internal/frontends/slurm/adapter.py +168 -0
  156. flow_compute-2.0.0/src/flow/_internal/frontends/slurm/converter.py +238 -0
  157. flow_compute-2.0.0/src/flow/_internal/frontends/slurm/parser.py +373 -0
  158. flow_compute-2.0.0/src/flow/_internal/frontends/submitit/__init__.py +5 -0
  159. flow_compute-2.0.0/src/flow/_internal/frontends/submitit/adapter.py +312 -0
  160. flow_compute-2.0.0/src/flow/_internal/frontends/yaml/__init__.py +5 -0
  161. flow_compute-2.0.0/src/flow/_internal/frontends/yaml/adapter.py +260 -0
  162. flow_compute-2.0.0/src/flow/_internal/init/__init__.py +14 -0
  163. flow_compute-2.0.0/src/flow/_internal/init/resolver.py +77 -0
  164. flow_compute-2.0.0/src/flow/_internal/init/validator.py +147 -0
  165. flow_compute-2.0.0/src/flow/_internal/init/writer.py +154 -0
  166. flow_compute-2.0.0/src/flow/_internal/integrations/__init__.py +1 -0
  167. flow_compute-2.0.0/src/flow/_internal/integrations/google_colab.py +408 -0
  168. flow_compute-2.0.0/src/flow/_internal/integrations/jupyter.py +530 -0
  169. flow_compute-2.0.0/src/flow/_internal/integrations/jupyter_persistence.py +343 -0
  170. flow_compute-2.0.0/src/flow/_internal/integrations/jupyter_session.py +207 -0
  171. flow_compute-2.0.0/src/flow/_internal/io/__init__.py +22 -0
  172. flow_compute-2.0.0/src/flow/_internal/io/http.py +205 -0
  173. flow_compute-2.0.0/src/flow/_internal/managers/__init__.py +5 -0
  174. flow_compute-2.0.0/src/flow/_internal/managers/task_manager.py +275 -0
  175. flow_compute-2.0.0/src/flow/_internal/storage/__init__.py +17 -0
  176. flow_compute-2.0.0/src/flow/_internal/storage/base.py +107 -0
  177. flow_compute-2.0.0/src/flow/_internal/storage/resolvers.py +158 -0
  178. flow_compute-2.0.0/src/flow/api/__init__.py +8 -0
  179. flow_compute-2.0.0/src/flow/api/client.py +1329 -0
  180. flow_compute-2.0.0/src/flow/api/decorators.py +560 -0
  181. flow_compute-2.0.0/src/flow/api/invoke.py +633 -0
  182. flow_compute-2.0.0/src/flow/api/models.py +1146 -0
  183. flow_compute-2.0.0/src/flow/cli/__init__.py +11 -0
  184. flow_compute-2.0.0/src/flow/cli/__main__.py +8 -0
  185. flow_compute-2.0.0/src/flow/cli/app.py +51 -0
  186. flow_compute-2.0.0/src/flow/cli/commands/README.md +98 -0
  187. flow_compute-2.0.0/src/flow/cli/commands/__init__.py +34 -0
  188. flow_compute-2.0.0/src/flow/cli/commands/base.py +64 -0
  189. flow_compute-2.0.0/src/flow/cli/commands/cancel.py +70 -0
  190. flow_compute-2.0.0/src/flow/cli/commands/example.py +92 -0
  191. flow_compute-2.0.0/src/flow/cli/commands/init.py +1362 -0
  192. flow_compute-2.0.0/src/flow/cli/commands/logs.py +90 -0
  193. flow_compute-2.0.0/src/flow/cli/commands/run.py +158 -0
  194. flow_compute-2.0.0/src/flow/cli/commands/ssh.py +89 -0
  195. flow_compute-2.0.0/src/flow/cli/commands/status.py +119 -0
  196. flow_compute-2.0.0/src/flow/cli/commands/utils.py +122 -0
  197. flow_compute-2.0.0/src/flow/cli/commands/volumes.py +225 -0
  198. flow_compute-2.0.0/src/flow/cli/formatters/__init__.py +1 -0
  199. flow_compute-2.0.0/src/flow/cli/formatters/slurm.py +191 -0
  200. flow_compute-2.0.0/src/flow/cli/main.py +8 -0
  201. flow_compute-2.0.0/src/flow/cli/migrate.py +65 -0
  202. flow_compute-2.0.0/src/flow/core/__init__.py +25 -0
  203. flow_compute-2.0.0/src/flow/core/code_packager.py +127 -0
  204. flow_compute-2.0.0/src/flow/core/engine.py +243 -0
  205. flow_compute-2.0.0/src/flow/core/interfaces.py +993 -0
  206. flow_compute-2.0.0/src/flow/core/resources/__init__.py +6 -0
  207. flow_compute-2.0.0/src/flow/core/resources/matcher.py +115 -0
  208. flow_compute-2.0.0/src/flow/core/resources/parser.py +82 -0
  209. flow_compute-2.0.0/src/flow/core/task_engine.py +438 -0
  210. flow_compute-2.0.0/src/flow/errors.py +634 -0
  211. flow_compute-2.0.0/src/flow/providers/__init__.py +32 -0
  212. flow_compute-2.0.0/src/flow/providers/base.py +105 -0
  213. flow_compute-2.0.0/src/flow/providers/factory.py +34 -0
  214. flow_compute-2.0.0/src/flow/providers/fcp/README.md +98 -0
  215. flow_compute-2.0.0/src/flow/providers/fcp/__init__.py +15 -0
  216. flow_compute-2.0.0/src/flow/providers/fcp/adapters/__init__.py +20 -0
  217. flow_compute-2.0.0/src/flow/providers/fcp/adapters/models.py +273 -0
  218. flow_compute-2.0.0/src/flow/providers/fcp/adapters/mounts.py +116 -0
  219. flow_compute-2.0.0/src/flow/providers/fcp/adapters/storage.py +93 -0
  220. flow_compute-2.0.0/src/flow/providers/fcp/api/__init__.py +31 -0
  221. flow_compute-2.0.0/src/flow/providers/fcp/api/handlers.py +131 -0
  222. flow_compute-2.0.0/src/flow/providers/fcp/api/types.py +170 -0
  223. flow_compute-2.0.0/src/flow/providers/fcp/bidding/__init__.py +28 -0
  224. flow_compute-2.0.0/src/flow/providers/fcp/bidding/builder.py +189 -0
  225. flow_compute-2.0.0/src/flow/providers/fcp/bidding/finder.py +386 -0
  226. flow_compute-2.0.0/src/flow/providers/fcp/bidding/manager.py +251 -0
  227. flow_compute-2.0.0/src/flow/providers/fcp/core/__init__.py +81 -0
  228. flow_compute-2.0.0/src/flow/providers/fcp/core/constants.py +258 -0
  229. flow_compute-2.0.0/src/flow/providers/fcp/core/errors.py +70 -0
  230. flow_compute-2.0.0/src/flow/providers/fcp/core/models.py +134 -0
  231. flow_compute-2.0.0/src/flow/providers/fcp/provider.py +2041 -0
  232. flow_compute-2.0.0/src/flow/providers/fcp/provider.py,cover +1718 -0
  233. flow_compute-2.0.0/src/flow/providers/fcp/resources/__init__.py +30 -0
  234. flow_compute-2.0.0/src/flow/providers/fcp/resources/gpu.py +57 -0
  235. flow_compute-2.0.0/src/flow/providers/fcp/resources/instances.py +138 -0
  236. flow_compute-2.0.0/src/flow/providers/fcp/resources/projects.py +161 -0
  237. flow_compute-2.0.0/src/flow/providers/fcp/resources/ssh.py +476 -0
  238. flow_compute-2.0.0/src/flow/providers/fcp/runtime/__init__.py +13 -0
  239. flow_compute-2.0.0/src/flow/providers/fcp/runtime/quota.py +47 -0
  240. flow_compute-2.0.0/src/flow/providers/fcp/runtime/startup/__init__.py +36 -0
  241. flow_compute-2.0.0/src/flow/providers/fcp/runtime/startup/builder.py +324 -0
  242. flow_compute-2.0.0/src/flow/providers/fcp/runtime/startup/legacy.py +49 -0
  243. flow_compute-2.0.0/src/flow/providers/fcp/runtime/startup/sections.py +797 -0
  244. flow_compute-2.0.0/src/flow/providers/fcp/runtime/startup/templates.py +148 -0
  245. flow_compute-2.0.0/src/flow/providers/local/__init__.py +23 -0
  246. flow_compute-2.0.0/src/flow/providers/local/config.py +134 -0
  247. flow_compute-2.0.0/src/flow/providers/local/executor.py +537 -0
  248. flow_compute-2.0.0/src/flow/providers/local/logs.py +224 -0
  249. flow_compute-2.0.0/src/flow/providers/local/provider.py +484 -0
  250. flow_compute-2.0.0/src/flow/providers/local/storage.py +151 -0
  251. flow_compute-2.0.0/src/flow/providers/registry.py +158 -0
  252. flow_compute-2.0.0/src/flow/utils/__init__.py +0 -0
  253. flow_compute-2.0.0/src/flow/utils/cache.py +128 -0
  254. flow_compute-2.0.0/src/flow/utils/exceptions.py +15 -0
  255. flow_compute-2.0.0/src/flow/utils/instance_parser.py +213 -0
  256. flow_compute-2.0.0/src/flow/utils/instance_validator.py +272 -0
  257. flow_compute-2.0.0/src/flow/utils/region_validator.py +32 -0
  258. flow_compute-2.0.0/src/flow/utils/retry.py +82 -0
  259. flow_compute-2.0.0/src/flow/utils/retry_helper.py +189 -0
  260. flow_compute-2.0.0/src/flow/utils/security.py +109 -0
  261. flow_compute-2.0.0/src/flow/utils/validation.py +171 -0
  262. flow_compute-2.0.0/tests/INTEGRATION_TEST_SUMMARY.md +123 -0
  263. flow_compute-2.0.0/tests/MIGRATION_EXAMPLE.md +214 -0
  264. flow_compute-2.0.0/tests/PATTERNS.md +294 -0
  265. flow_compute-2.0.0/tests/README.md +121 -0
  266. flow_compute-2.0.0/tests/README_EXAMPLES.md +83 -0
  267. flow_compute-2.0.0/tests/SECURITY_BEST_PRACTICES.md +49 -0
  268. flow_compute-2.0.0/tests/__init__.py +1 -0
  269. flow_compute-2.0.0/tests/conftest.py +227 -0
  270. flow_compute-2.0.0/tests/data/api/v2024-01-01/list_tasks_response.json +36 -0
  271. flow_compute-2.0.0/tests/data/api/v2024-01-01/submit_task_response.json +9 -0
  272. flow_compute-2.0.0/tests/data/configs/complex.yaml +72 -0
  273. flow_compute-2.0.0/tests/data/configs/minimal.yaml +3 -0
  274. flow_compute-2.0.0/tests/data/generators.py +298 -0
  275. flow_compute-2.0.0/tests/e2e/README.md +30 -0
  276. flow_compute-2.0.0/tests/e2e/conftest.py +22 -0
  277. flow_compute-2.0.0/tests/e2e/test_api.py +70 -0
  278. flow_compute-2.0.0/tests/e2e/test_gpu.py +55 -0
  279. flow_compute-2.0.0/tests/e2e/test_ssh_e2e.py +281 -0
  280. flow_compute-2.0.0/tests/fixtures/__init__.py +1 -0
  281. flow_compute-2.0.0/tests/fixtures/environment.py +198 -0
  282. flow_compute-2.0.0/tests/fixtures/invoke_fixtures.py +115 -0
  283. flow_compute-2.0.0/tests/fixtures/task_fixtures.py +83 -0
  284. flow_compute-2.0.0/tests/integration/__init__.py +1 -0
  285. flow_compute-2.0.0/tests/integration/docker_caching/README.md +55 -0
  286. flow_compute-2.0.0/tests/integration/docker_caching/__init__.py +4 -0
  287. flow_compute-2.0.0/tests/integration/docker_caching/correct_docker_cache_implementation.sh +132 -0
  288. flow_compute-2.0.0/tests/integration/docker_caching/research_docker_image_preloading.py +308 -0
  289. flow_compute-2.0.0/tests/integration/docker_caching/research_docker_persistent_mount.py +75 -0
  290. flow_compute-2.0.0/tests/integration/docker_caching/setup_docker_persistent_cache.py +243 -0
  291. flow_compute-2.0.0/tests/integration/docker_caching/test_docker_persistent_storage.py +351 -0
  292. flow_compute-2.0.0/tests/integration/fcp_live_instances/README.md +75 -0
  293. flow_compute-2.0.0/tests/integration/fcp_live_instances/__init__.py +4 -0
  294. flow_compute-2.0.0/tests/integration/fcp_live_instances/discover_and_test.py +142 -0
  295. flow_compute-2.0.0/tests/integration/fcp_live_instances/research_docker_sudo.py +71 -0
  296. flow_compute-2.0.0/tests/integration/fcp_live_instances/test_critical_features.py +302 -0
  297. flow_compute-2.0.0/tests/integration/fcp_live_instances/test_docker_integration.py +353 -0
  298. flow_compute-2.0.0/tests/integration/fcp_live_instances/test_logs_integration.py +330 -0
  299. flow_compute-2.0.0/tests/integration/fcp_live_instances/test_startup_scripts_integration.py +453 -0
  300. flow_compute-2.0.0/tests/integration/fcp_live_instances/verify_instance_access.py +238 -0
  301. flow_compute-2.0.0/tests/integration/providers/fcp/test_docker_integration.py +332 -0
  302. flow_compute-2.0.0/tests/integration/providers/fcp/test_startup_script_validation.py +311 -0
  303. flow_compute-2.0.0/tests/integration/test_cli.py +190 -0
  304. flow_compute-2.0.0/tests/integration/test_cli_mounts.py +199 -0
  305. flow_compute-2.0.0/tests/integration/test_docker_caching_e2e.py +58 -0
  306. flow_compute-2.0.0/tests/integration/test_end_to_end.py +259 -0
  307. flow_compute-2.0.0/tests/integration/test_fcp_integration.py +310 -0
  308. flow_compute-2.0.0/tests/integration/test_fcp_user_journeys.py +191 -0
  309. flow_compute-2.0.0/tests/integration/test_fcp_user_journeys_improved.py +358 -0
  310. flow_compute-2.0.0/tests/integration/test_file_share_integration.py +285 -0
  311. flow_compute-2.0.0/tests/integration/test_flow_mounts.py +287 -0
  312. flow_compute-2.0.0/tests/integration/test_init_e2e.py +256 -0
  313. flow_compute-2.0.0/tests/integration/test_init_reconfigure.py +236 -0
  314. flow_compute-2.0.0/tests/integration/test_jupyter_integration.py +268 -0
  315. flow_compute-2.0.0/tests/integration/test_local_provider_logs.py +344 -0
  316. flow_compute-2.0.0/tests/integration/test_ssh_integration.py +100 -0
  317. flow_compute-2.0.0/tests/integration/test_ssh_key_generation_integration.py +191 -0
  318. flow_compute-2.0.0/tests/integration/test_ssh_real_server.py +182 -0
  319. flow_compute-2.0.0/tests/integration/test_ssh_with_local_provider.py +165 -0
  320. flow_compute-2.0.0/tests/integration/test_upload_code_integration.py +307 -0
  321. flow_compute-2.0.0/tests/manual/COLAB_TEST_CHECKLIST.md +126 -0
  322. flow_compute-2.0.0/tests/performance/test_benchmarks.py +478 -0
  323. flow_compute-2.0.0/tests/performance/test_complexity.py +210 -0
  324. flow_compute-2.0.0/tests/performance/test_volume_bulk_operations.py +461 -0
  325. flow_compute-2.0.0/tests/run_ssh_tests.py +182 -0
  326. flow_compute-2.0.0/tests/test_basic.py +37 -0
  327. flow_compute-2.0.0/tests/test_cli_integration.py +60 -0
  328. flow_compute-2.0.0/tests/test_code_packaging.py +167 -0
  329. flow_compute-2.0.0/tests/test_example_validator.py +312 -0
  330. flow_compute-2.0.0/tests/test_examples.py +330 -0
  331. flow_compute-2.0.0/tests/test_invoke_integration.py +127 -0
  332. flow_compute-2.0.0/tests/test_local_provider_full.py +109 -0
  333. flow_compute-2.0.0/tests/test_task_submission.py +55 -0
  334. flow_compute-2.0.0/tests/testing/REVISED_APPROACH.md +138 -0
  335. flow_compute-2.0.0/tests/testing/TEST_STRATEGY_FINAL.md +191 -0
  336. flow_compute-2.0.0/tests/testing/__init__.py +56 -0
  337. flow_compute-2.0.0/tests/testing/api_state.py +162 -0
  338. flow_compute-2.0.0/tests/testing/base.py +108 -0
  339. flow_compute-2.0.0/tests/testing/builders.py +327 -0
  340. flow_compute-2.0.0/tests/testing/generators.py +308 -0
  341. flow_compute-2.0.0/tests/testing/helpers.py +81 -0
  342. flow_compute-2.0.0/tests/testing/providers.py +208 -0
  343. flow_compute-2.0.0/tests/testing/task_helpers.py +156 -0
  344. flow_compute-2.0.0/tests/unit/__init__.py +1 -0
  345. flow_compute-2.0.0/tests/unit/init/__init__.py +1 -0
  346. flow_compute-2.0.0/tests/unit/init/test_resolver.py +144 -0
  347. flow_compute-2.0.0/tests/unit/init/test_validator.py +157 -0
  348. flow_compute-2.0.0/tests/unit/init/test_writer.py +179 -0
  349. flow_compute-2.0.0/tests/unit/providers/fcp/test_script_sections.py +429 -0
  350. flow_compute-2.0.0/tests/unit/providers/fcp/test_script_size_limits.py +194 -0
  351. flow_compute-2.0.0/tests/unit/providers/fcp/test_template_engine.py +187 -0
  352. flow_compute-2.0.0/tests/unit/providers/test_local_phase0.py +142 -0
  353. flow_compute-2.0.0/tests/unit/providers/test_local_phase1.py +178 -0
  354. flow_compute-2.0.0/tests/unit/providers/test_local_phase2.py +209 -0
  355. flow_compute-2.0.0/tests/unit/providers/test_local_phase3.py +197 -0
  356. flow_compute-2.0.0/tests/unit/providers/test_local_phase4.py +231 -0
  357. flow_compute-2.0.0/tests/unit/test_api_contracts.py +639 -0
  358. flow_compute-2.0.0/tests/unit/test_auth.py +448 -0
  359. flow_compute-2.0.0/tests/unit/test_capability_selection.py +367 -0
  360. flow_compute-2.0.0/tests/unit/test_cli_commands.py +209 -0
  361. flow_compute-2.0.0/tests/unit/test_cli_parsing.py +210 -0
  362. flow_compute-2.0.0/tests/unit/test_colab_mock.py.skip +167 -0
  363. flow_compute-2.0.0/tests/unit/test_config.py +173 -0
  364. flow_compute-2.0.0/tests/unit/test_config_from_env.py +163 -0
  365. flow_compute-2.0.0/tests/unit/test_config_loader.py +186 -0
  366. flow_compute-2.0.0/tests/unit/test_decorator_real.py +512 -0
  367. flow_compute-2.0.0/tests/unit/test_decorator_thread_safety.py +58 -0
  368. flow_compute-2.0.0/tests/unit/test_errors.py +116 -0
  369. flow_compute-2.0.0/tests/unit/test_fcp_instance_resolution.py +148 -0
  370. flow_compute-2.0.0/tests/unit/test_fcp_mount_adapter.py +196 -0
  371. flow_compute-2.0.0/tests/unit/test_fcp_provider.py +132 -0
  372. flow_compute-2.0.0/tests/unit/test_fcp_provider_behavior.py +347 -0
  373. flow_compute-2.0.0/tests/unit/test_fcp_provider_unit.py +409 -0
  374. flow_compute-2.0.0/tests/unit/test_file_share_support.py +449 -0
  375. flow_compute-2.0.0/tests/unit/test_flow_find_instances.py +116 -0
  376. flow_compute-2.0.0/tests/unit/test_google_colab_integration.py +263 -0
  377. flow_compute-2.0.0/tests/unit/test_gpu_parser.py +84 -0
  378. flow_compute-2.0.0/tests/unit/test_instance_matcher.py +99 -0
  379. flow_compute-2.0.0/tests/unit/test_invoke_serialization.py +73 -0
  380. flow_compute-2.0.0/tests/unit/test_jupyter_integration.py +269 -0
  381. flow_compute-2.0.0/tests/unit/test_logs_unit.py +299 -0
  382. flow_compute-2.0.0/tests/unit/test_models.py +416 -0
  383. flow_compute-2.0.0/tests/unit/test_models_property.py +898 -0
  384. flow_compute-2.0.0/tests/unit/test_mount_processor.py +212 -0
  385. flow_compute-2.0.0/tests/unit/test_multi_region_selection.py +274 -0
  386. flow_compute-2.0.0/tests/unit/test_provider.py +202 -0
  387. flow_compute-2.0.0/tests/unit/test_s3_script_section.py +122 -0
  388. flow_compute-2.0.0/tests/unit/test_s3_support.py +327 -0
  389. flow_compute-2.0.0/tests/unit/test_security.py +135 -0
  390. flow_compute-2.0.0/tests/unit/test_slurm_adapter.py +466 -0
  391. flow_compute-2.0.0/tests/unit/test_ssh_key_auto_generation.py +294 -0
  392. flow_compute-2.0.0/tests/unit/test_ssh_key_manager_security.py +196 -0
  393. flow_compute-2.0.0/tests/unit/test_ssh_multi_node.py +308 -0
  394. flow_compute-2.0.0/tests/unit/test_ssh_preconditions.py +175 -0
  395. flow_compute-2.0.0/tests/unit/test_ssh_tunnel_concepts.py +142 -0
  396. flow_compute-2.0.0/tests/unit/test_submit_api.py +243 -0
  397. flow_compute-2.0.0/tests/unit/test_submitit_adapter.py +395 -0
  398. flow_compute-2.0.0/tests/unit/test_task_manager.py +468 -0
  399. flow_compute-2.0.0/tests/unit/test_task_manager_simple.py +176 -0
  400. flow_compute-2.0.0/tests/unit/test_upload_code.py +398 -0
  401. flow_compute-2.0.0/tests/unit/test_url_resolver.py +193 -0
  402. flow_compute-2.0.0/tests/unit/test_user_resolution.py +802 -0
  403. flow_compute-2.0.0/tests/unit/test_user_resolution_summary.md +57 -0
  404. flow_compute-2.0.0/tests/unit/test_validation_errors.py +132 -0
  405. flow_compute-2.0.0/tests/unit/test_volume_commands_comprehensive.py +543 -0
  406. flow_compute-2.0.0/tests/unit/test_yaml_adapter.py +475 -0
  407. flow_compute-2.0.0/tests/utils/ssh_test_server.py +205 -0
  408. flow_compute-2.0.0/tests/validate_examples.py +265 -0
  409. flow_compute-2.0.0/tests/verification/instance_verifier.py +492 -0
@@ -0,0 +1 @@
1
+ *
@@ -0,0 +1 @@
1
+ Signature: 8a477f597d28d172789f06886806bc55
File without changes
File without changes
@@ -0,0 +1,16 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(uv run pytest:*)",
5
+ "Bash(rg:*)",
6
+ "Bash(python -m pytest tests/test_basic.py -v)",
7
+ "Bash(python -m pytest tests/unit/test_volume_commands_comprehensive.py::TestVolumeDeleteCommand -xvs)",
8
+ "Bash(python -m pytest tests/unit/test_volume_commands_comprehensive.py::TestVolumeDeleteAllCommand -xvs)",
9
+ "Bash(python -m pytest tests/integration/test_init_e2e.py tests/integration/test_init_reconfigure.py -v)",
10
+ "Bash(find:*)",
11
+ "Bash(cp:*)",
12
+ "Bash(mkdir:*)"
13
+ ],
14
+ "deny": []
15
+ }
16
+ }
@@ -0,0 +1,59 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+ inputs:
8
+ package_name:
9
+ description: 'Package name to publish'
10
+ required: true
11
+ type: choice
12
+ options:
13
+ - flow-sdk
14
+ - mithril-ai
15
+ - flow-acc
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: '3.11'
27
+
28
+ - name: Install dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install build twine
32
+
33
+ - name: Update package name if needed
34
+ if: github.event_name == 'workflow_dispatch' && github.event.inputs.package_name != 'flow-sdk'
35
+ run: |
36
+ # Backup original
37
+ cp pyproject.toml pyproject.toml.bak
38
+
39
+ # Update package name
40
+ sed -i "s/^name = \"flow-sdk\"/name = \"${{ github.event.inputs.package_name }}\"/" pyproject.toml
41
+
42
+ # Show the change
43
+ echo "Updated package name to: ${{ github.event.inputs.package_name }}"
44
+ grep "^name = " pyproject.toml
45
+
46
+ - name: Build package
47
+ run: python -m build
48
+
49
+ - name: Check package
50
+ run: twine check dist/*
51
+
52
+ - name: Publish to PyPI
53
+ env:
54
+ TWINE_USERNAME: __token__
55
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
56
+ run: |
57
+ twine upload dist/*
58
+ echo "Package published to PyPI"
59
+ echo "Install with: pip install ${{ github.event.inputs.package_name || 'flow-sdk' }}"
@@ -0,0 +1,118 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.so
5
+
6
+ # Distribution / packaging
7
+ .Python
8
+ build/
9
+ develop-eggs/
10
+ eggs/
11
+ sdist/
12
+ *.egg-info/
13
+ .egg/
14
+ dist/
15
+ pip-wheel-metadata/
16
+
17
+ # Virtual Environments
18
+ env/
19
+ venv/
20
+ ENV/
21
+ .venv/
22
+
23
+ # IPython/Jupyter
24
+ .ipynb_checkpoints/
25
+
26
+ # OS files
27
+ .DS_Store
28
+
29
+ # Pytest cache
30
+ .pytest_cache/
31
+
32
+ # Ignore generate_catalogue and catalogue_manager
33
+ src/flow/scripts/generate_catalogue.py
34
+ src/flow/managers/catalogue_manager.py
35
+
36
+ # Ignore log files
37
+ coverage_debug.log
38
+
39
+ # Ignore packaging metadata
40
+ flow.egg-info/
41
+
42
+ # Internal documentation
43
+ .internal_documents/
44
+ .internal_docs/
45
+ docs/internal/
46
+
47
+ # Coverage reports
48
+ .coverage
49
+ .coverage.*
50
+ htmlcov/
51
+ .hypothesis/
52
+ coverage.xml
53
+ *.cover
54
+
55
+ # Test outputs
56
+ test_report_*.json
57
+ pytest_results.xml
58
+ .tox/
59
+
60
+ # Temporary files
61
+ tmp/
62
+ temp/
63
+ test-env/
64
+ *.tmp
65
+ *.temp
66
+
67
+ # Lock files
68
+ uv.lock
69
+
70
+ # Archive - development history
71
+ .archive/
72
+
73
+ # API data files
74
+ api_data/
75
+
76
+ # Development/debug scripts
77
+ gather_api_formats.py
78
+ test_debug.py
79
+ list_available.py
80
+ cleanup_all_resources.py
81
+ cancel_instances.py
82
+
83
+ # Changelog (for now)
84
+ CHANGELOG.md
85
+
86
+ # Hidden development directories
87
+ .archive/
88
+ .backup_colab_docs/
89
+ .hypothesis/
90
+ .internal_documents/
91
+ .pytest_cache/
92
+ .ruff_cache/
93
+ .venv/
94
+
95
+ # Project instructions (private)
96
+
97
+ # GitBook documentation
98
+ docs/gitbook/
99
+ docs/gitbook-foundry-integration/
100
+ docs/gitbook-*.zip
101
+ docs/*.zip
102
+
103
+ # Design documents
104
+ docs/bonus/
105
+ docs/*/bonus/
106
+ **/documentation-design.md
107
+
108
+ # GitBook build artifacts
109
+ _book/
110
+ .gitbook/
111
+
112
+ # Documentation drafts
113
+ docs/drafts/
114
+ docs/scratch/
115
+
116
+ # Duplicate/temporary project folders
117
+ flow-sdk-final/
118
+ flow-sdk-*/
@@ -0,0 +1,212 @@
1
+ # Flow SDK Quickstart Review Report
2
+
3
+ ## Executive Summary
4
+
5
+ This report reviews the proposed quickstart design in `tmp/quickstart-design.md` against the existing Flow SDK documentation, examples, and llms.txt specification. The review identifies key findings and recommendations for alignment.
6
+
7
+ ## Key Findings
8
+
9
+ ### 1. vLLM Inference Examples
10
+
11
+ **Finding**: The proposed vLLM inference examples are well-structured but need alignment with Flow SDK patterns.
12
+
13
+ **Issues Identified**:
14
+ - The vLLM example uses `flow.run(config)` returning a server object with `.endpoint` property, but the actual SDK returns a Task object
15
+ - The proposed syntax `server.endpoint` doesn't exist in the current API
16
+ - Port forwarding and endpoint access patterns need clarification
17
+
18
+ **Recommendations**:
19
+ ```python
20
+ # Align with actual Flow SDK patterns
21
+ task = flow.run(config)
22
+ task.wait_for_ready() # Wait for server to start
23
+ endpoint = task.get_port_forward_url(8000) # Or similar method
24
+ ```
25
+
26
+ ### 2. Instance Type Syntax
27
+
28
+ **Finding**: The quickstart uses correct instance type syntax that aligns with llms.txt.
29
+
30
+ **Validated Patterns**:
31
+ - ✅ `"l40s"` - Simple name format (correct)
32
+ - ✅ `"a100_40gb"` - With memory specification (correct)
33
+ - ✅ `"4xa100_40gb"` - Count prefix format (correct)
34
+ - ✅ `"8xa100"` - Multiple GPU format (correct)
35
+
36
+ **Note**: The llms.txt explicitly states that formats like `"a100x8"` or `"A100"` (uppercase) are NOT supported.
37
+
38
+ ### 3. API Consistency
39
+
40
+ **Finding**: Several API inconsistencies between quickstart examples and actual SDK.
41
+
42
+ **Issues**:
43
+ 1. **Cost Tracking**:
44
+ - Quickstart: `result.estimated_cost`
45
+ - Actual SDK: Cost tracking not directly exposed on Task object
46
+
47
+ 2. **Output Access**:
48
+ - Quickstart: `result.output`
49
+ - Actual SDK: `task.logs()` or streaming logs
50
+
51
+ 3. **Artifact Handling**:
52
+ - Quickstart: `task.download_artifact()`
53
+ - Actual SDK: Need to verify artifact download API
54
+
55
+ ### 4. Configuration Patterns
56
+
57
+ **Finding**: The TaskConfig usage is mostly correct but some parameters need verification.
58
+
59
+ **Aligned**:
60
+ - ✅ `command` parameter
61
+ - ✅ `instance_type` parameter
62
+ - ✅ `max_run_time_hours` and `max_run_time_seconds`
63
+ - ✅ `max_price_per_hour`
64
+ - ✅ `ports` parameter
65
+ - ✅ `environment` parameter
66
+
67
+ **Need Verification**:
68
+ - ❓ `output_artifacts` parameter format
69
+ - ❓ `spot_instance` parameter (vs `spot` or provider-specific)
70
+
71
+ ### 5. CLI Command Mapping
72
+
73
+ **Finding**: The SLURM → Flow migration commands need validation.
74
+
75
+ **Proposed Mappings**:
76
+ ```bash
77
+ sbatch job.sh → flow run job.sh
78
+ squeue → flow list --status running
79
+ scancel <id> → flow cancel <id>
80
+ sinfo → flow instances --available
81
+ ```
82
+
83
+ **Note**: Need to verify these CLI commands exist in the actual implementation.
84
+
85
+ ### 6. Code Upload Mechanism
86
+
87
+ **Finding**: The quickstart examples don't clearly explain the code upload behavior.
88
+
89
+ **From llms.txt**:
90
+ - FCP provider has a 10KB script limit
91
+ - Code is packaged and uploaded via `_FLOW_CODE_ARCHIVE` environment variable
92
+ - Working directory set to `/workspace` when `upload_code=True`
93
+
94
+ **Recommendation**: Add explicit documentation about when code upload happens automatically vs when users need to handle it manually.
95
+
96
+ ### 7. Error Handling
97
+
98
+ **Finding**: The quickstart examples lack error handling patterns.
99
+
100
+ **Missing**:
101
+ - How to handle `ResourceUnavailableError`
102
+ - How to handle authentication failures
103
+ - How to handle spot instance preemption
104
+ - How to handle quota limits
105
+
106
+ ### 8. Production Patterns
107
+
108
+ **Strengths**:
109
+ - ✅ Explicit cost controls in every example
110
+ - ✅ Real workloads (not toy examples)
111
+ - ✅ Time estimates for operations
112
+ - ✅ GPU validation before main workload
113
+
114
+ **Gaps**:
115
+ - Missing checkpoint/resume patterns
116
+ - Missing distributed training setup
117
+ - Missing logging/monitoring integration
118
+ - Missing retry configuration
119
+
120
+ ## Recommendations
121
+
122
+ ### 1. API Alignment
123
+
124
+ Update all quickstart examples to use actual Flow SDK API:
125
+
126
+ ```python
127
+ # Instead of
128
+ server = flow.run(config)
129
+ print(server.endpoint)
130
+
131
+ # Use
132
+ task = flow.run(config)
133
+ task.wait() # or task.wait_for_ready()
134
+ # Document port forwarding approach
135
+ ```
136
+
137
+ ### 2. Add Error Handling
138
+
139
+ Include error handling in every example:
140
+
141
+ ```python
142
+ try:
143
+ task = flow.run(config)
144
+ except flow.ResourceUnavailableError:
145
+ print("No instances available. Try different type or increase price limit")
146
+ except flow.AuthenticationError:
147
+ print("Run 'flow init' to configure API key")
148
+ ```
149
+
150
+ ### 3. Document Code Upload
151
+
152
+ Add explicit section on code upload behavior:
153
+
154
+ ```python
155
+ # When code is uploaded automatically
156
+ config = TaskConfig(
157
+ command="python train.py", # Local file triggers upload
158
+ upload_code=True # Explicit control
159
+ )
160
+
161
+ # When using remote scripts only
162
+ config = TaskConfig(
163
+ shell="curl -s https://example.com/script.sh | bash"
164
+ )
165
+ ```
166
+
167
+ ### 4. Clarify Streaming Patterns
168
+
169
+ Show actual log streaming API:
170
+
171
+ ```python
172
+ task = flow.run(config)
173
+ for line in task.logs(follow=True):
174
+ print(line, end='')
175
+ ```
176
+
177
+ ### 5. Add Monitoring Examples
178
+
179
+ Include OpenTelemetry integration examples as mentioned in llms.txt.
180
+
181
+ ### 6. Instance Resolution Documentation
182
+
183
+ Add clear documentation about instance type formats:
184
+
185
+ ```markdown
186
+ ## Instance Type Formats
187
+
188
+ Supported:
189
+ - Simple: "a100", "h100", "l40s"
190
+ - Count prefix: "2xa100", "4xa100", "8xa100"
191
+ - FCP format: "a100-80gb.sxm.1x"
192
+
193
+ NOT supported:
194
+ - "a100x8" or "a100*8" syntax
195
+ - Uppercase: "A100", "H100"
196
+ - Vendor prefix: "nvidia-a100"
197
+ ```
198
+
199
+ ## Conclusion
200
+
201
+ The quickstart design is well-structured and follows good principles (explicit configuration, cost transparency, production patterns). However, it needs alignment with the actual Flow SDK API and should include more error handling and edge case documentation. The vLLM examples are particularly valuable but need the most work to align with actual SDK capabilities.
202
+
203
+ ## Action Items
204
+
205
+ 1. Verify and update all API calls to match actual SDK
206
+ 2. Add comprehensive error handling examples
207
+ 3. Document code upload behavior explicitly
208
+ 4. Clarify port forwarding and endpoint access patterns
209
+ 5. Add instance type format documentation
210
+ 6. Include checkpoint/resume examples
211
+ 7. Verify CLI command mappings
212
+ 8. Add OpenTelemetry monitoring examples
@@ -0,0 +1,47 @@
1
+ # Contributing to Flow SDK
2
+
3
+ ## Development Setup
4
+
5
+ ```bash
6
+ # Clone the repository
7
+ git clone https://github.com/mlfoundry/flow-sdk.git
8
+ cd flow-sdk
9
+
10
+ # Install dependencies
11
+ uv sync --dev
12
+
13
+ # Configure API key
14
+ uv run flow init
15
+
16
+ # Run tests
17
+ uv run pytest
18
+
19
+ # Run examples
20
+ uv run python examples/01_basics/hello_gpu.py
21
+ ```
22
+
23
+ ## Testing
24
+
25
+ ```bash
26
+ # Run all tests
27
+ uv run pytest
28
+
29
+ # Run specific test file
30
+ uv run pytest tests/unit/test_models.py
31
+
32
+ # Run with coverage
33
+ uv run pytest --cov=flow
34
+ ```
35
+
36
+ ## Code Style
37
+
38
+ ```bash
39
+ # Format code
40
+ uv run black src/flow tests
41
+
42
+ # Lint
43
+ uv run ruff check src/flow tests
44
+
45
+ # Type check
46
+ uv run mypy src/flow
47
+ ```
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2025 Foundry Technologies, Inc.
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.