openweights 0.13.2__tar.gz → 0.13.4__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 (206) hide show
  1. {openweights-0.13.2 → openweights-0.13.4}/PKG-INFO +1 -1
  2. {openweights-0.13.2 → openweights-0.13.4}/docs/cost-tracking.md +22 -1
  3. openweights-0.13.4/docs/dashboard-performance.md +51 -0
  4. openweights-0.13.4/docs/release-0.13.3.md +12 -0
  5. openweights-0.13.4/docs/release-0.13.4.md +16 -0
  6. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/token.py +24 -9
  7. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/database.py +41 -18
  8. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/main.py +70 -40
  9. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/models.py +10 -1
  10. openweights-0.13.4/openweights/dashboard/backend/static/assets/LogProbVisualization-Cy7mr9Dk.js +20 -0
  11. openweights-0.13.4/openweights/dashboard/backend/static/assets/LogProbVisualization-RmVSkl_9.js +20 -0
  12. openweights-0.13.4/openweights/dashboard/backend/static/assets/MetricsPlots-BUaa-TxX.js +3855 -0
  13. openweights-0.13.4/openweights/dashboard/backend/static/assets/MetricsPlots-CvTr2hPO.js +3855 -0
  14. openweights-0.13.4/openweights/dashboard/backend/static/assets/browser-3LETacBz.js +1 -0
  15. openweights-0.13.4/openweights/dashboard/backend/static/assets/browser-PN0R13Ef.js +1 -0
  16. openweights-0.13.4/openweights/dashboard/backend/static/assets/index-D2kzykVS.js +232 -0
  17. openweights-0.13.4/openweights/dashboard/backend/static/assets/index-DG-byexf.js +179 -0
  18. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/index.html +1 -1
  19. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/api.ts +10 -2
  20. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/JobsListView.tsx +4 -25
  21. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/JobsView.tsx +92 -86
  22. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/Organizations/TokensTab.tsx +17 -1
  23. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/TokenView.tsx +17 -1
  24. {openweights-0.13.2 → openweights-0.13.4}/openweights/images.py +1 -1
  25. {openweights-0.13.2 → openweights-0.13.4}/pyproject.toml +1 -1
  26. openweights-0.13.4/supabase/migrations/20260922180000_token_creation_limit.sql +24 -0
  27. openweights-0.13.4/supabase/migrations/20260925000000_dashboard_jobs_pagination.sql +42 -0
  28. openweights-0.13.4/tests/dashboard_jobs_browser.py +98 -0
  29. {openweights-0.13.2 → openweights-0.13.4}/tests/test_cost_api.py +34 -0
  30. {openweights-0.13.2 → openweights-0.13.4}/tests/test_cost_tracking.py +99 -0
  31. openweights-0.13.4/tests/test_dashboard_jobs.py +155 -0
  32. openweights-0.13.4/tests/test_token_creation.py +38 -0
  33. {openweights-0.13.2 → openweights-0.13.4}/.gitignore +0 -0
  34. {openweights-0.13.2 → openweights-0.13.4}/LICENSE.txt +0 -0
  35. {openweights-0.13.2 → openweights-0.13.4}/README.md +0 -0
  36. {openweights-0.13.2 → openweights-0.13.4}/docs/release-0.13.0.md +0 -0
  37. {openweights-0.13.2 → openweights-0.13.4}/docs/release-0.13.1.md +0 -0
  38. {openweights-0.13.2 → openweights-0.13.4}/docs/release-0.13.2.md +0 -0
  39. {openweights-0.13.2 → openweights-0.13.4}/openweights/__init__.py +0 -0
  40. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/__init__.py +0 -0
  41. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/__main__.py +0 -0
  42. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/cancel.py +0 -0
  43. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/cluster.py +0 -0
  44. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/common.py +0 -0
  45. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/deploy.py +0 -0
  46. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/env.py +0 -0
  47. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/exec.py +0 -0
  48. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/fetch.py +0 -0
  49. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/logs.py +0 -0
  50. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/ls.py +0 -0
  51. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/manage.py +0 -0
  52. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/serve.py +0 -0
  53. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/signup.py +0 -0
  54. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/ssh.py +0 -0
  55. {openweights-0.13.2 → openweights-0.13.4}/openweights/cli/worker.py +0 -0
  56. {openweights-0.13.2 → openweights-0.13.4}/openweights/client/__init__.py +0 -0
  57. {openweights-0.13.2 → openweights-0.13.4}/openweights/client/chat.py +0 -0
  58. {openweights-0.13.2 → openweights-0.13.4}/openweights/client/costs.py +0 -0
  59. {openweights-0.13.2 → openweights-0.13.4}/openweights/client/decorators.py +0 -0
  60. {openweights-0.13.2 → openweights-0.13.4}/openweights/client/events.py +0 -0
  61. {openweights-0.13.2 → openweights-0.13.4}/openweights/client/files.py +0 -0
  62. {openweights-0.13.2 → openweights-0.13.4}/openweights/client/jobs.py +0 -0
  63. {openweights-0.13.2 → openweights-0.13.4}/openweights/client/run.py +0 -0
  64. {openweights-0.13.2 → openweights-0.13.4}/openweights/client/temporary_api.py +0 -0
  65. {openweights-0.13.2 → openweights-0.13.4}/openweights/client/utils.py +0 -0
  66. {openweights-0.13.2 → openweights-0.13.4}/openweights/cluster/.gitignore +0 -0
  67. {openweights-0.13.2 → openweights-0.13.4}/openweights/cluster/costs.py +0 -0
  68. {openweights-0.13.2 → openweights-0.13.4}/openweights/cluster/org_manager.py +0 -0
  69. {openweights-0.13.2 → openweights-0.13.4}/openweights/cluster/start_runpod.py +0 -0
  70. {openweights-0.13.2 → openweights-0.13.4}/openweights/cluster/supervisor.py +0 -0
  71. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/LogProbVisualization-5fG5WOhY.js +0 -0
  72. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/LogProbVisualization-B6jQtzzK.js +0 -0
  73. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/LogProbVisualization-CnEzdbXa.js +0 -0
  74. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/LogProbVisualization-CstXenGy.js +0 -0
  75. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/LogProbVisualization-D3pk_-6t.js +0 -0
  76. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/LogProbVisualization-DChAruH-.js +0 -0
  77. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/MetricsPlots-BxfU0Wo4.js +0 -0
  78. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/MetricsPlots-BzYzp0RD.js +0 -0
  79. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/MetricsPlots-CKeGDZsD.js +0 -0
  80. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/MetricsPlots-Do-0PbcE.js +0 -0
  81. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/MetricsPlots-Dy5N4URR.js +0 -0
  82. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/MetricsPlots-nOeyXer1.js +0 -0
  83. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/browser-CHCO931n.js +0 -0
  84. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/browser-Cmlb0Wrj.js +0 -0
  85. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/browser-DG1xBqer.js +0 -0
  86. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/browser-DUraiEYF.js +0 -0
  87. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/browser-tfbTCamV.js +0 -0
  88. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/browser-wfG6UVbZ.js +0 -0
  89. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/index-BgDIHOp8.js +0 -0
  90. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/index-CL2BTY-B.js +0 -0
  91. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/index-CmfXCDny.js +0 -0
  92. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/index-D1AiKY7V.js +0 -0
  93. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/index-DpYPsR6j.css +0 -0
  94. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/index-KCoSzXrZ.js +0 -0
  95. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/index-gTAMxuvh.js +0 -0
  96. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/assets/index-nmHS5w_u.css +0 -0
  97. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/config.js +0 -0
  98. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/ow.svg +0 -0
  99. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/static/vite.svg +0 -0
  100. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/backend/utils.py +0 -0
  101. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/.gitignore +0 -0
  102. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/README.md +0 -0
  103. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/eslint.config.js +0 -0
  104. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/index.html +0 -0
  105. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/package-lock.json +0 -0
  106. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/package.json +0 -0
  107. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/public/config.js +0 -0
  108. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/public/ow.svg +0 -0
  109. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/public/vite.svg +0 -0
  110. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/App.css +0 -0
  111. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/App.tsx +0 -0
  112. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/assets/react.svg +0 -0
  113. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/Auth/Auth.tsx +0 -0
  114. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/Auth/ResetPassword.tsx +0 -0
  115. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/CostsView.tsx +0 -0
  116. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/DetailViews/FileContent.tsx +0 -0
  117. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/DetailViews/JobDetailView.tsx +0 -0
  118. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/DetailViews/MetricsDisplay.tsx +0 -0
  119. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/DetailViews/MetricsPlots.tsx +0 -0
  120. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/DetailViews/OutputsDisplay.tsx +0 -0
  121. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/DetailViews/RunDetailView.tsx +0 -0
  122. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/DetailViews/WorkerDetailView.tsx +0 -0
  123. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/DetailViews/index.ts +0 -0
  124. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/DetailViews.tsx +0 -0
  125. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/LogProbVisualization.tsx +0 -0
  126. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/Organizations/OrganizationDetail.tsx +0 -0
  127. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/Organizations/OrganizationList.tsx +0 -0
  128. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/Organizations/OrganizationSwitcher.tsx +0 -0
  129. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/Organizations/OrganizationsList.tsx +0 -0
  130. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/RefreshButton.tsx +0 -0
  131. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/StatusCheckboxes.tsx +0 -0
  132. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/ViewToggle.tsx +0 -0
  133. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/WorkersListView.tsx +0 -0
  134. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/components/WorkersView.tsx +0 -0
  135. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/contexts/AuthContext.tsx +0 -0
  136. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/contexts/OrganizationContext.tsx +0 -0
  137. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/index.css +0 -0
  138. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/main.tsx +0 -0
  139. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/supabaseClient.ts +0 -0
  140. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/types/supabase.ts +0 -0
  141. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/types.ts +0 -0
  142. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/src/vite-env.d.ts +0 -0
  143. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/tsconfig.app.json +0 -0
  144. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/tsconfig.json +0 -0
  145. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/tsconfig.node.json +0 -0
  146. {openweights-0.13.2 → openweights-0.13.4}/openweights/dashboard/frontend/vite.config.ts +0 -0
  147. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/__init__.py +0 -0
  148. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/inference/__init__.py +0 -0
  149. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/inference/cli.py +0 -0
  150. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/inference/openai_support.py +0 -0
  151. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/inference/validate.py +0 -0
  152. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/inspect_ai.py +0 -0
  153. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/mmlu_pro/README.md +0 -0
  154. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/mmlu_pro/__init__.py +0 -0
  155. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/mmlu_pro/compute_accuracy.py +0 -0
  156. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/mmlu_pro/evaluate_from_local.py +0 -0
  157. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/mmlu_pro/requirements.txt +0 -0
  158. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/unsloth/__init__.py +0 -0
  159. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/unsloth/chat_template_spans.py +0 -0
  160. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/unsloth/dpo_ft.py +0 -0
  161. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/unsloth/logp_callback.py +0 -0
  162. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/unsloth/logprobs.py +0 -0
  163. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/unsloth/orpo_ft.py +0 -0
  164. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/unsloth/sampling_callback.py +0 -0
  165. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/unsloth/sft.py +0 -0
  166. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/unsloth/training.py +0 -0
  167. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/unsloth/utils.py +0 -0
  168. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/unsloth/validate.py +0 -0
  169. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/vllm/__init__.py +0 -0
  170. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/vllm/validate.py +0 -0
  171. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/weighted_sft/__init__.py +0 -0
  172. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/weighted_sft/chat_template_spans.py +0 -0
  173. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/weighted_sft/logp_callback.py +0 -0
  174. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/weighted_sft/logprobs.py +0 -0
  175. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/weighted_sft/sampling_callback.py +0 -0
  176. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/weighted_sft/sft.py +0 -0
  177. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/weighted_sft/token_weighting.py +0 -0
  178. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/weighted_sft/training.py +0 -0
  179. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/weighted_sft/utils.py +0 -0
  180. {openweights-0.13.2 → openweights-0.13.4}/openweights/jobs/weighted_sft/validate.py +0 -0
  181. {openweights-0.13.2 → openweights-0.13.4}/openweights/worker/__init__.py +0 -0
  182. {openweights-0.13.2 → openweights-0.13.4}/openweights/worker/gpu_health_check.py +0 -0
  183. {openweights-0.13.2 → openweights-0.13.4}/openweights/worker/gpu_reclaim.py +0 -0
  184. {openweights-0.13.2 → openweights-0.13.4}/openweights/worker/main.py +0 -0
  185. {openweights-0.13.2 → openweights-0.13.4}/openweights/worker/services/__init__.py +0 -0
  186. {openweights-0.13.2 → openweights-0.13.4}/openweights/worker/services/checkout.py +0 -0
  187. {openweights-0.13.2 → openweights-0.13.4}/openweights/worker/services/hf_login.py +0 -0
  188. {openweights-0.13.2 → openweights-0.13.4}/openweights/worker/services/log_server.py +0 -0
  189. {openweights-0.13.2 → openweights-0.13.4}/openweights/worker/services/ttl_manager.py +0 -0
  190. {openweights-0.13.2 → openweights-0.13.4}/openweights/worker/services/ttl_monitor.py +0 -0
  191. {openweights-0.13.2 → openweights-0.13.4}/supabase/migrations/20250116_v1_schema.sql +0 -0
  192. {openweights-0.13.2 → openweights-0.13.4}/supabase/migrations/20250118_storage_and_files_policies.sql +0 -0
  193. {openweights-0.13.2 → openweights-0.13.4}/supabase/migrations/20250119_fix_files_insert.sql +0 -0
  194. {openweights-0.13.2 → openweights-0.13.4}/supabase/migrations/20260922000000_cost_tracking.sql +0 -0
  195. {openweights-0.13.2 → openweights-0.13.4}/tests/dashboard_browser_smoke.py +0 -0
  196. {openweights-0.13.2 → openweights-0.13.4}/tests/gpu_compatibility_check.py +0 -0
  197. {openweights-0.13.2 → openweights-0.13.4}/tests/test_chat_template_spans.py +0 -0
  198. {openweights-0.13.2 → openweights-0.13.4}/tests/test_dpo_configuration.py +0 -0
  199. {openweights-0.13.2 → openweights-0.13.4}/tests/test_gpu_reclaim.py +0 -0
  200. {openweights-0.13.2 → openweights-0.13.4}/tests/test_integration.py +0 -0
  201. {openweights-0.13.2 → openweights-0.13.4}/tests/test_runpod_hardware_registry.py +0 -0
  202. {openweights-0.13.2 → openweights-0.13.4}/tests/test_sampling_callback.py +0 -0
  203. {openweights-0.13.2 → openweights-0.13.4}/tests/test_ssh_cleanup_on_failure.py +0 -0
  204. {openweights-0.13.2 → openweights-0.13.4}/tests/test_start_worker_dev_mode_env.py +0 -0
  205. {openweights-0.13.2 → openweights-0.13.4}/tests/test_temporary_api.py +0 -0
  206. {openweights-0.13.2 → openweights-0.13.4}/tests/test_training_comparison.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: openweights
