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

[Core] Add SKYPILOT_NUM_NODES env var #3656

Merged
merged 10 commits into from
Jun 13, 2024
Merged

[Core] Add SKYPILOT_NUM_NODES env var #3656

merged 10 commits into from
Jun 13, 2024

Conversation

Michaelvll
Copy link
Collaborator

@Michaelvll Michaelvll commented Jun 11, 2024

Add SKYPILOT_NUM_NODES env var as shortcut for $(echo "$SKYPILOT_NODE_IPS" | wc -l)

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • sky launch --cloud gcp -c test-env --cpus 2 --num-nodes 4 'echo $SKYPILOT_NUM_NODES'
    • sky launch --cloud gcp -c test-env --cpus 2 --num-nodes 2 'echo $SKYPILOT_NUM_NODES'
    • pytest tests/test_smoke.py::test_inline_env tests/test_smoke.py::test_inline_env_file tests/test_smoke.py::test_managed_jobs_inline_env
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: conda deactivate; bash -i tests/backward_compatibility_tests.sh

Copy link
Member

@concretevitamin concretevitamin left a comment

Choose a reason for hiding this comment

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

Thanks @Michaelvll, a question.

docs/source/running-jobs/environment-variables.rst Outdated Show resolved Hide resolved
docs/source/running-jobs/environment-variables.rst Outdated Show resolved Hide resolved
docs/source/running-jobs/environment-variables.rst Outdated Show resolved Hide resolved
sky/backends/cloud_vm_ray_backend.py Outdated Show resolved Hide resolved
sky/backends/cloud_vm_ray_backend.py Outdated Show resolved Hide resolved
@Michaelvll Michaelvll merged commit d58f28d into master Jun 13, 2024
20 checks passed
@Michaelvll Michaelvll deleted the num-nodes-env branch June 13, 2024 00:32
Michaelvll added a commit that referenced this pull request Aug 23, 2024
* Add SKYPILOT_NUM_NODES env var

* Update docs/source/running-jobs/environment-variables.rst

Co-authored-by: Zongheng Yang <[email protected]>

* Update docs/source/running-jobs/environment-variables.rst

Co-authored-by: Zongheng Yang <[email protected]>

* Update docs/source/running-jobs/environment-variables.rst

Co-authored-by: Zongheng Yang <[email protected]>

* format

* add remove version

* add smoke test for num nodes

* fix test

---------

Co-authored-by: Zongheng Yang <[email protected]>
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.

2 participants