xmanager-slurm 0.4.9__py3-none-any.whl → 0.4.11__py3-none-any.whl

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.

xm_slurm/config.py CHANGED
@@ -62,9 +62,14 @@ class SlurmSSHConfig:
62
62
  if self.host_public_key is None:
63
63
  return None
64
64
 
65
- return asyncssh.import_known_hosts(
66
- f"[{self.host}]:{self.port} {self.host_public_key.algorithm} {self.host_public_key.key}"
65
+ hostname = f"{self.host}"
66
+ if self.port is not None and self.port != asyncssh.DEFAULT_PORT:
67
+ hostname = f"[{hostname}]:{self.port}"
68
+
69
+ known_hosts = asyncssh.import_known_hosts(
70
+ f"{hostname} {self.host_public_key.algorithm} {self.host_public_key.key}"
67
71
  )
72
+ return known_hosts
68
73
 
69
74
  @functools.cached_property
70
75
  def config(self) -> asyncssh.config.SSHConfig:
@@ -117,9 +122,9 @@ class SlurmSSHConfig:
117
122
  def connection_options(self) -> asyncssh.SSHClientConnectionOptions:
118
123
  options = asyncssh.SSHClientConnectionOptions(
119
124
  config=None,
120
- kbdint_auth=False,
121
125
  disable_trivial_auth=True,
122
126
  known_hosts=self.known_hosts,
127
+ server_host_key_algs=self.host_public_key.algorithm if self.host_public_key else None,
123
128
  )
124
129
  options.prepare(last_config=self.config)
125
130
  return options
@@ -139,15 +139,12 @@ class DockerClient:
139
139
  )
140
140
  return _parse_credentials_from_config(podman_config_path)
141
141
 
142
- def inspect(
143
- self, image: ImageURI, element: str | None = None, type: tp.Literal["image"] = "image"
144
- ) -> dict[str, tp.Any]:
142
+ def inspect(self, image: ImageURI, element: str) -> dict[str, tp.Any]:
145
143
  output = utils.run_command(
146
144
  xm.merge_args(
147
145
  self._client_call,
148
- ["inspect"],
149
- ["--format", f"{{{{json .{element}}}}}"] if element else [],
150
- ["--type", type] if type else [],
146
+ ["buildx", "imagetools", "inspect"],
147
+ ["--format", f"{{{{json .{element}}}}}"],
151
148
  [str(image)],
152
149
  ),
153
150
  check=True,
@@ -259,7 +256,7 @@ class DockerClient:
259
256
  uri = ImageURI(target.value.executor_spec.tag).with_digest(
260
257
  executable_metadata["containerimage.digest"]
261
258
  )
262
- config = self.inspect(uri, "Config")
259
+ config = self.inspect(uri, "Image.Config")
263
260
  if "WorkingDir" not in config:
264
261
  raise ValueError(
265
262
  "Docker image does not have a working directory. "
@@ -320,7 +317,7 @@ def _(
320
317
 
321
318
  uri = ImageURI(target.value.executable_spec.image)
322
319
 
323
- config = client.inspect(uri, "Config")
320
+ config = client.inspect(uri, "Image.Config")
324
321
  if "WorkingDir" not in config:
325
322
  raise ValueError(
326
323
  "Docker image does not have a working directory. "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xmanager-slurm
3
- Version: 0.4.9
3
+ Version: 0.4.11
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>
@@ -1,6 +1,6 @@
1
1
  xm_slurm/__init__.py,sha256=WgRn9HDYa5H3sfIH-HZu33liBOh98jM4GqcR349RaSY,1086
2
2
  xm_slurm/batching.py,sha256=GbKBsNz9w8gIc2fHLZpslC0e4K9YUfLXFHmjduRRCfQ,4385
3
- xm_slurm/config.py,sha256=PvdLG6fSNfbABbtwELbnytx85vWLPtyVfEJtoQsLf94,7084
3
+ xm_slurm/config.py,sha256=i9WuxjfGBgVoHHDNk3BvO7LCwpBTJeRnOiFvTU-FHrk,7330
4
4
  xm_slurm/console.py,sha256=UpMqeJ0C8i0pkue1AHnnyyX0bFJ9zZeJ7HBR6yhuA8A,54
5
5
  xm_slurm/constants.py,sha256=zefVtlFdflgSolie5g_rVxWV-Zpydxapchm3y0a2FDc,999
6
6
  xm_slurm/dependencies.py,sha256=-5gN_tpfs3dOA7H5_MIHO2ratb7F5Pm_yjkR5rZcgI8,6421
@@ -26,7 +26,7 @@ xm_slurm/contrib/clusters/__init__.py,sha256=XFCVnkThiU3_8uA_tUgDByOBanXNHrxDvfm
26
26
  xm_slurm/contrib/clusters/drac.py,sha256=ViLYerYBMSuZXnWVbz9RDIPPV7JA8BgBpgTfj1wPP28,5881
27
27
  xm_slurm/experimental/parameter_controller.py,sha256=b5LfglHV307F6QcPrHeZX5GJBtyOK9aQydke_SZ3Wto,8457
28
28
  xm_slurm/packaging/__init__.py,sha256=dh307yLpUT9KN7rJ1e9fYC6hegGKfZcGboUq9nGpDVQ,233
29
- xm_slurm/packaging/docker.py,sha256=ZNlTWyBQVJQ1kzOhWNqva5g8F31gAbmWL2-DFY9FJ-w,13677
29
+ xm_slurm/packaging/docker.py,sha256=-DWcB9qqbeHmIEqyfF0-v6xOT25ae90u2x-QZ7kluOw,13579
30
30
  xm_slurm/packaging/registry.py,sha256=GrdmQg9MgSo38OiqOzMKWSkQyBuyryOfc3zcdgZ4CUE,1148
31
31
  xm_slurm/packaging/router.py,sha256=yPbdA9clrhly97cLgDsSRZG2LZRKE-oz8Hhdb7WtYqk,2070
32
32
  xm_slurm/packaging/utils.py,sha256=6EAb17zKQQeuyNY2EV9AoW1RvnDGrQwmIT9wtQEsC4c,632
@@ -44,8 +44,8 @@ xm_slurm/templates/slurm/fragments/monitor.bash.j2,sha256=BJ1brSjhESOe9VX_OYaPyy
44
44
  xm_slurm/templates/slurm/fragments/proxy.bash.j2,sha256=VJLglZo-Nvx9R-qe3rHTxr07CylTQ6Z9NwBzvIpAZrA,814
45
45
  xm_slurm/templates/slurm/runtimes/apptainer.bash.j2,sha256=lE2EWVCK2O-n08RL4_MJYIikVTvODjcYKuv7Eh73Q2w,1932
46
46
  xm_slurm/templates/slurm/runtimes/podman.bash.j2,sha256=3j7K5eyXt_WhXK0EoMlxnhlmFVJ2JyxRKbsMRaDqzSs,1148
47
- xmanager_slurm-0.4.9.dist-info/METADATA,sha256=WWPRzVrTsK5t8kD732EIejSlNgQ8KP01Ln7eM1Mj4e4,1042
48
- xmanager_slurm-0.4.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
49
- xmanager_slurm-0.4.9.dist-info/entry_points.txt,sha256=_HLGmLgxuQLOPmF2gOFYDVq2HqtMVD_SzigHvUh8TCY,49
50
- xmanager_slurm-0.4.9.dist-info/licenses/LICENSE.md,sha256=IxstXr3MPHwTJ5jMrByHrQsR1ZAGQ2U_uz_4qzI_15Y,11756
51
- xmanager_slurm-0.4.9.dist-info/RECORD,,
47
+ xmanager_slurm-0.4.11.dist-info/METADATA,sha256=f7oAbg0CGJLT3iQUERwjnB4IdhrDzgDoYEL2izYTA0o,1043
48
+ xmanager_slurm-0.4.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
49
+ xmanager_slurm-0.4.11.dist-info/entry_points.txt,sha256=_HLGmLgxuQLOPmF2gOFYDVq2HqtMVD_SzigHvUh8TCY,49
50
+ xmanager_slurm-0.4.11.dist-info/licenses/LICENSE.md,sha256=IxstXr3MPHwTJ5jMrByHrQsR1ZAGQ2U_uz_4qzI_15Y,11756
51
+ xmanager_slurm-0.4.11.dist-info/RECORD,,