3
- Version: 0.13.2
3
+ Version: 0.13.4
4
4
  Summary: An openai-like sdk for finetuning and batch inference
5
5
  License: MIT
6
6
  License-File: LICENSE.txt
@@ -58,6 +58,24 @@ runs use the best available `updated_at` timestamp during migration.
58
58
 
59
59
  ## API key spending limits
60
60
 
61
+ Starting with 0.13.3, set an initial budget when creating a token:
62
+
63
+ ```sh
64
+ ow token create --name experiment --spending-limit-usd 100
65
+ ```
66
+
67
+ This works with the existing `OPENWEIGHTS_API_KEY` credentials authorized to create
68
+ tokens. The dashboard's token creation dialog also accepts a lifetime USD limit.
69
+ Omit the option (or leave the field blank) for unlimited spending; `0` blocks work.
70
+ The token and budget are created atomically: failure leaves neither behind.
71
+ The REST token creation endpoint accepts `spending_limit_usd` alongside `name`
72
+ and `expires_in_days`. Apply migration `20260922180000_token_creation_limit.sql`
73
+ before upgrading the dashboard or using the new CLI option. Worker images remain
74
+ v0.13.1.
75
+
76
+ Choosing a new token's initial budget uses existing token-creation permissions.
77
+ Changing or removing an existing budget still requires a signed-in admin user.
78
+
61
79
  A signed-in organization **admin user** can choose an API key in the Costs page and
