-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement job run command #652
Conversation
why new command 'run' instead integrating new option |
python/neuromation/cli/job.py
Outdated
@@ -458,6 +484,169 @@ def format_fail(job: str, reason: Exception) -> str: | |||
click.echo(format_fail(job, error)) | |||
|
|||
|
|||
@command(context_settings=dict(ignore_unknown_options=True)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we use ignore_unknown_options temporarily here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A copy from submit
command.
Otherwise executed command (sleep 100
for example) should be quoted.
I know the #526 problem but please let's eat an elephant a bite at a time.
python/tests/e2e/test_e2e_jobs.py
Outdated
captured = helper.run_cli(["job", "kill", job_id]) | ||
|
||
# Currently we check that the job is not running anymore | ||
# TODO(adavydow): replace to succeeded check when racecon in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the comment is redundant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. I'd like to figure it out (for job submit
as well) in a separate PR
Co-Authored-By: asvetlov <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #652 +/- ##
==========================================
+ Coverage 90.71% 91.54% +0.83%
==========================================
Files 40 39 -1
Lines 3208 3230 +22
Branches 454 440 -14
==========================================
+ Hits 2910 2957 +47
+ Misses 220 205 -15
+ Partials 78 68 -10
Continue to review full report at Codecov.
|
help="Wait for a job start or failure", | ||
) | ||
@async_cmd | ||
async def run( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neuro run should be effectively an alias to Neuro submit, but allow specifying a preset instead of specific resources. Thus, we still want to be able to pass volumes etc. Also, we would like to mount the default volumes only when specified explicitly using an option such as —home or similar.
README.md
Outdated
# sets PYTHONPATH environment value to /python. | ||
# Directories as mounted as in previous example. | ||
# Please note that SSH server should be provided by container. | ||
neuro run --env PYTHONPATH=/python --ssh 22 pytorch:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't --ssh
obsolete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job!
neuro run ...
, as discussed many times earlier.