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] Task level config #3689

Merged
merged 24 commits into from
Jul 10, 2024
Merged

[Core] Task level config #3689

merged 24 commits into from
Jul 10, 2024

Conversation

Michaelvll
Copy link
Collaborator

@Michaelvll Michaelvll commented Jun 25, 2024

Allow task-level configuration.

Blocked by #3682

Tested (run the relevant ones):

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

@Michaelvll Michaelvll marked this pull request as draft June 25, 2024 18:33
@Michaelvll Michaelvll marked this pull request as ready for review July 2, 2024 18:08
Copy link
Collaborator

@cblmemo cblmemo 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 feature @Michaelvll ! Left some comments to discuss :)

sky/resources.py Outdated Show resolved Hide resolved
sky/skypilot_config.py Outdated Show resolved Hide resolved
resources_config = config.pop('resources', {})
if cluster_config_override is not None:
assert resources_config.get('_cluster_config_overrides') is None, (
'Cannot set _cluster_config_overrides in both resources and '
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we raise an error if we find user specified resources._cluster_config_overrides as this is not allowed (according to the comment in the schema)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We currently rely on the same API to check the YAML provided by the user and the YAML generated by SkyPilot internally. It may require some refactoring, and it may not be very urgent to do such check as we do not expose this field in our docs. : )

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good point! Lets keep the current one

sky/utils/schemas.py Outdated Show resolved Hide resolved
sky/utils/schemas.py Outdated Show resolved Hide resolved
@Michaelvll Michaelvll requested a review from cblmemo July 8, 2024 19:05
Copy link
Collaborator

@cblmemo cblmemo 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 the fix @Michaelvll ! LGTM.

@Michaelvll Michaelvll added this pull request to the merge queue Jul 10, 2024
Merged via the queue into master with commit 5e23f16 Jul 10, 2024
20 checks passed
@Michaelvll Michaelvll deleted the task_level_config branch July 10, 2024 18:26
Michaelvll added a commit that referenced this pull request Aug 23, 2024
* Add docker run options

* Add docs

* Add warning for docker run options in kubernetes

* Add experimental config

* fix

* rename vars

* type

* format

* wip

* rename and add tests

* Fixes and add tests

* format

* Assert for override configs specification

* format

* Add comments

* fix

* fix assertions

* fix assertions

* Fix test

* fix

* remove unsupported keys

* format
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