Skip to content

Defer CommandShell executable checks until a command runs - #1

Draft
RulaHallak wants to merge 3 commits into
mainfrom
rula-changes
Draft

RulaHallak wants to merge 3 commits into
mainfrom
rula-changes

Conversation

@RulaHallak

Copy link
Copy Markdown
Owner

Summary

  • Defer the CommandShell executable check from initialization to execute(), so a missing shell is reported when a command runs instead of when the object is created.
  • Construct SlurmSystem.cmd_shell with default_factory=CommandShell, so each system instance gets its own shell and model creation does not require /bin/bash to exist up front.
  • The Sphinx custom.css registration was committed on this branch and then moved to the documentation pull request, so it is not part of this diff.

Test Plan

  • Working tree on rula-changes is clean and matches origin/rula-changes.
  • Compared this branch with main using git diff origin/main...HEAD. The net change is limited to:
    • src/cloudai/util/command_shell.py
    • src/cloudai/systems/slurm/slurm_system.py
    • 5 insertions and 6 deletions.
  • The automated test suite was not re-run for this pull request.

Additional Notes

SlurmSystem can be constructed when /bin/bash is absent, and a missing shell is reported when a command is actually executed.

Signed-off-by: rhallak <rhallak@nvidia.com>
Signed-off-by: rhallak <rhallak@nvidia.com>
The custom stylesheet registration now lives on docs/v180-updates for NVIDIA#1089.

Signed-off-by: rhallak <rhallak@nvidia.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant