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

feat(client): support swcli runtime run command #3082

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

tianweidut
Copy link
Member

@tianweidut tianweidut commented Dec 14, 2023

Description

swcli runtime activate + run command + deactivate three commands --> swcli runtime run

❯ swcli runtime run --help
Usage: swcli runtime run [OPTIONS] URI

  Run a command in the Starwhale Runtime environment.

  For an existed Starwhale runtime, the command will restore and activate the
  runtime automatically.

  Positional arguments:

          URI: Starwhale Runtime URI in the standalone instance
          CMD: Executable command name, with additional arguments if needed.

  Examples:

          # run some python code in the starwhale runtime
          swcli runtime run pytorch python -c "import torch;print(torch.__version__)"

          # run python script in the starwhale runtime with verbose mode
          swcli -vvv runtime run --cwd example/helloworld helloworld python3 dataset.py

          # use the interactive Python shell
          swcli runtime run pytorch --live-stream ipython3

Options:
  --cwd TEXT     Working directory
  --live-stream  Do not capture stdout/stderr, when the is an interactive cmd,
                 like ipython, the option should be enabled
  --help         Show this message and exit.

asciicast

Modules

  • Client

Checklist

  • run code format and lint check
  • add unit test
  • add necessary doc

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (0273514) 82.69% compared to head (0270bc7) 91.85%.

Files Patch % Lines
client/starwhale/utils/process.py 90.90% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3082      +/-   ##
============================================
+ Coverage     82.69%   91.85%   +9.16%     
============================================
  Files           571      135     -436     
  Lines         31789    15933   -15856     
  Branches       1873        0    -1873     
============================================
- Hits          26287    14635   -11652     
+ Misses         4681     1298    -3383     
+ Partials        821        0     -821     
Flag Coverage Δ
console ?
controller ?
standalone 91.85% <93.93%> (+0.02%) ⬆️
unittests 91.85% <93.93%> (+0.28%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@goldenxinxing goldenxinxing left a comment

Choose a reason for hiding this comment

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

LGTM

@goldenxinxing goldenxinxing merged commit 7169713 into star-whale:main Dec 19, 2023
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants