xmanager-slurm 0.4.11__tar.gz → 0.4.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xmanager-slurm might be problematic. Click here for more details.

Files changed (126) hide show
  1. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/.vscode/settings.json +1 -0
  2. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/PKG-INFO +1 -2
  3. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/pyproject.toml +1 -2
  4. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/uv.lock +1 -3
  5. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/api/sqlite/client.py +1 -1
  6. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/packageables.py +14 -15
  7. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/resources.py +4 -3
  8. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/scripts/cli.py +7 -1
  9. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/.devcontainer.json +0 -0
  10. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/.github/workflows/ci.yml +0 -0
  11. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/.github/workflows/deploy-docs.yml +0 -0
  12. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/.gitignore +0 -0
  13. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/.pdm-build/.gitignore +0 -0
  14. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/.pdm-build/xm_slurm-0.1+editable.dist-info/METADATA +0 -0
  15. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/.pdm-build/xm_slurm-0.1+editable.dist-info/WHEEL +0 -0
  16. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/.pdm-build/xm_slurm.pth +0 -0
  17. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/.pre-commit-config.yaml +0 -0
  18. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/.python-version +0 -0
  19. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/LICENSE.md +0 -0
  20. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/README.md +0 -0
  21. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/docs/api/executables.rst +0 -0
  22. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/docs/api/executors.rst +0 -0
  23. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/docs/api/packageables.rst +0 -0
  24. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/docs/assets/workflow-dark.svg +0 -0
  25. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/docs/assets/workflow-light.svg +0 -0
  26. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/docs/conf.py +0 -0
  27. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/docs/getting-started/xmanager.md +0 -0
  28. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/docs/guides/index.md +0 -0
  29. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/docs/guides/remote-dev.md +0 -0
  30. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/docs/index.md +0 -0
  31. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/conda/environment.yml +0 -0
  32. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/conda/launch.py +0 -0
  33. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/conda/main.py +0 -0
  34. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/conda/pyproject.toml +0 -0
  35. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/custom-dockerfile/Dockerfile +0 -0
  36. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/custom-dockerfile/launch.py +0 -0
  37. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/custom-dockerfile/pyproject.toml +0 -0
  38. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-array-sweep/launch.py +0 -0
  39. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-array-sweep/main.py +0 -0
  40. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-array-sweep/pyproject.toml +0 -0
  41. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-array-sweep/uv.lock +0 -0
  42. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-dependencies/eval.py +0 -0
  43. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-dependencies/launch.py +0 -0
  44. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-dependencies/pyproject.toml +0 -0
  45. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-dependencies/train.py +0 -0
  46. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-dependencies/uv.lock +0 -0
  47. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-group/Dockerfile +0 -0
  48. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-group/launch.py +0 -0
  49. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-group/pyproject.toml +0 -0
  50. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-group/uv.lock +0 -0
  51. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-timeout/launch.py +0 -0
  52. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-timeout/main.py +0 -0
  53. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-timeout/pyproject.toml +0 -0
  54. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/job-timeout/uv.lock +0 -0
  55. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/metadata/launch.py +0 -0
  56. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/metadata/main.py +0 -0
  57. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/metadata/pyproject.toml +0 -0
  58. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/metadata/requirements.txt +0 -0
  59. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/parameter-controller/launch.py +0 -0
  60. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/parameter-controller/main.py +0 -0
  61. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/parameter-controller/pyproject.toml +0 -0
  62. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/parameter-controller/requirements.txt +0 -0
  63. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/pip/launch.py +0 -0
  64. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/pip/main.py +0 -0
  65. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/pip/pyproject.toml +0 -0
  66. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/pip/requirements.txt +0 -0
  67. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/uv/launch.py +0 -0
  68. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/uv/pyproject.toml +0 -0
  69. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/examples/uv/uv.lock +0 -0
  70. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/conftest.py +0 -0
  71. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/Dockerfile +0 -0
  72. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/README.md +0 -0
  73. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/cgroup.conf +0 -0
  74. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/docker-compose.yml +0 -0
  75. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/docker-entrypoint.sh +0 -0
  76. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/host_ed25519 +0 -0
  77. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/host_ed25519.pub +0 -0
  78. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/id_ed25519 +0 -0
  79. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/id_ed25519.pub +0 -0
  80. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/slurm.conf +0 -0
  81. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/slurmdbd.conf +0 -0
  82. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/fixtures/slurm/sshd_config +0 -0
  83. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/integration/test_remote_execution.py +0 -0
  84. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/tests/test_dependencies.py +0 -0
  85. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/__init__.py +0 -0
  86. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/api/__init__.py +0 -0
  87. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/api/abc.py +0 -0
  88. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/api/models.py +0 -0
  89. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/api/web/client.py +0 -0
  90. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/batching.py +0 -0
  91. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/config.py +0 -0
  92. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/console.py +0 -0
  93. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/constants.py +0 -0
  94. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/contrib/__init__.py +0 -0
  95. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/contrib/clusters/__init__.py +0 -0
  96. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/contrib/clusters/drac.py +0 -0
  97. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/dependencies.py +0 -0
  98. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/executables.py +0 -0
  99. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/execution.py +0 -0
  100. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/executors.py +0 -0
  101. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/experiment.py +0 -0
  102. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/experimental/parameter_controller.py +0 -0
  103. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/filesystem.py +0 -0
  104. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/job_blocks.py +0 -0
  105. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/metadata_context.py +0 -0
  106. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/packaging/__init__.py +0 -0
  107. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/packaging/docker.py +0 -0
  108. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/packaging/registry.py +0 -0
  109. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/packaging/router.py +0 -0
  110. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/packaging/utils.py +0 -0
  111. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/scripts/_cloudpickle.py +0 -0
  112. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/status.py +0 -0
  113. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/docker/docker-bake.hcl.j2 +0 -0
  114. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/docker/mamba.Dockerfile +0 -0
  115. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/docker/python.Dockerfile +0 -0
  116. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/docker/uv.Dockerfile +0 -0
  117. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/slurm/entrypoint.bash.j2 +0 -0
  118. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/slurm/fragments/monitor.bash.j2 +0 -0
  119. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/slurm/fragments/proxy.bash.j2 +0 -0
  120. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/slurm/job-array.bash.j2 +0 -0
  121. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/slurm/job-group.bash.j2 +0 -0
  122. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/slurm/job.bash.j2 +0 -0
  123. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/slurm/runtimes/apptainer.bash.j2 +0 -0
  124. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/templates/slurm/runtimes/podman.bash.j2 +0 -0
  125. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/types.py +0 -0
  126. {xmanager_slurm-0.4.11 → xmanager_slurm-0.4.12}/xm_slurm/utils.py +0 -0
