simrun 0.1.0__tar.gz → 0.3.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.
- simrun-0.3.0/.bumpversion.toml +51 -0
- {simrun-0.1.0 → simrun-0.3.0}/.github/workflows/ci-cd.yml +21 -4
- {simrun-0.1.0 → simrun-0.3.0}/.gitignore +6 -1
- {simrun-0.1.0 → simrun-0.3.0}/CITATION.cff +3 -1
- {simrun-0.1.0 → simrun-0.3.0}/CLAUDE.md +6 -4
- {simrun-0.1.0 → simrun-0.3.0}/PKG-INFO +17 -4
- {simrun-0.1.0 → simrun-0.3.0}/README.md +15 -3
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/argo/kustomization.yaml +3 -1
- simrun-0.3.0/deploy/cluster/argo/requeue.yaml +16 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/simrun.yaml +2 -2
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/store.yaml +4 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/service/Dockerfile +1 -1
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/index.md +3 -0
- simrun-0.3.0/docs/api/local.md +3 -0
- simrun-0.3.0/docs/api/service.local_backend.md +3 -0
- simrun-0.3.0/docs/api/service.local_env.md +3 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/command-line.md +35 -4
- {simrun-0.1.0 → simrun-0.3.0}/docs/concepts.md +8 -7
- {simrun-0.1.0 → simrun-0.3.0}/docs/deployment.md +11 -7
- {simrun-0.1.0 → simrun-0.3.0}/docs/development.md +8 -0
- simrun-0.3.0/docs/images/editor-command.png +0 -0
- simrun-0.3.0/docs/images/editor.png +0 -0
- simrun-0.3.0/docs/images/executions-failed.png +0 -0
- simrun-0.3.0/docs/images/executions-outputs.png +0 -0
- simrun-0.3.0/docs/images/executions-running.png +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/index.md +9 -1
- {simrun-0.1.0 → simrun-0.3.0}/docs/installation.md +1 -1
- simrun-0.3.0/docs/local.md +61 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/mcp.md +1 -1
- {simrun-0.1.0 → simrun-0.3.0}/docs/plugins.md +1 -1
- {simrun-0.1.0 → simrun-0.3.0}/docs/release-notes.md +4 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/service.md +11 -5
- {simrun-0.1.0 → simrun-0.3.0}/docs/testing.md +2 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/web-app.md +16 -6
- {simrun-0.1.0 → simrun-0.3.0}/docs/workflows.md +2 -2
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/api/openapi.json +345 -5
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/api/schema.d.ts +278 -1
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/EditBar.vue +10 -9
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/EditCanvas.vue +16 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/EditInspector.test.ts +16 -2
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/EditNode.vue +12 -7
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/EditTaskPanel.vue +9 -6
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/Inspector.test.ts +47 -2
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/InspectorLogs.vue +50 -18
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/InspectorOutputs.vue +1 -1
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/InspectorOverview.vue +27 -4
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/RunBar.test.ts +2 -1
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/RunBar.vue +4 -3
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/SchemaForm.test.ts +29 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/SchemaForm.vue +12 -4
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/ServerStrip.vue +5 -5
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/TaskNode.vue +7 -4
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/edit-graph.test.ts +26 -1
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/edit-graph.ts +21 -1
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/format.test.ts +10 -1
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/format.ts +9 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/schema-form.test.ts +11 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/schema-form.ts +5 -1
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/views/EditSessions.test.ts +17 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/views/EditSessions.vue +21 -3
- {simrun-0.1.0 → simrun-0.3.0}/pyproject.toml +9 -0
- simrun-0.3.0/release-notes/0.2.0.md +26 -0
- simrun-0.3.0/release-notes/0.3.0.md +25 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/__init__.py +1 -1
- simrun-0.3.0/src/simrun/__main__.py +6 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/argo.py +26 -17
- simrun-0.3.0/src/simrun/cli.py +705 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/client.py +326 -14
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/config.py +16 -1
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/demo.py +1 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/edit.py +1 -3
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/environment.py +33 -7
- simrun-0.3.0/src/simrun/local.py +777 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/mcp.py +9 -3
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/planner.py +25 -4
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/plugins_builtin.py +11 -8
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/podspec.py +84 -17
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/service/app.py +335 -20
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/service/argo_backend.py +108 -4
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/service/backend.py +44 -4
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/service/controller.py +266 -22
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/service/index.py +10 -0
- simrun-0.3.0/src/simrun/service/local_backend.py +888 -0
- simrun-0.3.0/src/simrun/service/local_env.py +157 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/service/submission.py +38 -28
- simrun-0.3.0/src/simrun/snapshot.py +732 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/store.py +10 -1
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/testing.py +56 -5
- simrun-0.3.0/src/simrun/web/assets/EditSessions-Cwa8Hn5O.js +1 -0
- simrun-0.3.0/src/simrun/web/assets/EditorView-CSEPd5zO.css +1 -0
- simrun-0.3.0/src/simrun/web/assets/EditorView-DsGltoOh.js +6 -0
- simrun-0.3.0/src/simrun/web/assets/ExecutionsView-CGILwumK.css +1 -0
- simrun-0.3.0/src/simrun/web/assets/ExecutionsView-D56ZSL8L.js +3 -0
- simrun-0.3.0/src/simrun/web/assets/index-0ZuCJ47D.js +3 -0
- simrun-0.3.0/src/simrun/web/assets/index-OCEqe9F1.css +2 -0
- simrun-0.3.0/src/simrun/web/assets/live-Cz_hXu53.js +2 -0
- simrun-0.3.0/src/simrun/web/assets/style-BG1Be_7-.js +39 -0
- simrun-0.3.0/src/simrun/web/assets/style-_6XKS09t.css +1 -0
- simrun-0.3.0/src/simrun/web/favicon.svg +1 -0
- simrun-0.3.0/src/simrun/web/index.html +14 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/worker.py +227 -23
- {simrun-0.1.0 → simrun-0.3.0}/tests/cluster/test_cluster.py +6 -2
- {simrun-0.1.0 → simrun-0.3.0}/tests/conftest.py +16 -3
- {simrun-0.1.0 → simrun-0.3.0}/tests/service/test_api.py +545 -6
- {simrun-0.1.0 → simrun-0.3.0}/tests/service/test_argo_backend.py +105 -6
- {simrun-0.1.0 → simrun-0.3.0}/tests/service/test_controller.py +226 -15
- {simrun-0.1.0 → simrun-0.3.0}/tests/service/test_editor_api.py +1 -1
- {simrun-0.1.0 → simrun-0.3.0}/tests/service/test_events.py +20 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/service/test_index.py +10 -0
- simrun-0.3.0/tests/service/test_local_backend.py +825 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/service/test_web_api.py +13 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_argo.py +64 -1
- simrun-0.3.0/tests/test_cli.py +249 -0
- simrun-0.3.0/tests/test_cli_local.py +250 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_client.py +165 -1
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_config.py +12 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_environment.py +23 -1
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_exec.py +59 -2
- simrun-0.3.0/tests/test_local.py +508 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_planner.py +68 -4
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_ports.py +57 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_resources.py +11 -0
- simrun-0.3.0/tests/test_snapshot.py +414 -0
- simrun-0.3.0/tests/test_version.py +27 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_worker.py +201 -6
- {simrun-0.1.0 → simrun-0.3.0}/uv.lock +2 -0
- {simrun-0.1.0 → simrun-0.3.0}/zensical.toml +4 -0
- simrun-0.1.0/.bumpversion.toml +0 -24
- simrun-0.1.0/src/simrun/cli.py +0 -350
- simrun-0.1.0/src/simrun/snapshot.py +0 -196
- simrun-0.1.0/tests/test_cli.py +0 -115
- simrun-0.1.0/tests/test_snapshot.py +0 -208
- {simrun-0.1.0 → simrun-0.3.0}/.github/CODEOWNERS +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.github/actions/setup/action.yml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.github/dependabot.yml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.github/pull_request_template.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.github/rulesets/apply.sh +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.github/rulesets/develop.json +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.github/rulesets/main.json +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.github/rulesets/tags.json +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.github/workflows/cluster.yml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.github/workflows/docs.yml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.github/workflows/lint.yml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.pre-commit-config.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.python-version +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.ruff.toml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/.zenodo.json +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/LICENSE +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/argo/controller-config.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/argo/namespace-install.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/argo/workflow-rbac.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/buildkit.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/kueue/config.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/kueue/kustomization.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/kueue/manifests.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/kueue/queues.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/kustomization.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/namespace.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/off-workers.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/priority-classes.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/store-settings.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/cluster/zot.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/k3d/buildkit.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/k3d/kustomization.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/k3d/on-server.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/k3d/quotas.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/k3d/store-claim.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/deploy/k3d/store.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/argo.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/cgroup.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/cli.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/client.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/config.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/cwl.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/demo.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/environment.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/ledger.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/mcp.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/planner.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/plugins.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/plugins_builtin.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/podspec.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/resources.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/service.app.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/service.argo_backend.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/service.auth.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/service.backend.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/service.compare.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/service.controller.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/service.index.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/service.logs.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/service.submission.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/snapshot.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/store.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/testing.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/worker.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/api/workflow.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/docs/robots.txt +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/examples/squares.yaml +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/README.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/index.html +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/mockup/workflow-icons.js +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/mockup/workflow-studio.html +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/package-lock.json +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/package.json +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/public/favicon.svg +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/App.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/api/client.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/api/client.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/api/http.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/api/sse.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/api/sse.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/auth.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/AppIcon.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/EditBar.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/EditCanvas.fit.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/EditCanvas.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/EditInspector.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/EditWorkflowPanel.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/Inspector.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/InspectorRun.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/LogoMark.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/RunCanvas.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/RunCard.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/RunList.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/RunList.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/ServerStrip.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/StatusPill.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/TaskNode.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/TaskPalette.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/TaskPalette.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/TopBar.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/components/TopBar.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/filters.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/filters.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/graph.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/graph.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/icons.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/inspect.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/inspect.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/kinds.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/progress.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/progress.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/status.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/lib/workers.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/main.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/router.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/router.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/stores/edit.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/stores/edit.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/stores/live.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/stores/live.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/stores/run.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/stores/run.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/style.css +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/test/fixtures.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/views/EditorView.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/views/EditorView.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/views/ExecutionsView.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/views/LoginView.test.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/src/views/LoginView.vue +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/tsconfig.json +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/tsconfig.node.json +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/frontend/vite.config.ts +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/release-notes/0.1.0.md +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/scripts/llms_txt.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/scripts/openapi.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/build_constraints.txt +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/cgroup.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/cwl.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/ledger.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/plugins.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/resources.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/service/__init__.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/service/auth.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/service/compare.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/service/edits.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/service/logs.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/src/simrun/workflow.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/cluster/Dockerfile +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/cluster/conftest.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/cluster/k3d_cluster.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/cluster/local.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/cluster/test_capacity.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/cluster/test_service_image.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/cluster/test_sources.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/service/test_compare.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/service/test_edits.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_cgroup.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_cwl.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_deploy.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_edit.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_ledger.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_mcp.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_plugins.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_store.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tests/test_workflow.py +0 -0
- {simrun-0.1.0 → simrun-0.3.0}/tox.ini +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[tool.bumpversion]
|
|
2
|
+
current_version = "0.3.0"
|
|
3
|
+
commit = true
|
|
4
|
+
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
|
5
|
+
serialize = ["{major}.{minor}.{patch}"]
|
|
6
|
+
search = "{current_version}"
|
|
7
|
+
replace = "{new_version}"
|
|
8
|
+
regex = false
|
|
9
|
+
ignore_missing_version = false
|
|
10
|
+
# no tag: the bump is merged into develop through a pull request, which
|
|
11
|
+
# rewrites the commit, so the tag is created on develop afterwards
|
|
12
|
+
tag = false
|
|
13
|
+
sign_tags = false
|
|
14
|
+
tag_name = "{new_version}"
|
|
15
|
+
tag_message = "Bump version: {current_version} → {new_version}"
|
|
16
|
+
allow_dirty = false
|
|
17
|
+
message = "Bump version: {current_version} → {new_version}"
|
|
18
|
+
commit_args = ""
|
|
19
|
+
|
|
20
|
+
[[tool.bumpversion.files]]
|
|
21
|
+
filename = "./src/simrun/__init__.py"
|
|
22
|
+
|
|
23
|
+
[[tool.bumpversion.files]]
|
|
24
|
+
filename = "./CITATION.cff"
|
|
25
|
+
|
|
26
|
+
# the image of the service and the wheel it carries, in its manifest, its Dockerfile
|
|
27
|
+
# and the documentation of the deployment (`tests/test_version.py`)
|
|
28
|
+
[[tool.bumpversion.files]]
|
|
29
|
+
filename = "./deploy/cluster/simrun.yaml"
|
|
30
|
+
search = "simrun-service:{current_version}"
|
|
31
|
+
replace = "simrun-service:{new_version}"
|
|
32
|
+
|
|
33
|
+
[[tool.bumpversion.files]]
|
|
34
|
+
filename = "./deploy/cluster/simrun.yaml"
|
|
35
|
+
search = "simrun-{current_version}-py3-none-any.whl"
|
|
36
|
+
replace = "simrun-{new_version}-py3-none-any.whl"
|
|
37
|
+
|
|
38
|
+
[[tool.bumpversion.files]]
|
|
39
|
+
filename = "./deploy/service/Dockerfile"
|
|
40
|
+
search = "simrun-{current_version}-py3-none-any.whl"
|
|
41
|
+
replace = "simrun-{new_version}-py3-none-any.whl"
|
|
42
|
+
|
|
43
|
+
[[tool.bumpversion.files]]
|
|
44
|
+
filename = "./docs/deployment.md"
|
|
45
|
+
search = "simrun-service:{current_version}"
|
|
46
|
+
replace = "simrun-service:{new_version}"
|
|
47
|
+
|
|
48
|
+
[[tool.bumpversion.files]]
|
|
49
|
+
filename = "./docs/deployment.md"
|
|
50
|
+
search = "simrun-{current_version}-py3-none-any.whl"
|
|
51
|
+
replace = "simrun-{new_version}-py3-none-any.whl"
|
|
@@ -239,9 +239,25 @@ jobs:
|
|
|
239
239
|
echo "::error::the tag $GITHUB_REF_NAME is not the version $version of src/simrun/__init__.py"
|
|
240
240
|
exit 1
|
|
241
241
|
fi
|
|
242
|
+
- name: Set up node
|
|
243
|
+
uses: actions/setup-node@v7
|
|
244
|
+
with:
|
|
245
|
+
node-version: 24
|
|
246
|
+
cache: npm
|
|
247
|
+
cache-dependency-path: frontend/package-lock.json
|
|
248
|
+
- name: Build the web app into the package
|
|
249
|
+
# src/simrun/web is gitignored and an artifact of the build (pyproject.toml),
|
|
250
|
+
# so an installation from PyPI serves the web app of `simrun serve --local`
|
|
251
|
+
run: |
|
|
252
|
+
(cd frontend && npm ci && npm run build)
|
|
253
|
+
rm -rf src/simrun/web
|
|
254
|
+
cp -r frontend/dist src/simrun/web
|
|
242
255
|
- name: Build package
|
|
243
|
-
# the sdist and the wheel
|
|
244
|
-
run:
|
|
256
|
+
# the sdist and the wheel, both with the web app
|
|
257
|
+
run: |
|
|
258
|
+
uvx hatch build
|
|
259
|
+
unzip -l dist/*.whl | grep 'simrun/web/index.html' > /dev/null
|
|
260
|
+
tar tzf dist/*.tar.gz | grep 'src/simrun/web/index.html' > /dev/null
|
|
245
261
|
- name: Check the package
|
|
246
262
|
run: uvx twine check --strict dist/*
|
|
247
263
|
- name: Publish to PyPI
|
|
@@ -273,5 +289,6 @@ jobs:
|
|
|
273
289
|
# a shallow clone cannot be pushed to another branch
|
|
274
290
|
fetch-depth: 0
|
|
275
291
|
- name: Fast-forward main to the release
|
|
276
|
-
# no --force: the push fails loudly if it would not be a fast-forward
|
|
277
|
-
|
|
292
|
+
# no --force: the push fails loudly if it would not be a fast-forward; the full
|
|
293
|
+
# ref name creates main at the first release, where `HEAD:main` is refused
|
|
294
|
+
run: git push origin HEAD:refs/heads/main
|
|
@@ -35,6 +35,11 @@ docs/superpowers/
|
|
|
35
35
|
*~
|
|
36
36
|
.DS_Store
|
|
37
37
|
|
|
38
|
-
# the dependencies and the build of the web app
|
|
38
|
+
# the dependencies and the build of the web app, and its copy in the package of a
|
|
39
|
+
# release
|
|
39
40
|
frontend/node_modules/
|
|
40
41
|
frontend/dist/
|
|
42
|
+
src/simrun/web/
|
|
43
|
+
|
|
44
|
+
# the local service of a project (`simrun serve --local`), in this checkout
|
|
45
|
+
.simrun/
|
|
@@ -8,7 +8,9 @@ authors:
|
|
|
8
8
|
given-names: "Matthias"
|
|
9
9
|
orcid: "https://orcid.org/0000-0003-1725-179X"
|
|
10
10
|
affiliation: "Humboldt-University Berlin, Faculty of Life Science, Institute for Biology, Biology, Berlin; University Lübeck; University Hospital Schleswig-Holstein, Campus Lübeck, First Department of Medicine, Germany"
|
|
11
|
-
version: "0.
|
|
11
|
+
version: "0.3.0"
|
|
12
|
+
date-released: "2026-11-08"
|
|
13
|
+
doi: "10.5281/zenodo.24035618"
|
|
12
14
|
license: MIT
|
|
13
15
|
repository-code: "https://github.com/matthiaskoenig/simrun"
|
|
14
16
|
url: "https://matthiaskoenig.github.io/simrun"
|
|
@@ -20,6 +20,7 @@ pytest -n 0 # in one process, e.g. for --
|
|
|
20
20
|
SIMRUN_K3D=1 uv run pytest -m cluster tests/cluster # the tests on a k3d cluster (docker, ~20 GiB disk)
|
|
21
21
|
SIMRUN_K3D=1 SIMRUN_K3D_KEEP=1 uv run pytest -m cluster tests/cluster # keep the cluster for the next session
|
|
22
22
|
uv run python tests/cluster/local.py up # the k3d cluster as a local test system, service on the host (docs/testing.md); `down` deletes it
|
|
23
|
+
uv run simrun submit examples/squares.yaml --local # on this machine without a cluster, state in .simrun/ (docs/local.md)
|
|
23
24
|
uv run simrun edit /tmp/squares.yaml # a copy of examples/squares.yaml in the Editor of the local test system (docs/web-app.md)
|
|
24
25
|
tox r -e py3.15 # single tox env (py3.14, py3.15)
|
|
25
26
|
tox run-parallel # every supported python, before opening a pull request
|
|
@@ -48,13 +49,14 @@ uv run python scripts/openapi.py && (cd frontend && npm run types) # after a c
|
|
|
48
49
|
|
|
49
50
|
- **`workflow.py`** the model of a workflow (`Workflow`, `TaskSpec`, `SplitMode` `fastest`/`single-server`, `Priority` `owner`/`standard`/`agent`, `ResourceOverride`), inputs `<task>.<port>`, order by inputs, cycles refused.
|
|
50
51
|
- **`plugins.py`** `TaskType` (settings model, ports, `ResourceHint`, `count_units`/`setup`/`compute_unit`/`merge`/`plan` as `"module:function"` strings, `command` (an argv template with `{settings}`, `{out}` and `{input}`, a part repeated per input port as `<port>=<path>`, the scratch copy of a staged port), `uses_cores`, `image`, `cost_setting`), `TaskPaths`, discovery from the entry points; `plugins_builtin.py` the type `command`; `demo.py` the split demo `demo.squares`.
|
|
51
|
-
- **`client.py`, `cli.py`, `mcp.py`** the client (`Client.from_env`: `SIMRUN_URL`, `SIMRUN_TOKEN`, `SIMRUN_STORE
|
|
52
|
+
- **`client.py`, `cli.py`, `mcp.py`** the client (`Client.from_env`: `SIMRUN_URL`, `SIMRUN_TOKEN`, `SIMRUN_STORE` optional, without it the snapshots are uploaded; plans the tasks of the types installed locally which have a `plan` for `submit`, `estimate` and `validate`, `plan_tasks`, sending the fields given or set by the plan, snapshots the sources, then calls the API), the typer CLI on it (every command but `edit` `--json`, a refusal to stderr with exit 1, `wait` exits 2 on timeout) and the FastMCP server on it (answers carry `store`, a refusal is `{"error", "status"}`).
|
|
53
|
+
- **`local.py`** the local service of a project (`simrun serve --local`): `.simrun/` with the store, the index and a generated token, `service.json` (instance, pid, port, token, url; the token is sent only to a server answering the instance at `/local/instance`) while it listens on `127.0.0.1`, `ensure_local` which starts it in the background (`python -m simrun`, `__main__.py`) under a lock and finds it again, the idle exit, `environment` in `service.json` (a service in the background with another python, simrun or task types is restarted when idle), `stop_local` (`serve --local --stop`, `/local/stop`), its end cancels the runs of the `LocalBackend`; `web_dir` the built web app, `simrun/web` of the wheel (copied by the release) or `frontend/dist` of a checkout.
|
|
52
54
|
- **`edit.py`** the command `simrun edit`: opens an edit session, long-polls its requests, writes a save into the workflow file atomically after the hash check of a conflict, runs with fresh snapshots through `Client.submit`, sends the file and the git state of the trees every `EDIT_WATCH_S` when they changed, closes the session on Ctrl-C.
|
|
53
|
-
- **`snapshot.py`** the copy of the files git knows of a working tree into `snapshots/<name>/` of the store, hard links to the last snapshot
|
|
54
|
-
- **`planner.py`** the pod shape (processes the cores and memory of the most common node allow, the retry shape with `RETRY_FACTOR`) and the number of pods (`fastest`: min of `MAX_PIECES` 8, units,
|
|
55
|
+
- **`snapshot.py`** the copy of the files git knows of a working tree into `snapshots/<name>/` of the store (`scan`, then `assemble`; `upload` for the routes `/snapshots/{name}`), hard links to the last snapshot by the hashes of its manifest `<dir>.files.json`, read-only, named by content, with provenance; **`environment.py`** the lock of a run (`uv lock` in a writable shadow tree against the snapshots) with the build backends at the pins of `build_constraints.txt`, the Dockerfile of the image, named by the hash of the lock, the python and the simrun version.
|
|
56
|
+
- **`planner.py`** the pod shape (processes the cores and memory of the most common node allow, the retry shape with `RETRY_FACTOR`) and the number of pods (`fastest`: min of `MAX_PIECES` 8, slots, units over processes, and with the learned seconds of a unit the work over `pod_start_s` of `ClusterConfig`), the six priority classes (`PRIORITY_VALUES`); **`resources.py`** learned resources in SQLite (95th percentile of the last 20 observations times 1.1, floor after a kill for memory), keyed by type, model and `cost_setting`.
|
|
55
57
|
- **`ledger.py`** the unit ledger (`pending/`, `claimed/<i>@<worker>`, `done/`, heartbeats), one `os.rename` per transition (NFS >= 4.1); **`worker.py`** the harness: `simrun-worker` (coordinator `SIMRUN_ROLE=base` waits for the whole ledger and releases stale claims, extra workers exit when nothing is pending, a pool of processes, memory sampling of the cgroup, reports), `simrun-merge`, `simrun-exec` (exit codes 0, 3, 4, 137, 143); **`cgroup.py`** the limits and usage of the cgroup v2.
|
|
56
58
|
- **`store.py`** the run record (`RunRecord`, `RunState`, `TaskState`) and the layout `runs/<id>/` (`run.json`, `tasks/<task>/{settings.json,provenance.json,out/,units/,workers/,logs/,progress.jsonl}`); **`config.py`** `ClusterConfig`; **`podspec.py`** what every backend shares (image, shapes, command, environment `SIMRUN_*`, `SIMRUN_PROVENANCE` the `provenance.json` of the task); **`argo.py`** the Argo workflow of a run (Hera: `<task>-w0`, `<task>-extra`, `<task>-merge`, retry strategy and `podSpecPatch` for the retry memory, Kueue labels); **`cwl.py`** the same run as CWL; **`testing.py`** `FakeBackend`, the backend in memory of the tests.
|
|
57
|
-
- **`service/`** `app.py` the FastAPI app (`ServiceSettings` from `SIMRUN_CONFIG`, `uvicorn --factory simrun.service.app:serve`, every route needs a bearer token), `auth.py` identities and priorities, `backend.py` the backend protocol, `argo_backend.py` Argo, Kueue, node capacity, reservations (taint and label `simrun/reserved`) and BuildKit jobs, `submission.py` the background submission (environment, image, workflow), `controller.py` the stateless reconciliation (task states, OOM evidence, observations, logs, release, cancel), `index.py` the SQLite index of the runs rebuilt from the store, `logs.py` the kept logs, `compare.py` the comparison of runs, `edits.py` the edit sessions of the Editor (`EditSession`, the requests of the browser and the results of the command in `edits/<id>/` of the store, connected while polled within `EDIT_CONNECTED_S`); the read models of the web app (`/me`, `/servers`, the workers of a task, `/task-types`, `/workflows/yaml`), the routes of the edit sessions (`/edits`, a save or run waits up to `EDIT_WAIT_S` for the command) and the event streams (`/events`, `/runs/{id}/events`), and the built app at `/ui/` from the setting `web`.
|
|
59
|
+
- **`service/`** `app.py` the FastAPI app (`ServiceSettings` from `SIMRUN_CONFIG`, `uvicorn --factory simrun.service.app:serve`, every route needs a bearer token), `auth.py` identities and priorities, `backend.py` the backend protocol, `argo_backend.py` Argo (a thread watches the workflows and wakes the controller), Kueue, node capacity, reservations (taint and label `simrun/reserved`) and BuildKit jobs, `local_backend.py` the `LocalBackend` (the tasks of a run as processes, cores shared across runs, `--docker` for `command` tasks, retries of a stop, `SIMRUN_CORES`, `SIMRUN_MEMORY_LIMIT_GB` and `SIMRUN_MEMORY_SOURCE=process`, the coordinator of a split task merges, so no merge pod and one pod per split task (`extra_workers`), pid files beside the logs and `kill_orphans`), `local_env.py` the venv of a local run with snapshots in `.simrun/envs/<run>`, `submission.py` the background submission (environment, image, workflow), `controller.py` the stateless reconciliation (task states, OOM evidence, observations, logs, release, cancel), `index.py` the SQLite index of the runs rebuilt from the store, `logs.py` the kept logs, `compare.py` the comparison of runs, `edits.py` the edit sessions of the Editor (`EditSession`, the requests of the browser and the results of the command in `edits/<id>/` of the store, connected while polled within `EDIT_CONNECTED_S`); the read models of the web app (`/me`, `/servers`, the workers of a task, `/task-types`, `/workflows/yaml`), the routes of the edit sessions (`/edits`, a save or run waits up to `EDIT_WAIT_S` for the command) and the event streams (`/events`, `/runs/{id}/events`), and the built app at `/ui/` from the setting `web`.
|
|
58
60
|
- **`frontend/`** the web app (Vite, Vue 3, TypeScript, Vue Flow, Tailwind v4), served at `/ui/` with hash routing, talking only to the API with the token of the login: `src/api/` the client, the event streams read with `fetch` and the types generated from `openapi.json`, `src/views/` the login, the Executions (runs, run bar, canvas, servers strip, inspector) and the Editor (sessions, palette, canvas, inspector with the settings form of the JSON Schema, bar; the draft in `src/stores/edit.ts`), `mockup/` the approved mockup; the service image has the build at `/opt/simrun/web` (`docs/web-app.md`).
|
|
59
61
|
- **`deploy/`** `cluster/` the kustomization of the cluster (Kueue v0.20.5 and Argo v4.1.6 release manifests committed unchanged, priorities, queue, NFS store, Zot, BuildKit, service), `k3d/` the overlay of the tests, `service/Dockerfile` the service image (with the built web app). **`tests/cluster/`** the k3d tests (`k3d_cluster.py` creates the cluster, `.tools/` holds k3d, kubectl, the kubeconfig and the store).
|
|
60
62
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: simrun
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Runner of simulation workflows on a k3s cluster with Argo Workflows and Kueue.
|
|
5
5
|
Project-URL: Homepage, https://matthiaskoenig.github.io/simrun
|
|
6
6
|
Project-URL: Documentation, https://matthiaskoenig.github.io/simrun
|
|
@@ -32,6 +32,7 @@ Requires-Dist: hera>=7.2
|
|
|
32
32
|
Requires-Dist: httpx>=0.28.1
|
|
33
33
|
Requires-Dist: kubernetes>=37
|
|
34
34
|
Requires-Dist: pydantic>=2.14
|
|
35
|
+
Requires-Dist: python-multipart>=0.0.33
|
|
35
36
|
Requires-Dist: pyyaml>=6.0.3
|
|
36
37
|
Requires-Dist: rich>=14
|
|
37
38
|
Requires-Dist: tomlkit>=0.15.2
|
|
@@ -61,7 +62,7 @@ Description-Content-Type: text/markdown
|
|
|
61
62
|
[](https://pypi.org/project/simrun/)
|
|
62
63
|
[](https://pypi.org/project/simrun/)
|
|
63
64
|
[](https://opensource.org/licenses/MIT)
|
|
64
|
-
[](https://doi.org/10.5281/zenodo.24035618)
|
|
65
66
|
|
|
66
67
|
`simrun` runs simulation workflows on a small cluster of servers with [k3s](https://k3s.io), [Argo Workflows](https://argoproj.github.io/workflows/) and [Kueue](https://kueue.sigs.k8s.io). People and agents submit a workflow of tasks together with the working trees of their model and libraries, uncommitted changes included, and get a run id at once; the run is queued, placed, executed and recorded without the submitter staying connected.
|
|
67
68
|
|
|
@@ -80,7 +81,15 @@ simrun wait <run>
|
|
|
80
81
|
simrun compare <run> <run>
|
|
81
82
|
```
|
|
82
83
|
|
|
83
|
-
|
|
84
|
+
Without a cluster the same workflow runs on this machine, with the web app, see [local mode](https://matthiaskoenig.github.io/simrun/local/):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pip install simrun
|
|
88
|
+
simrun submit fit.yaml --source model=. --local
|
|
89
|
+
simrun outputs <run> <task> --to results
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The documentation is available at [https://matthiaskoenig.github.io/simrun](https://matthiaskoenig.github.io/simrun): [installation](https://matthiaskoenig.github.io/simrun/installation/), [concepts](https://matthiaskoenig.github.io/simrun/concepts/), [workflows](https://matthiaskoenig.github.io/simrun/workflows/), [command line](https://matthiaskoenig.github.io/simrun/command-line/), [local mode](https://matthiaskoenig.github.io/simrun/local/), [agents and MCP](https://matthiaskoenig.github.io/simrun/mcp/), [plugins](https://matthiaskoenig.github.io/simrun/plugins/), [service](https://matthiaskoenig.github.io/simrun/service/), [cluster deployment](https://matthiaskoenig.github.io/simrun/deployment/) and [development](https://matthiaskoenig.github.io/simrun/development/).
|
|
84
93
|
|
|
85
94
|
If you have any questions or issues please [open an issue](https://github.com/matthiaskoenig/simrun/issues).
|
|
86
95
|
|
|
@@ -94,7 +103,11 @@ pip install simrun
|
|
|
94
103
|
|
|
95
104
|
## How to cite
|
|
96
105
|
|
|
97
|
-
If you use `simrun` please cite the archived software on
|
|
106
|
+
If you use `simrun` please cite the archived software on Zenodo:
|
|
107
|
+
|
|
108
|
+
> König, M. *simrun: a runner of simulation workflows on a k3s cluster*. Zenodo. [https://doi.org/10.5281/zenodo.24035618](https://doi.org/10.5281/zenodo.24035618)
|
|
109
|
+
|
|
110
|
+
This DOI stands for every version of `simrun`; the DOI of a single version is on its Zenodo page. The metadata of the citation are in [CITATION.cff](CITATION.cff).
|
|
98
111
|
|
|
99
112
|
## License
|
|
100
113
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://pypi.org/project/simrun/)
|
|
5
5
|
[](https://pypi.org/project/simrun/)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
|
-
[](https://doi.org/10.5281/zenodo.24035618)
|
|
8
8
|
|
|
9
9
|
`simrun` runs simulation workflows on a small cluster of servers with [k3s](https://k3s.io), [Argo Workflows](https://argoproj.github.io/workflows/) and [Kueue](https://kueue.sigs.k8s.io). People and agents submit a workflow of tasks together with the working trees of their model and libraries, uncommitted changes included, and get a run id at once; the run is queued, placed, executed and recorded without the submitter staying connected.
|
|
10
10
|
|
|
@@ -23,7 +23,15 @@ simrun wait <run>
|
|
|
23
23
|
simrun compare <run> <run>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Without a cluster the same workflow runs on this machine, with the web app, see [local mode](https://matthiaskoenig.github.io/simrun/local/):
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install simrun
|
|
30
|
+
simrun submit fit.yaml --source model=. --local
|
|
31
|
+
simrun outputs <run> <task> --to results
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The documentation is available at [https://matthiaskoenig.github.io/simrun](https://matthiaskoenig.github.io/simrun): [installation](https://matthiaskoenig.github.io/simrun/installation/), [concepts](https://matthiaskoenig.github.io/simrun/concepts/), [workflows](https://matthiaskoenig.github.io/simrun/workflows/), [command line](https://matthiaskoenig.github.io/simrun/command-line/), [local mode](https://matthiaskoenig.github.io/simrun/local/), [agents and MCP](https://matthiaskoenig.github.io/simrun/mcp/), [plugins](https://matthiaskoenig.github.io/simrun/plugins/), [service](https://matthiaskoenig.github.io/simrun/service/), [cluster deployment](https://matthiaskoenig.github.io/simrun/deployment/) and [development](https://matthiaskoenig.github.io/simrun/development/).
|
|
27
35
|
|
|
28
36
|
If you have any questions or issues please [open an issue](https://github.com/matthiaskoenig/simrun/issues).
|
|
29
37
|
|
|
@@ -37,7 +45,11 @@ pip install simrun
|
|
|
37
45
|
|
|
38
46
|
## How to cite
|
|
39
47
|
|
|
40
|
-
If you use `simrun` please cite the archived software on
|
|
48
|
+
If you use `simrun` please cite the archived software on Zenodo:
|
|
49
|
+
|
|
50
|
+
> König, M. *simrun: a runner of simulation workflows on a k3s cluster*. Zenodo. [https://doi.org/10.5281/zenodo.24035618](https://doi.org/10.5281/zenodo.24035618)
|
|
51
|
+
|
|
52
|
+
This DOI stands for every version of `simrun`; the DOI of a single version is on its Zenodo page. The metadata of the citation are in [CITATION.cff](CITATION.cff).
|
|
41
53
|
|
|
42
54
|
## License
|
|
43
55
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Argo Workflows v4.1.6, the namespaced install (`namespace-install.yaml`, the release
|
|
2
2
|
# manifest, unchanged) in the namespace `simrun`, without an archive; the executor
|
|
3
3
|
# containers request what they limit, since Kueue counts every container of a pod;
|
|
4
|
-
# the service account of the workflows (`ClusterConfig.service_account`)
|
|
4
|
+
# the service account of the workflows (`ClusterConfig.service_account`); the requeue
|
|
5
|
+
# time of the controller (`requeue.yaml`).
|
|
5
6
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
6
7
|
kind: Kustomization
|
|
7
8
|
namespace: simrun
|
|
@@ -10,3 +11,4 @@ resources:
|
|
|
10
11
|
- workflow-rbac.yaml
|
|
11
12
|
patches:
|
|
12
13
|
- path: controller-config.yaml
|
|
14
|
+
- path: requeue.yaml
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# the controller looks at a workflow again 1 s after a change of its pods instead of
|
|
2
|
+
# 10 s (`DEFAULT_REQUEUE_TIME`, docs/environment-variables.md of Argo), so a run and
|
|
3
|
+
# its tasks show running soon after their pods started, and the next task of the DAG
|
|
4
|
+
# starts about a second after the one before it ended
|
|
5
|
+
apiVersion: apps/v1
|
|
6
|
+
kind: Deployment
|
|
7
|
+
metadata:
|
|
8
|
+
name: workflow-controller
|
|
9
|
+
spec:
|
|
10
|
+
template:
|
|
11
|
+
spec:
|
|
12
|
+
containers:
|
|
13
|
+
- name: workflow-controller
|
|
14
|
+
env:
|
|
15
|
+
- name: DEFAULT_REQUEUE_TIME
|
|
16
|
+
value: 1s
|
|
@@ -82,7 +82,7 @@ data:
|
|
|
82
82
|
db: /var/lib/simrun/resources.sqlite
|
|
83
83
|
tokens: /etc/simrun/tokens/tokens.yaml
|
|
84
84
|
owner: mk
|
|
85
|
-
simrun_wheel: /opt/simrun/simrun-0.
|
|
85
|
+
simrun_wheel: /opt/simrun/simrun-0.3.0-py3-none-any.whl
|
|
86
86
|
backend: simrun.service.argo_backend:backend
|
|
87
87
|
web: /opt/simrun/web
|
|
88
88
|
cluster:
|
|
@@ -156,7 +156,7 @@ spec:
|
|
|
156
156
|
- name: simrun
|
|
157
157
|
# built from deploy/service/Dockerfile, see "The service image" in
|
|
158
158
|
# docs/deployment.md
|
|
159
|
-
image: registry.cluster.internal:5000/simrun-service:0.
|
|
159
|
+
image: registry.cluster.internal:5000/simrun-service:0.3.0
|
|
160
160
|
command:
|
|
161
161
|
- uvicorn
|
|
162
162
|
- --factory
|
|
@@ -14,6 +14,10 @@ reclaimPolicy: Retain
|
|
|
14
14
|
volumeBindingMode: Immediate
|
|
15
15
|
mountOptions:
|
|
16
16
|
- nfsvers=4.2
|
|
17
|
+
# negative lookups are not cached, so a file a pod wrote (e.g. the marker of a
|
|
18
|
+
# merge) is seen at once by the service and the other pods; a PersistentVolume
|
|
19
|
+
# provisioned before keeps the options it was created with
|
|
20
|
+
- lookupcache=positive
|
|
17
21
|
---
|
|
18
22
|
apiVersion: v1
|
|
19
23
|
kind: PersistentVolumeClaim
|
|
@@ -24,7 +24,7 @@ RUN uv venv /opt/venv --python 3.14
|
|
|
24
24
|
COPY requirements.txt /tmp/requirements.txt
|
|
25
25
|
RUN uv pip install --no-cache --no-deps --require-hashes -r /tmp/requirements.txt \
|
|
26
26
|
&& rm /tmp/requirements.txt
|
|
27
|
-
ARG WHEEL=simrun-0.
|
|
27
|
+
ARG WHEEL=simrun-0.3.0-py3-none-any.whl
|
|
28
28
|
COPY ${WHEEL} /opt/simrun/${WHEEL}
|
|
29
29
|
RUN uv pip install --no-cache --no-deps /opt/simrun/${WHEEL}
|
|
30
30
|
# the plugins with their dependencies, at the versions of the lock of simrun
|
|
@@ -14,6 +14,7 @@ The workflows, the plugins, the clients, the planning and the harness of the pod
|
|
|
14
14
|
| [demo](demo.md) | the demo plugin: sums of squares, split into one unit per number |
|
|
15
15
|
| [client](client.md) | the client of the service: snapshots working trees, then calls the API |
|
|
16
16
|
| [cli](cli.md) | the command line of simrun: submit, follow and compare runs |
|
|
17
|
+
| [local](local.md) | the local service of a project in `.simrun/`, started on demand |
|
|
17
18
|
| [mcp](mcp.md) | the MCP server of simrun, a local stdio process of an agent |
|
|
18
19
|
| [planner](planner.md) | the planner: the shape of a worker pod and the number of pieces of a task |
|
|
19
20
|
| [resources](resources.md) | resources learned from the reports of workers |
|
|
@@ -39,6 +40,8 @@ The service: the API, the controller and the backends, see [Service](../service.
|
|
|
39
40
|
| [service.auth](service.auth.md) | identities of the callers of the service and the priorities of their runs |
|
|
40
41
|
| [service.backend](service.backend.md) | the backend the service runs workflows on: Argo Workflows, or a fake in tests |
|
|
41
42
|
| [service.argo_backend](service.argo_backend.md) | the backend of the service on a cluster: Argo Workflows, Kueue and BuildKit |
|
|
43
|
+
| [service.local_backend](service.local_backend.md) | the backend of the local mode: the tasks of a run as processes on this machine |
|
|
44
|
+
| [service.local_env](service.local_env.md) | the venv of a local run with snapshots, never the environment of the service |
|
|
42
45
|
| [service.controller](service.controller.md) | the controller: follows the workflows of the runs and records their end |
|
|
43
46
|
| [service.submission](service.submission.md) | the submission of a run in the background: its environment, image and workflow |
|
|
44
47
|
| [service.index](service.index.md) | the index of the runs in SQLite, beside the run store |
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Command line
|
|
2
2
|
|
|
3
|
-
`simrun` is the command line of people and scripts: it submits, follows, compares, cancels and cleans up runs, and `simrun edit` opens a workflow file in the [Editor](web-app.md#the-editor) of the web app.
|
|
3
|
+
`simrun` is the command line of people and scripts: it submits, follows, compares, cancels and cleans up runs, and `simrun edit` opens a workflow file in the [Editor](web-app.md#the-editor) of the web app. On a cluster it runs on the machine of the working trees and reads three environment variables, which the [MCP server](mcp.md) reads alike:
|
|
4
4
|
|
|
5
5
|
| variable | meaning |
|
|
6
6
|
| --- | --- |
|
|
7
7
|
| `SIMRUN_URL` | the address of the service, e.g. `http://simrun.cluster.internal` |
|
|
8
8
|
| `SIMRUN_TOKEN` | a token of the tokens file of the service, which names the person or the agent |
|
|
9
|
-
| `SIMRUN_STORE` | the run store as it is mounted on this machine, e.g. `/mnt/cluster
|
|
9
|
+
| `SIMRUN_STORE` | optional: the run store as it is mounted on this machine, e.g. `/mnt/cluster`, where the client writes the snapshots itself; without it the client uploads them to the service |
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
export SIMRUN_URL=http://simrun.cluster.internal
|
|
@@ -16,21 +16,25 @@ export SIMRUN_STORE=/mnt/cluster
|
|
|
16
16
|
|
|
17
17
|
Every command takes `--json` (except `logs`, which prints the logs as text, and `edit`, which runs until it is stopped) and prints machine-readable JSON instead of tables. A refusal of the service is printed to stderr with exit code 1.
|
|
18
18
|
|
|
19
|
+
With `--local` on a command, no variable is needed: it talks to the local service of the current directory, see [Local mode](local.md).
|
|
20
|
+
|
|
19
21
|
## Commands
|
|
20
22
|
|
|
21
23
|
| command | what it does |
|
|
22
24
|
| --- | --- |
|
|
23
|
-
| `simrun submit WORKFLOW` | snapshot the sources and submit a workflow; prints the run in the state `submitting` |
|
|
25
|
+
| `simrun submit WORKFLOW` | snapshot the sources and submit a workflow; prints the run in the state `submitting`, or with `--wait` follows it to its end |
|
|
24
26
|
| `simrun wait RUN` | wait for a run to end; exit 0 if it succeeded, 1 if it failed or was cancelled, 2 on timeout |
|
|
25
27
|
| `simrun status RUN` | the state of a run and its tasks with their progress |
|
|
26
28
|
| `simrun list` | the runs, filtered by group, agent, state and owner |
|
|
27
29
|
| `simrun logs RUN TASK` | the logs of the pods of a task |
|
|
30
|
+
| `simrun outputs RUN TASK` | list the output files of a task, or download them with `--to DIR` |
|
|
28
31
|
| `simrun edit WORKFLOW` | serve the Editor of the web app for a workflow file: saves go into the file, runs use the working trees |
|
|
29
32
|
| `simrun estimate WORKFLOW` | the plan and the expected duration of every task of a submission |
|
|
30
33
|
| `simrun compare RUN RUN...` | the provenance and the summaries of the tasks of runs side by side |
|
|
31
34
|
| `simrun cancel RUN` | cancel a run |
|
|
32
35
|
| `simrun cleanup` | remove ended runs and the snapshots nothing refers to |
|
|
33
36
|
| `simrun usage` | the bytes of the store per group and run |
|
|
37
|
+
| `simrun serve` | run the service in the foreground: `--local` the local service of the current directory, else the service of `SIMRUN_CONFIG` |
|
|
34
38
|
|
|
35
39
|
### submit
|
|
36
40
|
|
|
@@ -44,8 +48,13 @@ simrun submit fit.yaml --source model=~/git/pkdb_models --source sbmlsim=~/git/s
|
|
|
44
48
|
| `--group GROUP` | the group of the run, e.g. a study |
|
|
45
49
|
| `--single-server` | place the pieces of every task on one server |
|
|
46
50
|
| `--reserve NODE` | reserve a node for the run |
|
|
51
|
+
| `--local` | use the local service of the current directory, see [Local mode](local.md) |
|
|
52
|
+
| `--docker` | with `--local`: run a `command` task in its image with docker instead of directly |
|
|
53
|
+
| `--snapshot` | with `--local`: copy and install the sources as on the cluster instead of recording their provenance only |
|
|
54
|
+
| `--wait` / `--no-wait` | follow the run to its end (a live line per task on a terminal, plain lines otherwise) and exit like `wait`; the default with `--local`, else `--no-wait` |
|
|
55
|
+
| `--timeout SECONDS` | with `--wait`: give up after this long, exit 2; refused without waiting |
|
|
47
56
|
|
|
48
|
-
The client copies every working tree with its uncommitted changes into `snapshots/<name>/` of the store and sends its provenance, see [Snapshots and environments](concepts.md#snapshots-and-environments).
|
|
57
|
+
The client copies every working tree with its uncommitted changes into `snapshots/<name>/` of the store, or without `SIMRUN_STORE` uploads the files the store lacks to the service which writes the snapshot, and sends its provenance, see [Snapshots and environments](concepts.md#snapshots-and-environments).
|
|
49
58
|
|
|
50
59
|
### edit
|
|
51
60
|
|
|
@@ -57,6 +66,8 @@ simrun edit fit.yaml --source model=~/git/pkdb_models --source sbmlsim=~/git/sbm
|
|
|
57
66
|
| --- | --- |
|
|
58
67
|
| `--source NAME=PATH` | a source, as for `submit`; snapshotted when the session opens and at every run |
|
|
59
68
|
| `--group GROUP` | the group of the runs started from the Editor which name none |
|
|
69
|
+
| `--local` | use the local service of the current directory |
|
|
70
|
+
| `--snapshot` | with `--local`: copy and install the sources at every run |
|
|
60
71
|
|
|
61
72
|
The command opens an edit session in the service, prints the link of the [Editor](web-app.md#the-editor) and runs until Ctrl-C, which closes the session and exits 0 (a second Ctrl-C exits without waiting for the close): it writes the saves of the browser into the file, runs the workflow of the browser as `submit` does, and sends a change of the file or of the working trees to the browser. A file which does not exist is a new workflow.
|
|
62
73
|
|
|
@@ -68,6 +79,15 @@ simrun wait <run> --timeout 3600
|
|
|
68
79
|
|
|
69
80
|
`--timeout` is in seconds, without it the command waits for the end of the run. The service answers a long poll which the client repeats, so no connection is held for hours.
|
|
70
81
|
|
|
82
|
+
### outputs
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
simrun outputs <run> <task> # the files and their sizes
|
|
86
|
+
simrun outputs <run> <task> --to results # download them into results/
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The files come through the API, so no mount of the store is needed. With `--json` the list is `[{"path", "bytes"}]`, or with `--to` the paths written.
|
|
90
|
+
|
|
71
91
|
### status, list and logs
|
|
72
92
|
|
|
73
93
|
```bash
|
|
@@ -96,3 +116,14 @@ simrun usage
|
|
|
96
116
|
```
|
|
97
117
|
|
|
98
118
|
`cleanup` removes the runs which ended more than `--older-than` days ago (30 by default), only the ones of `--group` or only `--failed` runs, and the snapshots no remaining run refers to; `--dry-run` lists what it would remove.
|
|
119
|
+
|
|
120
|
+
### serve
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
simrun serve --local # the local service of the current directory
|
|
124
|
+
simrun serve --local --idle-exit 1800 # exits after 30 min without a request and without a live run
|
|
125
|
+
simrun serve --local --stop # stops the local service of the current directory, cancelling its runs
|
|
126
|
+
simrun serve --port 8000 # the service of SIMRUN_CONFIG, as uvicorn --factory simrun.service.app:serve
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
`serve --local` runs the service of the current directory with the local backend, which runs the tasks as processes on this machine: its store is `.simrun/store/`, its scratch `.simrun/scratch/`, its index `.simrun/simrun.sqlite` and its tokens `.simrun/tokens.yaml` (with a `.gitignore` of everything, so none of it lands in git), it listens on `127.0.0.1` only, on a free port unless `--port` names one, and serves the [web app](web-app.md) at `/ui/`. It prints `simrun at http://127.0.0.1:<port>/ui/ (token in .simrun/service.json)`; `.simrun/service.json` (mode 0600) holds the pid, the port, the token, the URL, a random instance of this start and the environment of the service (its python, its simrun version, a hash of the task types it found, whether it runs in the background) while it runs; a client sends the token only to a server which answers that instance at `/local/instance`. Ctrl-C, SIGTERM or SIGHUP (the terminal closed) cancels the runs and waits for their processes, printing what it waits for, so no process of a run outlives a graceful stop; a service which starts after one which was killed (SIGKILL, out of memory) kills the processes that one left running. `--stop` stops the service of the current directory the same way and waits for its end. One service runs per directory; a second one is refused with exit code 3. A command which needs the local service starts it in the background when none runs (`python -m simrun serve --local --idle-exit 1800`, its output in `.simrun/service.log`); a service in the background which runs with another environment than the command is restarted when it has no live run and no open request, else the command warns and uses it.
|
|
@@ -32,7 +32,7 @@ A run lives in `runs/<id>/` of the store:
|
|
|
32
32
|
| `tasks/<task>/logs/` | the logs of the pods, kept once the task is final |
|
|
33
33
|
| `tasks/<task>/progress.jsonl` | the progress of the task, one line per completed unit |
|
|
34
34
|
|
|
35
|
-
The store is the source of truth. The service keeps an index of the runs in SQLite beside it (id, owner, agent, group, workflow, state, times, pending release and cancellation, snapshots and summary), rebuilt from the records at its start, so a restarted service continues where the one before stopped. The state of a run is the one of the service, not the one of Argo: a split task is done when its merge succeeded, an unsplit task when its pod succeeded; when every task is done the run succeeded, when a task failed the run failed, and in both cases the service stops the workflow.
|
|
35
|
+
The store is the source of truth. The service keeps an index of the runs in SQLite beside it (id, owner, agent, group, workflow, state, times, pending release and cancellation, snapshots and summary), rebuilt from the records at its start, so a restarted service continues where the one before stopped. The state of a run is the one of the service, not the one of Argo: a split task is done when its merge succeeded (its coordinator, which merges, succeeded and its output has the marker of the merge, which the service awaits up to two minutes for the attribute cache of NFS), an unsplit task when its pod succeeded; when every task is done the run succeeded, when a task failed the run failed, and in both cases the service stops the workflow.
|
|
36
36
|
|
|
37
37
|
A run belongs to a group, e.g. a study or the subagents of one main agent, which lists and compares the runs of the group (`simrun list --group`, `simrun compare`).
|
|
38
38
|
|
|
@@ -50,15 +50,16 @@ A unit may be computed more than once: by a worker which is evicted before it co
|
|
|
50
50
|
|
|
51
51
|
A split task of `pods` pods is three nodes of its Argo DAG:
|
|
52
52
|
|
|
53
|
-
- `<task>-w0`, the coordinator, a worker which claims units like the others and returns only once the ledger is complete. It releases the claims of workers whose heartbeat is older than the grace period plus a minute and computes them itself.
|
|
53
|
+
- `<task>-w0`, the coordinator, a worker which claims units like the others and returns only once the ledger is complete and then merges the units. It releases the claims of workers whose heartbeat is older than the grace period plus a minute and computes them itself.
|
|
54
54
|
- `<task>-extra`, the extra workers `<task>-w1` to `<task>-w<pods-1>`, which exit when nothing is pending. An extra worker which fails does not fail the run.
|
|
55
|
-
|
|
55
|
+
|
|
56
|
+
The coordinator merges the units itself once the ledger is complete (`SIMRUN_MERGE=1`), so extra workers still waiting for admission never hold up the merge. A run recorded before that has a node `<task>-merge` running `simrun-merge` after the coordinator only.
|
|
56
57
|
|
|
57
58
|
An unsplit task is one pod which runs the command of its type through `simrun-exec`.
|
|
58
59
|
|
|
59
60
|
## Split modes
|
|
60
61
|
|
|
61
|
-
`fastest` (the default) splits a task into as many pods as there are
|
|
62
|
+
`fastest` (the default) splits a task into as many pods as there are slots on the nodes, at most eight (`MAX_PIECES`) and no pod without a unit for each of its processes; each pod takes the processes its node allows by cores and memory. Once the seconds of a unit are learned, a task gets a further pod only while every pod still has at least `pod_start_s` (10) of work: a pod which takes longer to start than its share of the work would find the units taken by the others and only hold cores. `single-server` places one pod on one server. The mode is set for the workflow, for a task or for the submission (`--single-server`). Extra pods are not limited by the idle capacity: Kueue queues them until a node is free.
|
|
62
63
|
|
|
63
64
|
## Priorities and preemption
|
|
64
65
|
|
|
@@ -70,7 +71,7 @@ The identity of the token of a submission decides the priority of its run:
|
|
|
70
71
|
| `standard` | the other people | 500 | 400 |
|
|
71
72
|
| `agent` | the agents of the other people | 200 | 100 |
|
|
72
73
|
|
|
73
|
-
Every priority is a Kueue `WorkloadPriorityClass` and a Kubernetes `PriorityClass` of the same name and value (`simrun-<priority>-base`, `simrun-<priority>-extra`). The coordinator
|
|
74
|
+
Every priority is a Kueue `WorkloadPriorityClass` and a Kubernetes `PriorityClass` of the same name and value (`simrun-<priority>-base`, `simrun-<priority>-extra`). The coordinator (with its merge) and an unsplit task have the base priority of the run, the extra workers the extra priority. Kueue admits the pods and preempts workloads of a lower priority; the scheduler itself never preempts.
|
|
74
75
|
|
|
75
76
|
## Take-back by preemption
|
|
76
77
|
|
|
@@ -84,9 +85,9 @@ A pod killed for memory (the evidence of the out of memory killer: the reason `O
|
|
|
84
85
|
|
|
85
86
|
## Snapshots and environments
|
|
86
87
|
|
|
87
|
-
A source is a git working tree, the model first. The client copies the files git knows of it (tracked and untracked, not ignored, uncommitted changes included) into `snapshots/<name>/` of the store and sends its provenance (branch, commit, changed files); files
|
|
88
|
+
A source is a git working tree, the model first. The client copies the files git knows of it (tracked and untracked, not ignored, uncommitted changes included) into `snapshots/<name>/` of the store and sends its provenance (branch, commit, changed files); a client without the store mounted sends the list of the files with the hashes of their contents to the service, then a tar of the files whose content the store lacks, and the service writes the same snapshot. Files whose content the last snapshot of the same name has are hard links to it (`<snapshot>.files.json` beside it maps its paths to the hashes), so a snapshot of an unchanged tree costs nearly nothing and its upload sends no file. A snapshot is named by its content and its files are read-only. The service never reads the disk of the client.
|
|
88
89
|
|
|
89
|
-
The image of a run whose model has a `pyproject.toml` holds the third party dependencies of the model and of its snapshotted libraries, locked with `uv lock` against the snapshots, and their build backends at the versions of the constraints file of the service, so a new release of a backend changes no lock and rebuilds no image. The code comes from the snapshots, which a pod mounts read-only and installs editable at its start without network access. The image is named by the hash of the lock, the python version
|
|
90
|
+
The image of a run whose model has a `pyproject.toml` holds the third party dependencies of the model and of its snapshotted libraries, locked with `uv lock` against the snapshots, and their build backends at the versions of the constraints file of the service, so a new release of a backend changes no lock and rebuilds no image. The code comes from the snapshots, which a pod mounts read-only and installs editable at its start without network access. A task imports from the root of the model first, as `python -m` in its checkout does, so a project at the root of a checkout which no package installs (the `examples` of sbmlsim) is found; the client plans its tasks with the same path. The image installs the Debian packages of `system_packages` on the base image first, the shared libraries which wheels link but do not bundle (`libexpat1`, which python-libsbml needs). It is named by the hash of the lock, the python version, the simrun version and its Dockerfile (the base image and the system packages) and built with BuildKit only when the registry does not have it, so a change of the code never rebuilds an image and a change of a dependency does. A run whose model has no `pyproject.toml` runs in the `default_image` of the service.
|
|
90
91
|
|
|
91
92
|
## Reservations
|
|
92
93
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
| namespace | `namespace.yaml` | the namespace `simrun` of the service, the workflows and their pods |
|
|
8
8
|
| priorities | `priority-classes.yaml` | the six priority classes of simrun, each a Kueue `WorkloadPriorityClass` and a Kubernetes `PriorityClass` of the same value, see [Priorities and preemption](concepts.md#priorities-and-preemption) |
|
|
9
9
|
| Kueue v0.20.5 | `kueue/` | the release manifests, committed unchanged, and the queue: a `Topology` by host, a `ResourceFlavor` over the nodes labelled `simrun/worker=true`, the `ClusterQueue` `simrun`, which preempts lower priorities, and the `LocalQueue` `simrun` |
|
|
10
|
-
| Argo Workflows v4.1.6 | `argo/` | the release manifests of a namespace install, committed unchanged, the configuration of the controller and the service account `simrun-workflow` of the pods |
|
|
11
|
-
| run store | `store-settings.yaml`, `store.yaml` | the run store on NFS (csi-driver-nfs), mounted by the service and every pod |
|
|
10
|
+
| Argo Workflows v4.1.6 | `argo/` | the release manifests of a namespace install, committed unchanged, the configuration of the controller, its requeue time of 1 s instead of 10 s (`requeue.yaml`, so a run shows running soon after its pods start and the next task of the DAG starts about a second after the one before it) and the service account `simrun-workflow` of the pods |
|
|
11
|
+
| run store | `store-settings.yaml`, `store.yaml` | the run store on NFS (csi-driver-nfs), mounted by the service and every pod with `nfsvers=4.2` and `lookupcache=positive` |
|
|
12
12
|
| registry | `zot.yaml` | [Zot](https://zotregistry.dev), the image registry inside the network |
|
|
13
13
|
| builds | `buildkit.yaml` | the BuildKit daemon, which builds the images of the environments |
|
|
14
14
|
| service | `simrun.yaml` | the service: its settings, its tokens, its volumes and its rights |
|
|
@@ -21,6 +21,8 @@ kubectl apply --server-side -k deploy/cluster
|
|
|
21
21
|
|
|
22
22
|
The resources of Kueue are accepted once its CRDs and its webhook are up, so the first apply may have to be repeated.
|
|
23
23
|
|
|
24
|
+
The store is mounted with `lookupcache=positive`: the NFS client caches no negative lookups, so a file a pod wrote, e.g. the marker `out/.simrun-merged` of a merge, is seen by the service at once even when it looked for the file before. The mount options are the ones of the StorageClass when the volume of the claim was provisioned: an existing PersistentVolume keeps its options, so add the option to `spec.mountOptions` of that PersistentVolume (or provision it again) and restart the pods which mount it. Without the option the service waits up to two minutes for the marker of a merge before it fails the task.
|
|
25
|
+
|
|
24
26
|
## Nodes
|
|
25
27
|
|
|
26
28
|
The nodes of the runs carry the label `simrun/worker=true`, which the `ResourceFlavor` of Kueue needs (a flavor with a topology needs node labels) and by which the backend lists the nodes:
|
|
@@ -41,7 +43,7 @@ The manifests carry the values of the cluster of the design. A setup replaces th
|
|
|
41
43
|
| `registry.cluster.internal:5000` | `zot.yaml`, `buildkit.yaml`, `simrun.yaml`, `deploy/service/Dockerfile` | the address of the registry as the nodes and BuildKit name it |
|
|
42
44
|
| `owner: mk` | `simrun.yaml`, ConfigMap `simrun-config` | the person who owns the cluster |
|
|
43
45
|
| `{}` | `simrun.yaml`, Secret `simrun-tokens` | the tokens of the people and agents, see [Authentication](service.md#authentication) |
|
|
44
|
-
| `simrun-service:0.
|
|
46
|
+
| `simrun-service:0.3.0`, `simrun-0.3.0-py3-none-any.whl` | `simrun.yaml` | the image of the service and the wheel of simrun it carries, see below |
|
|
45
47
|
| `nominalQuota` of cpu, memory, GPUs and ephemeral storage | `kueue/queues.yaml` | the allocatable resources of the worker nodes |
|
|
46
48
|
|
|
47
49
|
The Service `simrun` (port 80) is reached by the clients, e.g. through an ingress or a DNS name of the network; the examples of this documentation use `http://simrun.cluster.internal`. The development server of the agents mounts the run store, e.g. at `/mnt/cluster`, which is `SIMRUN_STORE` of the clients.
|
|
@@ -61,13 +63,15 @@ cp ~/git/sbmlsim/dist/sbmlsim-*.whl build/service/plugins/ # the plugins
|
|
|
61
63
|
(cd frontend && npm ci && npm run build) # the web app
|
|
62
64
|
rm -rf build/service/web && cp -r frontend/dist build/service/web
|
|
63
65
|
cp deploy/service/Dockerfile build/service/
|
|
64
|
-
docker build -t registry.cluster.internal:5000/simrun-service:0.
|
|
65
|
-
--build-arg WHEEL=simrun-0.
|
|
66
|
-
docker push registry.cluster.internal:5000/simrun-service:0.
|
|
66
|
+
docker build -t registry.cluster.internal:5000/simrun-service:0.3.0 \
|
|
67
|
+
--build-arg WHEEL=simrun-0.3.0-py3-none-any.whl build/service
|
|
68
|
+
docker push registry.cluster.internal:5000/simrun-service:0.3.0
|
|
67
69
|
```
|
|
68
70
|
|
|
69
71
|
The plugins are installed with their dependencies at the versions of the lock of simrun (`constraints.txt`): a plugin which needs another version of a dependency of simrun fails the build instead of moving it. The base (`--build-arg BASE`) is the base image of the environments in the registry, which the registry mirrors with its digest (`ClusterConfig.base_image`). At runtime the service keeps the cache of uv in `/var/cache/uv`, a volume of the deployment, so a submission does not download the metadata and the build backends again.
|
|
70
72
|
|
|
73
|
+
A client without the store mounted (`SIMRUN_STORE`) uploads its snapshots through the API, and the service spools an upload to its temporary directory (`TMPDIR`, else `/tmp`) before it moves the files into the store: the container's `/tmp` must hold up to `max_upload_bytes` (2 GiB by default) per concurrent upload, so give the pod the ephemeral storage for it or mount a volume at `/tmp`.
|
|
74
|
+
|
|
71
75
|
## Builds of the images of the environments
|
|
72
76
|
|
|
73
77
|
An image is built by a Job of `buildctl`, which sends the build context (a ConfigMap of its files, owned by the Job) to the BuildKit daemon of the cluster and pushes the image to the registry with the credentials of the optional Secret `simrun-registry-auth`; whether the registry has an image is asked its API.
|
|
@@ -84,7 +88,7 @@ The integration tests verified the design on k3s v1.35.5 (k3d v5.9.0) with Kueue
|
|
|
84
88
|
- **Preemption and the retries of Argo.** Kueue preempts a workload of a lower priority by deleting its pod within the grace period: the worker stops on SIGTERM, releases its claims and writes its report. Argo marks the attempt `Error` with the message `pod deleted` and no exit code, so the retry strategy retries it; the new pod is gated again and waits. The backend reports such a node `Preempted` until its next pod runs (a node whose pod failed otherwise, a crash or a kill after its grace period, is `Retrying`). A pod preempted before Argo saw it running is created again by Argo as the same attempt, without a retry, so such a node is reported queued and not `Preempted`.
|
|
85
89
|
- **Topology aware scheduling.** A `ResourceFlavor` with a topology needs node labels, hence the label `simrun/worker=true`. On admission Kueue adds the host and the flavor labels to the node selector of the pod; it honours the node selector and the toleration of a reserved run, and the taint `NoExecute` of a reservation keeps the pods of other runs off the node. Kueue preempts for the capacity of a node as well.
|
|
86
90
|
- **The executor counts.** Kueue counts every container, so the init and wait containers of Argo request what they limit (`executor.resources` in the controller config). The init container copies the argoexec binary (about 150 MB) into the pod and has 256Mi; with 128Mi it was killed for memory now and then.
|
|
87
|
-
- **Out of memory.** The kernel kills the whole container (cgroup v2, `memory.oom.group`), so the worker writes no report; Argo names the container in the message, `main: OOMKilled (exit code 137)`. A kill for memory needs this evidence or a report which counts the kills of the out of memory killer in its cgroup; an exit 137 without either is a pod killed after its grace period, an eviction. The retry limit of a pod is 100: every eviction by Kueue counts against it.
|
|
91
|
+
- **Out of memory.** The kernel kills the whole container (cgroup v2, `memory.oom.group`), so the worker writes no report; Argo names the container in the message, `main: OOMKilled (exit code 137)`. A kill for memory needs this evidence or a report which counts the kills of the out of memory killer in its cgroup; an exit 137 without either is a pod killed after its grace period, an eviction. Only a pod which was stopped is retried: without an exit code (a lost node, a pod deleted before it ran), killed (137) or stopped on SIGTERM (143); any other exit fails its task at once, and the message of the run names the pod and its exit. The retry limit of a pod is 100: every eviction by Kueue counts against it.
|
|
88
92
|
- **The retry memory after a preemption.** Argo's expressions of a retry know only the last attempt (`lastRetry`), so an attempt after one which was preempted following a kill for memory gets the first memory again, not the retry memory. The controller does not count a kill of such an attempt toward the limit; the attempt after it has the retry memory again.
|
|
89
93
|
- **Stopping a workflow.** After `shutdown: Stop` Argo fails the nodes still pending; the backend deletes their gated pods.
|
|
90
94
|
- **Logs.** The logs of an attempt whose pod Kueue deleted are gone with the pod; the controller keeps the logs of the pods of a task in the store once the task is final.
|
|
@@ -183,6 +183,14 @@ A release is made from `develop`. Since `develop` only accepts pull requests, th
|
|
|
183
183
|
|
|
184
184
|
This starts the `CI-CD` workflow, which checks that the tag is the version of the package, builds the sdist and the wheel, publishes them to [PyPI](https://pypi.org/project/simrun/), creates the GitHub release from `release-notes/x.y.z.md` and fast-forwards `main` to the tagged commit. It does not run the test matrix again: the merge into `develop` ran it on the same commit, and the job `tested on develop` waits for that run and stops the release unless it passed, so the tag can be pushed right after the merge. Next to it the tests on the k3d cluster run on the tag, and the release waits for them. Check the version before pushing, a tag cannot be moved or deleted afterwards.
|
|
185
185
|
|
|
186
|
+
The wheel and the sdist contain the built web app in `simrun/web`, which `simrun serve --local` serves: the job builds `frontend/` and copies `frontend/dist` to the gitignored `src/simrun/web` before the build (`artifacts` of `pyproject.toml`). A package built without it has no web app, and a checkout serves `frontend/dist` once built. To build the package with the web app locally:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
(cd frontend && npm ci && npm run build)
|
|
190
|
+
rm -rf src/simrun/web && cp -r frontend/dist src/simrun/web
|
|
191
|
+
uvx hatch build
|
|
192
|
+
```
|
|
193
|
+
|
|
186
194
|
8. test the installation from PyPI in a fresh environment:
|
|
187
195
|
|
|
188
196
|
```bash
|
|
Binary file
|
|
Binary file
|