-
Notifications
You must be signed in to change notification settings - Fork 0
rfc: 0003-hints-registry #5
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
Open
acfoltzer
wants to merge
2
commits into
main
Choose a base branch
from
0003-hints-registry
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Hint registry for OpenWDL | ||
|
|
||
| The `hints` section in WDL 1.2+ explicitly invites implementations to define and use hints in concert with other implementations (see the final bullet point in [Conventions and Best Practices](https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#conventions-and-best-practices): | ||
|
|
||
| > Users tend to look for similar behavior between different execution engines. It is strongly encouraged that implementers of execution engines agree on common names and accepted values for hints that describe common usage patterns. | ||
|
|
||
| This issue proposes a means for these hints to be centrally registered to facilitate this sharing, but with a lower bar for entry than additions to the set of [Reserved Hints](https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#reserved-task-hints). | ||
|
|
||
| The registry would be a table of hint names, accepted types, task/workflow scope, aliases, default values, short descriptions, and links to additional information. To slightly modify the documentation of the [HTTP Field Names Registry](https://github.com/protocol-registries/http-fields): | ||
|
|
||
| > Registration is intended to: | ||
| > | ||
| > 1. Avoid conflicting uses of a hint | ||
| > 2. Allow the documentation associated with a hint to be discovered | ||
| > 3. Offer guidance regarding a hint's definition during the process of registration | ||
|
|
||
| ## Initial registry contents | ||
|
|
||
| The initial registry would contain the reserved hints specified in the WDL specification. As CSV: | ||
|
|
||
| ```csv | ||
| Name,Accepted Types,Task,Workflow,Aliases,Default Value,Short Description,Reference | ||
| max_cpu,"Int, Float",Yes,No,maxCpu,,A hint to the execution engine that the task expects to use no more than the specified number of CPUs.,https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#max_cpu | ||
| disks,"String, Map[String, String]",Yes,No,,,A hint to the execution engine to mount disks with specific attributes.,https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#-disks | ||
| gpu,"Int, String",Yes,No,,,A hint to the execution engine to provision hardware accelerators with specific attributes.,https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#-gpu-and--fpga | ||
| fpga,"Int, String",Yes,No,,,A hint to the execution engine to provision hardware accelerators with specific attributes.,https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#-gpu-and--fpga | ||
| short_task,Boolean,Yes,No,,false,A hint to the execution engine about the expected duration of this task.,https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#short_task | ||
| localization_optional,Boolean,Yes,No,localizationOptional,false,A hint to the execution engine about whether the File inputs for this task need to be localized prior to executing the task.,https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#localization_optional | ||
| inputs,input,Yes,No,,,Provides input-specific hints. Each key must refer to a parameter defined in the task's input section.,https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#inputs | ||
| allow_nested_inputs,Boolean,No,Yes,allowNestedInputs,,Let the user set the value of some call inputs at runtime.,https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#allow_nested_inputs | ||
| ``` | ||
|
|
||
| CSV or another machine-readable format would be useful for implementors to add a baseline level of validation for registered hints even if they do not fully support them. GitHub doesn't render CSV nicely within Markdown, though, so here's a human-readable table version: | ||
|
|
||
| |Name |Accepted Types |Task|Workflow|Aliases |Default Value|Short Description |Reference | | ||
| |---------------------|---------------------------|----|--------|--------------------|-------------|----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------| | ||
| |max_cpu |Int, Float |Yes |No |maxCpu | |A hint to the execution engine that the task expects to use no more than the specified number of CPUs. |https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#max_cpu | | ||
| |disks |String, Map[String, String]|Yes |No | | |A hint to the execution engine to mount disks with specific attributes. |https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#-disks | | ||
| |gpu |Int, String |Yes |No | | |A hint to the execution engine to provision hardware accelerators with specific attributes. |https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#-gpu-and--fpga | | ||
| |fpga |Int, String |Yes |No | | |A hint to the execution engine to provision hardware accelerators with specific attributes. |https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#-gpu-and--fpga | | ||
| |short_task |Boolean |Yes |No | |false |A hint to the execution engine about the expected duration of this task. |https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#short_task | | ||
| |localization_optional|Boolean |Yes |No |localizationOptional|false |A hint to the execution engine about whether the File inputs for this task need to be localized prior to executing the task.|https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#localization_optional| | ||
| |inputs |input |Yes |No | | |Provides input-specific hints. Each key must refer to a parameter defined in the task's input section. |https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#inputs | | ||
| |allow_nested_inputs |Boolean |No |Yes |allowNestedInputs | |Let the user set the value of some call inputs at runtime. |https://github.com/openwdl/wdl/blob/wdl-1.2/SPEC.md#allow_nested_inputs | | ||
|
|
||
| ## Hints registry repository | ||
|
|
||
| A new GitHub repository should be created under the `openwdl` organization for the purpose of maintaining the hint registry (if the concept of a registry would be useful for other WDL constructs such as `meta` or `parameter_meta`, perhaps it shouldn't be limited to hints). The README and pull request template of this repository would spell out the process of registering a new hint and provide examples of extending the CSV. Once a PR adding a hint is accepted, that's largely the end of the process. It's now included by reference in the specification. | ||
|
|
||
| ## Extension of the spec | ||
|
|
||
| The registry repository should be described by and linked from the relevant portions of the WDL spec to formalize it as the shared source of truth for widely-recognized hints. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an interesting idea. There are currently a variety of competing documentation schemas for the meta sections. I'm skeptical of codifying documentation conventions in the spec, but a registry may be an ideal middle-ground. At the very least, keeping a centralized source of information for "these are all the conventions currently implemented by tools" would be helpful (and maybe lead to some type of consensus across environments?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! It's useful for folks to have a central reference for how these things are being used, even if it doesn't go all the way to specifying details or is ever intended to be implemented by other engines.