-
Notifications
You must be signed in to change notification settings - Fork 169
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] Allow the configuration YAML file to configure any option supported by .dstack/profiles.yml
#943
Comments
When implementing this feature, we should also take Python API into account. Currently, we always pass
This is a weird interface. Resources are present only in I think we simplify both the Public API and the internal code significantly if we put all parameters into one model. We could reuse |
The first step is to add the optional type: task
profile:
instance_types: [p3.8xlarge]
regions: [eu-west-1]
spot_policy: auto
commands:
- ... There will be both RunSpec.profile and RunSpec.configuration.profile. The second will override parameters of the first on the server side – the HTTP API will have the same interface as the CLI/Python API. As a next step, we should also do a refactoring to fix Profile/Requirements issues described above. The suggestion is:
|
We should remove default values from Profile model introduced for pools (creation_policy, termination_policy, termination_idle_time). The default values should only be set by the server. Otherwise, run configuration profiles parameters will always be non-null and override |
@r4victor I somewhat don't like using the word
|
Agree. I like the top-level approach because users don't need to think about profiles when writing run configurations. What I didn't like about it is that our run configuration reference would become hard to read and think about due to lots of top-level parameters. Probably, we can mitigate this by putting profile parameters at the end, thus grouping them. As regards to implementation details, they mostly remain the same. We need to group common RunConfiguration and Profile parameters in some model (e.g. in ProfileParameters) and inherit it in RunConfigurations. JobConfigurator will merge RunConfiguration and Profile parameters and store them in JobSpec/Requirements. |
Currently, it's not possible to configure spot policy, retry policy, etc., via the configuration YAML file. These settings can only be configured in
.dstack/profiles.yml
. It would be a lot more convenient if the configuration YAML file allowed the configuration of any option supported by.dstack/profiles.yml
.The text was updated successfully, but these errors were encountered: