Skip to content

Commit

Permalink
Add field TaskContext.preemptible (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh authored May 10, 2024
1 parent e095aaa commit f25a865
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ use patch releases for compatibility fixes instead.

## Unreleased

### Added

- Added new field `TaskContext.preemptible`.

## [v1.26.10](https://github.com/allenai/beaker-py/releases/tag/v1.26.10) - 2024-05-02

### Added
Expand Down
5 changes: 5 additions & 0 deletions beaker/data_model/experiment_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ class TaskContext(BaseModel, frozen=False):
Tasks with higher priority are placed ahead of tasks with lower priority in the queue.
"""

preemptible: Optional[bool] = None
"""
Whether or not a job is marked as preemptible.
"""

@field_validator("priority")
def _validate_priority(cls, v: str) -> str:
if v is not None and v not in set(Priority):
Expand Down

0 comments on commit f25a865

Please sign in to comment.