Skip to content

Integrate cluster autodiscovery with SlurmConfig and CLI #8

@gregorweiss

Description

@gregorweiss

Connect the Slurm autodiscovery module to existing infrastructure so users benefit from it without changing their workflow.

Depends on: #7 (SLURM cluster autodiscovery)

Scope

  • SlurmConfig.from_cluster() class method that auto-populates fields from discovered cluster info
  • CLI command: mdfactory config cluster (show discovered info)
  • CLI command: mdfactory config cluster --json (machine-readable)
  • Optional [slurm] section in config.ini for manual overrides
  • When --partition/--account not provided to analysis run --slurm, fall back to autodiscovered defaults

Design notes

SlurmConfig.from_cluster() uses a lazy import of mdfactory.performance.cluster inside the method body. This avoids a hard import-time dependency on the performance package and ensures analysis/submit.py remains importable on machines without SLURM.

Config integration

[slurm]
; Optional overrides. When empty, values are autodiscovered.
ACCOUNT =
PARTITION_CPU =
PARTITION_GPU =
DEFAULT_QOS =

When set, these take priority over autodiscovery. When empty, the module queries SLURM at runtime.

Acceptance criteria

  • mdfactory config cluster prints partition/account/GPU info on a SLURM cluster
  • mdfactory config cluster prints helpful message on non-SLURM machine
  • mdfactory analysis run --slurm works without explicit partition/account when autodiscovery succeeds

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions