[Projects] Add "session execute"#5681
Conversation
python/ray/projects/scripts.py
Outdated
| raise click.ClickException( | ||
| "Docker support in session is currently not implemented. " | ||
| "Please file an feature request at" | ||
| "https://github.com/ray-project/ray/issues") |
There was a problem hiding this comment.
I actually don't like this practice; I don't think it's particularly useful (suggesting the filing, that is).
There was a problem hiding this comment.
(though it's not the end of the world if you leave it in)
There was a problem hiding this comment.
Yeah, I removed it
python/ray/projects/scripts.py
Outdated
| # We try to parse the command here so we can fail before the cluster | ||
| # is started in case the command is malformed. | ||
| if shell: | ||
| self.command_to_run = command |
There was a problem hiding this comment.
I think it actually might make more sense to pass in the command to run to SessionRunner.execute_command instead of the constructor. This would also let us reuse the same SessionRunner for multiple commands.
python/ray/projects/scripts.py
Outdated
| def session_start(command, args, shell): | ||
| runner = SessionRunner(command, args, shell) | ||
| if shell or command: | ||
| logger.info("[1/4] Creating cluster") |
There was a problem hiding this comment.
To reduce duplication here, maybe just set the total number of steps in the if statement?
|
Test PASSed. |
|
Test FAILed. |
|
Test PASSed. |
|
Test PASSed. |
|
Test PASSed. |
|
Test PASSed. |
|
Test FAILed. |
|
Test FAILed. |
Why are these changes needed?
This PR introduces a new
session executecommand which allows running commands in an already created session.Related issue number
Checks
scripts/format.shto lint the changes in this PR.