62
80
  save a lifetime USD limit. `0` blocks work; blank removes the limit. API-key logins
63
81
  can view costs but cannot edit budgets, even though older organization APIs treat
@@ -86,7 +104,10 @@ can add further overhead. Budgeted jobs cannot start on unpriced workers.
86
104
  before a threshold is reached, startup cost may only be allocated when a worker
87
105
  first runs a job, and shutdown delays, manager outages and later overhead can cause
88
106
  overspend. Limits do not reserve the estimated maximum price of pending jobs.
89
- Previously canceled jobs require an explicit restart after increasing a limit.
107
+ For example, if 60 out of 100 jobs have completed when a key exhausts its budget,
108
+ the 60 completed jobs remain completed and the remaining queued/running jobs are
109
+ marked `canceled`. Jobs attributed to other keys are unaffected. Previously canceled
110
+ jobs require an explicit restart after increasing a limit.
90
111
  Limits attach to individual keys, not to all credentials held by a person; this
91
112
  feature does not turn the existing organization-admin API keys into untrusted,
92
113
  restricted credentials. Use independently managed keys and trusted organization
@@ -0,0 +1,51 @@
1
+ # Dashboard jobs performance
2
+
3
+ The jobs page now requests one small page per visible column (or one page in list
4
+ view). Filtering and totals run in PostgreSQL, including searches in parameters
5
+ and outputs, so jobs beyond Supabase's default 1,000-row response cap are visible.
6
+ Scripts and JSON payloads are downloaded only when opening job details.
7
+
8
+ Synchronous API handlers run database calls and log downloads in FastAPI's thread
9
+ pool. Slow log requests no longer block the server event loop. Worker log requests
10
+ have connection/read timeouts, large responses use gzip, and browser refreshes
11
+ wait until the preceding fetch completes. Navigation cancels obsolete fetches.
12
+
13
+ ## Rollout
14
+
15
+ Apply `supabase/migrations/20260925000000_dashboard_jobs_pagination.sql` through
16
+ the normal database migration process **before** deploying the updated dashboard.
17
+ It adds two job indexes and an RLS-enforced `get_dashboard_jobs` RPC; it does not
18
+ change existing policies. Index creation can briefly block job writes, so use an
19
+ appropriate migration window for large installations.
20
+
21
+ The existing jobs list endpoint remains available. The new frontend requires the
22
+ new `/organizations/{organization_id}/jobs/page` endpoint and database RPC.
23
+ Rebuild packaged frontend assets with:
24
+
25
+ ```sh
26
+ cd openweights/dashboard/frontend
27
+ npm run build
28
+ ```
29
+
30
+ ## Verification
31
+
32
+ ```sh
33
+ # API regression tests; SQL tests use the existing disposable-database fixture.
34
+ OW_COST_TEST_CONTAINER=ow-cost-tests .venv/bin/python -m pytest \
35
+ tests/test_dashboard_jobs.py tests/test_cost_api.py -q
36
+
37
+ # With Playwright and Chromium installed; OW_SERVER_PYTHON may select the backend venv.
38
+ python tests/dashboard_browser_smoke.py
39
+ python tests/dashboard_jobs_browser.py
40
+ ```
41
+
42
+ Read-only measurements on the configured database during investigation:
43
+
44
+ | Query | Rows | JSON size | Time |
45
+ | --- | ---: | ---: | ---: |
46
+ | Previous full-row query | 1,000 | 3,013,259 bytes | 1.37 s |
47
+ | 30-row summary query | 30 | 6,500 bytes | 0.32 s |
48
+
49
+ These are individual query timings, not end-to-end production page benchmarks.
50
+ The regression suite checks pagination beyond 1,000 jobs, stable ordering, search,
51
+ empty pages, organization isolation, and concurrent jobs reads during slow logs.
@@ -0,0 +1,12 @@
1
+ # OpenWeights 0.13.3
2
+
3
+ Create a token with a lifetime USD budget using
4
+ `ow token create --name experiment --spending-limit-usd 100`, or the dashboard's
5
+ new spending-limit field. The token and budget are saved atomically. Existing
6
+ API-key credentials authorized to create tokens can choose an initial budget;
7
+ editing existing budgets still requires a signed-in organization admin.
8
+
9
+ Apply `supabase/migrations/20260922180000_token_creation_limit.sql` before using
10
+ the new option. Worker images remain v0.13.1. Budget exhaustion continues to cancel
11
+ queued/running jobs for the key and reject new submissions; completed jobs stay
12
+ completed. Limits include allocated overhead and may be exceeded during shutdown.
@@ -0,0 +1,16 @@
1
+ # OpenWeights 0.13.4
2
+
3
+ The dashboard jobs page now loads small pages of summaries instead of downloading
4
+ up to 1,000 complete jobs. Search, status filters, and totals run in PostgreSQL,
5
+ so older jobs remain accessible. Slow database and worker-log calls run outside
6
+ the API event loop; log downloads have timeouts, responses support gzip, and
7
+ refreshes wait for all outstanding column requests, including failed batches.
8
+
9
+ Apply `supabase/migrations/20260925000000_dashboard_jobs_pagination.sql` before
10
+ upgrading the dashboard. It adds organization-scoped pagination/search and two
11
+ indexes, retaining existing RLS policies. See
12
+ [dashboard performance](dashboard-performance.md) for rollout and measurements.
13
+
14
+ The SDK and all managed image defaults advance to v0.13.4. Cluster, Unsloth, and
15
+ vLLM images include this release; GPU framework dependencies are unchanged from
16
+ the verified v0.13.1 images. Existing workers can finish their jobs normally.
@@ -3,6 +3,7 @@
3
3
  import os
4
4
  import sys
5
5
  from datetime import datetime, timedelta, timezone
6
+ from decimal import Decimal
6
7
 
7
8
  from openweights import OpenWeights
8
9
 
@@ -28,6 +29,11 @@ def add_token_parser(parser):
28
29
  help="Number of days until token expires (optional, default: no expiration)",
29
30
  )
30
31
 
32
+ create_parser.add_argument(
33
+ "--spending-limit-usd",
34
+ help="Lifetime USD limit including overhead (default: unlimited)",
35
+ )
36
+
31
37
  # revoke command
32
38
  revoke_parser = subparsers.add_parser("revoke", help="Revoke (delete) a token")
33
39
  revoke_parser.add_argument(
@@ -131,6 +137,13 @@ def handle_token_ls(args) -> int:
131
137
  def handle_token_create(args) -> int:
132
138
  """Handle the token create command."""
133
139
  try:
140
+ limit = getattr(args, "spending_limit_usd", None)
141
+ if limit is not None:
142
+ limit = Decimal(str(limit))
143
+ if not limit.is_finite() or limit < 0:
144
+ raise ValueError(
145
+ "Spending limit must be a finite nonnegative USD amount"
146
+ )
134
147
  ow = get_openweights_client()
135
148
  org_id = ow.organization_id
136
149
 
@@ -141,15 +154,12 @@ def handle_token_create(args) -> int:
141
154
  datetime.now(timezone.utc) + timedelta(days=args.expires_in_days)
142
155
  ).isoformat()
143
156
 
144
- # Call the create_api_token RPC function
145
- result = ow._supabase.rpc(
146
- "create_api_token",
147
- {
148
- "org_id": org_id,
149
- "token_name": args.name,
150
- "expires_at": expires_at,
151
- },
152
- ).execute()
157
+ params = {"org_id": org_id, "token_name": args.name, "expires_at": expires_at}
158
+ rpc = "create_api_token"
159
+ if limit is not None:
160
+ rpc = "create_api_token_with_limit"
161
+ params["spending_limit_usd"] = str(limit)
162
+ result = ow._supabase.rpc(rpc, params).execute()
153
163
 
154
164
  if not result.data or len(result.data) == 0:
155
165
  print("Error: Failed to create token")
@@ -161,6 +171,11 @@ def handle_token_create(args) -> int:
161
171
  print("-" * 80)
162
172
  print(f"Token ID: {token_data['token_id']}")
163
173
  print(f"Name: {args.name}")
174
+ print(
175
+ f"Spending limit: ${limit} lifetime USD"
176
+ if limit is not None
177
+ else "Spending limit: Unlimited"
178
+ )
164
179
  if expires_at:
165
180
  print(f"Expires: {format_datetime(expires_at)}")
166
181
  else:
@@ -88,7 +88,7 @@ class Database:
88
88
  print(f"Error verifying organization access: {e}")
89
89
  return False
90
90
 
91
- async def create_organization(self, org_data: OrganizationCreate) -> Organization:
91
+ def create_organization(self, org_data: OrganizationCreate) -> Organization:
92
92
  """Create a new organization with the given name and secrets."""
93
93
  # First validate all secrets
94
94
  is_valid, error_message = validate_organization_secrets(org_data.secrets)
@@ -107,7 +107,7 @@ class Database:
107
107
  org_id = org_response.data
108
108
 
109
109
  # Create a default API token for the organization
110
- token = await self.create_token(org_id, TokenCreate(name="Default API Key"))
110
+ token = self.create_token(org_id, TokenCreate(name="Default API Key"))
111
111
 
112
112
  # Store the API token as an organization secret
113
113
  secret_result = self.client.rpc(
@@ -150,7 +150,7 @@ class Database:
150
150
  except Exception as e:
151
151
  raise ValueError(f"Failed to create organization: {str(e)}")
152
152
 
153
- async def update_organization_secret(
153
+ def update_organization_secret(
154
154
  self, organization_id: str, secret_name: str, secret_value: str
155
155
  ) -> bool:
156
156
  """Update or create an organization secret."""
@@ -192,7 +192,7 @@ class Database:
192
192
  except Exception as e:
193
193
  raise ValueError(f"Failed to update secret: {str(e)}")
194
194
 
195
- async def update_organization_secrets(
195
+ def update_organization_secrets(
196
196
  self, organization_id: str, secrets: Dict[str, str]
197
197
  ) -> bool:
198
198
  """Update all organization secrets together. Deletes secrets not in the input dict.
@@ -355,7 +355,7 @@ class Database:
355
355
  for row in (result.data or [])
356
356
  ]
357
357
 
358
- async def create_token(
358
+ def create_token(
359
359
  self, organization_id: str, token_data: TokenCreate
360
360
  ) -> Token:
361
361
  """Create a new API token with optional expiration."""
@@ -368,15 +368,16 @@ class Database:
368
368
  days=token_data.expires_in_days
369
369
  )
370
370
 
371
- # Create API token using the client (RLS will handle authorization)
372
- result = self.client.rpc(
373
- "create_api_token",
374
- {
375
- "org_id": organization_id,
376
- "token_name": token_data.name,
377
- "expires_at": expires_at.isoformat() if expires_at else None,
378
- },
379
- ).execute()
371
+ params = {
372
+ "org_id": organization_id,
373
+ "token_name": token_data.name,
374
+ "expires_at": expires_at.isoformat() if expires_at else None,
375
+ }
376
+ rpc = "create_api_token"
377
+ if token_data.spending_limit_usd is not None:
378
+ rpc = "create_api_token_with_limit"
379
+ params["spending_limit_usd"] = str(token_data.spending_limit_usd)
380
+ result = self.client.rpc(rpc, params).execute()
380
381
 
381
382
  if not result.data or len(result.data) == 0:
382
383
  raise ValueError("Failed to create token")
@@ -394,7 +395,7 @@ class Database:
394
395
  access_token=api_token,
395
396
  )
396
397
 
397
- async def list_tokens(self, organization_id: str) -> List[Token]:
398
+ def list_tokens(self, organization_id: str) -> List[Token]:
398
399
  """List all API tokens for an organization."""
399
400
  self.set_organization_id(organization_id)
400
401
  result = (
@@ -406,7 +407,7 @@ class Database:
406
407
  )
407
408
  return [Token(**token) for token in result.data]
408
409
 
409
- async def delete_token(self, organization_id: str, token_id: str):
410
+ def delete_token(self, organization_id: str, token_id: str):
410
411
  """Revoke an API token."""
411
412
  self.set_organization_id(organization_id)
412
413
 
@@ -429,6 +430,26 @@ class Database:
429
430
  result = query.execute()
430
431
  return [Job(**job) for job in result.data]
431
432
 
433
+ def get_jobs_page(
434
+ self,
435
+ organization_id: str,
436
+ statuses: Optional[List[str]],
437
+ search: str,
438
+ limit: int,
439
+ offset: int,
440
+ ) -> dict:
441
+ self.set_organization_id(organization_id)
442
+ return self.client.rpc(
443
+ "get_dashboard_jobs",
444
+ {
445
+ "org_id": organization_id,
446
+ "statuses": statuses,
447
+ "search_text": search,
448
+ "page_limit": limit,
449
+ "page_offset": offset,
450
+ },
451
+ ).execute().data
452
+
432
453
  def get_job(self, organization_id: str, job_id: str) -> JobWithRuns:
433
454
  self.set_organization_id(organization_id)
434
455
  job = (
@@ -601,7 +622,9 @@ class Database:
601
622
  return "No pod ID available for this worker"
602
623
 
603
624
  try:
604
- response = requests.get(f"https://{pod_id}-10101.proxy.runpod.net/logs")
625
+ response = requests.get(
626
+ f"https://{pod_id}-10101.proxy.runpod.net/logs", timeout=(5, 10)
627
+ )
605
628
  if response.status_code == 200:
606
629
  return clean_ansi(response.text)
607
630
  else:
@@ -663,7 +686,7 @@ class Database:
663
686
 
664
687
  try:
665
688
  response = requests.get(
666
- f"https://{pod_id}-10101.proxy.runpod.net/{run_id}"
689
+ f"https://{pod_id}-10101.proxy.runpod.net/{run_id}", timeout=(5, 10)
667
690
  )
668
691
  if response.status_code == 200:
669
692
  return clean_ansi(response.text)