@@ -2,4 +2,5 @@
2
2
  "search.exclude": {
3
3
  "uv.lock": true,
4
4
  },
5
+ "python.analysis.typeCheckingMode": "basic",
5
6
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xmanager-slurm
3
- Version: 0.4.11
3
+ Version: 0.4.12
4
4
  Summary: Slurm backend for XManager.
5
5
  Project-URL: GitHub, https://github.com/jessefarebro/xm-slurm
6
6
  Author-email: Jesse Farebrother <jfarebro@cs.mcgill.ca>
@@ -20,7 +20,6 @@ Requires-Dist: backoff>=2.2.1
20
20
  Requires-Dist: cloudpickle>=3.0.0
21
21
  Requires-Dist: httpx>=0.28.1
22
22
  Requires-Dist: humanize>=4.8.0
23
- Requires-Dist: immutabledict>=3.0.0
24
23
  Requires-Dist: jinja2>=3.1.2
25
24
  Requires-Dist: more-itertools>=10.2.0
26
25
  Requires-Dist: rich>=13.5.2
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
  [project]
6
6
  name = "xmanager-slurm"
7
7
  description = "Slurm backend for XManager."
8
- version = "0.4.11"
8
+ version = "0.4.12"
9
9
  # readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  license = { text = "MIT" }
