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

UX: drop image_id warning, and print a hint for a corner case. #2083

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

concretevitamin
Copy link
Member

User got this error

I 05-26 15:09:51 optimizer.py:1002] No resource satisfying AWS({'T4': 8}, image_id={'us-west-2': 'ami-1234'}) on AWS.
sky.exceptions.ResourcesUnavailableError: No launchable resource found for task train-1234. Region: us-west-2.
This means the catalog does not contain any instance types that satisfy this request.
To fix: relax or change the resource requirements.
Hint: 'sky show-gpus --all' to list available accelerators.
'sky check' to check the enabled clouds.

and mentioned

But the actual reason was because I did not configure ssh_proxy_command in us-west-2

This change adds a friendlier warning.

Repro:

# ~/.sky/config.yaml
aws:
  ssh_proxy_command:
    us-east-2: ...
# ~/test.yaml
resources:
  cloud: aws
  region: us-east-1
  image_id: ami-0d8c624d9d0f9af69
  # or:
  # image_id:
  #   us-east-1: ami-0d8c624d9d0f9af69
  #   us-west-1: ami-0257857e3e25bf4d8

We now show:

» sky launch ~/test.yaml
Task from YAML spec: /Users/zongheng/test.yaml
W 06-14 14:31:27 resources.py:486] Request AWS(m6i.2xlarge, image_id={'us-east-1': 'ami-0d8c624d9d0f9af69'}) cannot be satisfied by any feasible region. To fix, check that ssh_proxy_command's region keys include the regions to use.
I 06-14 14:31:27 optimizer.py:1009] No resource satisfying AWS(image_id={'us-east-1': 'ami-0d8c624d9d0f9af69'}) on AWS.
...

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below): above
  • 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: bash tests/backward_comaptibility_tests.sh

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Thanks for adding this @concretevitamin! LGTM.
Comment: Seems we now removed the warning for the image_id, but image_id can fail if the user brings some corner-case images, such as without rsync installed or having some incompatible package pre-installed. I am ok with removing the warning for now and wait for feedback from the users.

@concretevitamin concretevitamin merged commit 7a9aca8 into master Jun 14, 2023
@concretevitamin concretevitamin deleted the image-id-ux branch June 14, 2023 23:48
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