Skip to content
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

fix(launch): launch cli command should exit with non-zero status if underlying launched run exits with non-zero status #6078

Conversation

KyleGoyette
Copy link
Contributor

@KyleGoyette KyleGoyette commented Aug 15, 2023

Fixes

Description

What does the PR do?

🤖 Generated by Copilot at 7cd714d

Added a new option and a status check for the launch command in wandb/cli/cli.py. This allows users to run launched runs asynchronously or synchronously and see their status.

Testing

How was this PR tested?

Checklist

  • Include reference to internal ticket "Fixes WB-NNNNN" and/or GitHub issue "Fixes #NNNN" (if applicable)
  • Ensure PR title compliance with the conventional commits standards

🤖 Generated by Copilot at 7cd714d

launch the run with run_async
Unleash the power of parallelism
Store the run in a run variable
Watch the status of your experiment

@github-actions github-actions bot added cc-fix and removed cc-fix labels Aug 15, 2023
wandb/cli/cli.py Outdated Show resolved Hide resolved
@KyleGoyette KyleGoyette marked this pull request as ready for review August 15, 2023 15:51
@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Merging #6078 (a6532e0) into main (63caf2d) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6078      +/-   ##
==========================================
- Coverage   78.09%   78.02%   -0.07%     
==========================================
  Files         380      380              
  Lines       44314    44317       +3     
==========================================
- Hits        34607    34579      -28     
- Misses       9655     9686      +31     
  Partials       52       52              
Flag Coverage Δ
unittest 81.56% <100.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
wandb/cli/cli.py 62.19% <100.00%> (+0.01%) ⬆️

... and 19 files with indirect coverage changes

@nickpenaranda
Copy link
Contributor

those are legitimate test failures: https://app.circleci.com/pipelines/github/wandb/wandb/25629/workflows/7bc633b3-1f63-43ec-bc0f-493bb87522f4/jobs/724360

it appears that in at least one case the return value of wandb_launch.run is a str.

@github-actions github-actions bot added cc-fix and removed cc-fix labels Aug 21, 2023
@nickpenaranda nickpenaranda requested a review from a team as a code owner August 22, 2023 17:35
Copy link
Contributor

@gtarpenning gtarpenning left a comment

Choose a reason for hiding this comment

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

lgtm, had to do the same thing when using the job_tracker object in a launch agent test. Specifically in test_agent.py with this line:
run.get_status.return_value.state = "failed"

@nickpenaranda nickpenaranda merged commit f8c94c8 into main Aug 22, 2023
75 checks passed
@nickpenaranda nickpenaranda deleted the launch/wandb-launch-command-should-exit-non-zero-if-launched-run-exits-non-zero branch August 22, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants