Skip to content

feat(cli): add --async flag to job run for non-blocking submit#930

Open
berstpander wants to merge 1 commit into
alibaba:masterfrom
berstpander:feat/job-run-async-flag
Open

feat(cli): add --async flag to job run for non-blocking submit#930
berstpander wants to merge 1 commit into
alibaba:masterfrom
berstpander:feat/job-run-async-flag

Conversation

@berstpander
Copy link
Copy Markdown
Contributor

Adds --async to rock job run. When set, the command calls
Job.submit() instead of Job.run() and prints experiment_id,
job_name, and sandbox_ids before returning. Sync mode is unchanged.

Also adds a read-only Job.sandbox_ids property (empty before submit).

closes #929

Submit the job and print experiment_id, job_name, and sandbox_ids immediately instead of waiting for completion. Adds Job.sandbox_ids read-only property.
Comment thread rock/cli/command/job.py
job = Job(config)
if getattr(args, "async_mode", False):
await job.submit()
print(f"experiment_id: {config.experiment_id or ''}")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么用print 不是log

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.

[Feature] Support non-blocking submission for rock job run via --async

2 participants