@@ -27,7 +27,6 @@ dependencies = [
27
27
  "jinja2>=3.1.2",
28
28
  "toml>=0.10.2",
29
29
  "rich>=13.5.2",
30
- "immutabledict>=3.0.0",
31
30
  "backoff>=2.2.1",
32
31
  "more-itertools>=10.2.0",
33
32
  "cloudpickle>=3.0.0",
@@ -2251,7 +2251,7 @@ wheels = [
2251
2251
 
2252
2252
  [[package]]
2253
2253
  name = "xmanager-slurm"
2254
- version = "0.4.11"
2254
+ version = "0.4.12"
2255
2255
  source = { editable = "." }
2256
2256
  dependencies = [
2257
2257
  { name = "aiofile" },
@@ -2260,7 +2260,6 @@ dependencies = [
2260
2260
  { name = "cloudpickle" },
2261
2261
  { name = "httpx" },
2262
2262
  { name = "humanize" },
2263
- { name = "immutabledict" },
2264
2263
  { name = "jinja2" },
2265
2264
  { name = "more-itertools" },
2266
2265
  { name = "rich" },
@@ -2292,7 +2291,6 @@ requires-dist = [
2292
2291
  { name = "cloudpickle", specifier = ">=3.0.0" },
2293
2292
  { name = "httpx", specifier = ">=0.28.1" },
2294
2293
  { name = "humanize", specifier = ">=4.8.0" },
2295
- { name = "immutabledict", specifier = ">=3.0.0" },
2296
2294
  { name = "jinja2", specifier = ">=3.1.2" },
2297
2295
  { name = "more-itertools", specifier = ">=10.2.0" },
2298
2296
  { name = "rich", specifier = ">=13.5.2" },
@@ -153,7 +153,7 @@ class XManagerSqliteAPI(XManagerAPI):
153
153
  artifacts = [
154
154
  models.Artifact(name=artifact.name, uri=artifact.uri)
155
155
  for artifact in experiment.artifacts
156
- ] + [models.Artifact(name=config.name, uri=config.uri) for config in experiment.configs]
156
+ ]
157
157
 
158
158
  return models.Experiment(
159
159
  title=experiment.title,
@@ -3,7 +3,6 @@ import pathlib
3
3
  import sys
4
4
  from typing import Literal, Mapping, Sequence
5
5
 
6
- import immutabledict
7
6
  from xmanager import xm
8
7
 
9
8
  from xm_slurm import job_blocks, utils
@@ -15,7 +14,7 @@ def docker_image(
15
14
  *,
16
15
  image: str,
17
16
  args: xm.UserArgs | None = None,
18
- env_vars: Mapping[str, str] = immutabledict.immutabledict(),
17
+ env_vars: Mapping[str, str] | None = None,
19
18
  ) -> xm.Packageable:
20
19
  """Creates a packageable for a pre-built Docker image.
21
20
 
@@ -30,7 +29,7 @@ def docker_image(
30
29
  executor_spec=SlurmSpec(),
31
30
  executable_spec=DockerImage(image=image),
32
31
  args=xm.SequentialArgs.from_collection(args),
33
- env_vars=dict(env_vars),
32
+ env_vars=env_vars or {},
34
33
  )
35
34
 
36
35
 
@@ -41,11 +40,11 @@ def docker_container(
41
40
  context: pathlib.Path | None = None,
42
41
  target: str | None = None,
43
42
  ssh: Sequence[str] | Literal[True] | None = None,
44
- build_args: Mapping[str, str] = immutabledict.immutabledict(),
43
+ build_args: Mapping[str, str] | None = None,
45
44
  cache_from: str | Sequence[str] | None = None,
46
- labels: Mapping[str, str] = immutabledict.immutabledict(),
45
+ labels: Mapping[str, str] | None = None,
47
46
  args: xm.UserArgs | None = None,
48
- env_vars: Mapping[str, str] = immutabledict.immutabledict(),
47
+ env_vars: Mapping[str, str] | None = None,
49
48
  ) -> xm.Packageable:
50
49
  """Creates a Docker container packageable from a dockerfile.
51
50
 
@@ -89,12 +88,12 @@ def docker_container(
89
88
  context=context,
90
89
  target=target,
91
90
  ssh=ssh,
92
- build_args=build_args,
91
+ build_args=build_args or {},
93
92
  cache_from=cache_from,
94
- labels=labels,
93
+ labels=labels or {},
95
94
  ),
96
95
  args=xm.SequentialArgs.from_collection(args),
97
- env_vars=dict(env_vars),
96
+ env_vars=env_vars or {},
98
97
  )
99
98
 
100
99
 
@@ -108,10 +107,10 @@ def python_container(
108
107
  extra_system_packages: Sequence[str] = (),
109
108
  extra_python_packages: Sequence[str] = (),
110
109
  cache_from: str | Sequence[str] | None = None,
111
- labels: Mapping[str, str] = immutabledict.immutabledict(),
110
+ labels: Mapping[str, str] | None = None,
112
111
  ssh: Sequence[str] | Literal[True] | None = None,
113
112
  args: xm.UserArgs | None = None,
114
- env_vars: Mapping[str, str] = immutabledict.immutabledict(),
113
+ env_vars: Mapping[str, str] | None = None,
115
114
  ) -> xm.Packageable:
116
115
  """Creates a Python container from a base image using pip from a `requirements.txt` file.
117
116
 
@@ -183,10 +182,10 @@ def mamba_container(
183
182
  environment: pathlib.Path | None = None,
184
183
  base_image: str = "gcr.io/distroless/base-debian10",
185
184
  cache_from: str | Sequence[str] | None = None,
186
- labels: Mapping[str, str] = immutabledict.immutabledict(),
185
+ labels: Mapping[str, str] | None = None,
187
186
  ssh: Sequence[str] | Literal[True] | None = None,
188
187
  args: xm.UserArgs | None = None,
189
- env_vars: Mapping[str, str] = immutabledict.immutabledict(),
188
+ env_vars: Mapping[str, str] | None = None,
190
189
  ) -> xm.Packageable:
191
190
  """Creates a Conda container from a base image using mamba from a `environment.yml` file.
192
191
 
@@ -253,10 +252,10 @@ def uv_container(
253
252
  extra_system_packages: Sequence[str] = (),
254
253
  extra_python_packages: Sequence[str] = (),
255
254
  cache_from: str | Sequence[str] | None = None,
256
- labels: Mapping[str, str] = immutabledict.immutabledict(),
255
+ labels: Mapping[str, str] | None = None,
257
256
  ssh: Sequence[str] | Literal[True] | None = None,
258
257
  args: xm.UserArgs | None = None,
259
- env_vars: Mapping[str, str] = immutabledict.immutabledict(),
258
+ env_vars: Mapping[str, str] | None = None,
260
259
  ) -> xm.Packageable:
261
260
  """Creates a Python container from a base image using uv from a `uv.lock` file.
262
261
 
@@ -3,8 +3,6 @@ import itertools
3
3
  import math
4
4
  from typing import Mapping
5
5
 
6
- import immutabledict
7
-
8
6
  from xm_slurm import config
9
7
 
10
8
 
@@ -76,7 +74,7 @@ class JobRequirements:
76
74
  def __init__(
77
75
  self,
78
76
  *,
79
- resources: Mapping[ResourceType | str, ResourceQuantity] = immutabledict.immutabledict(),
77
+ resources: Mapping[ResourceType | str, ResourceQuantity] | None = None,
80
78
  replicas: int = 1,
81
79
  location: str | None = None,
82
80
  cluster: config.SlurmClusterConfig | None = None,
@@ -87,6 +85,9 @@ class JobRequirements:
87
85
  self.accelerator = None
88
86
  self.cluster = cluster
89
87
 
88
+ if resources is None:
89
+ resources = {}
90
+
90
91
  self.task_requirements: dict[ResourceType | str, ResourceQuantity] = {}
91
92
  for resource_name, value in itertools.chain(resources.items(), kw_resources.items()):
92
93
  match resource_name:
@@ -19,7 +19,13 @@ async def logs(
19
19
  xp = xm_slurm.get_experiment(experiment_id)
20
20
 
21
21
  if wid is not None:
22
- wu = xp.work_units()[wid]
22
+ wus = xp.work_units()
23
+ if wid not in wus:
24
+ console.print(
25
+ f"[red]Work Unit ID {wid} not found for experiment {experiment_id} with {len(wus)} work units.[/red]"
26
+ )
27
+ sys.exit(1)
28
+ wu = wus[wid]
23
29
  elif identity is not None:
24
30
  wu = xp._get_work_unit_by_identity(identity)
25
31
  if wu is None: