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

Add some new missing fields #276

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ use patch releases for compatibility fixes instead.
### Added

- Added `preemptible` argument to `TaskSpec.new()`.
- Added `Workspace.max_workload_priority` field.
- Added `Job.preemptible` field.

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

Expand Down
1 change: 1 addition & 0 deletions beaker/data_model/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class Job(BaseModel):
host_networking: bool = False
port_mappings: Optional[Dict[str, int]] = None
result: Optional[ExecutionResult] = None
preemptible: Optional[bool] = None

@property
def display_name(self) -> str:
Expand Down
2 changes: 2 additions & 0 deletions beaker/data_model/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from .account import Account
from .base import BaseModel, BasePage, StrEnum
from .experiment_spec import Priority

__all__ = [
"WorkspaceSize",
Expand Down Expand Up @@ -38,6 +39,7 @@ class Workspace(BaseModel):
created: datetime
modified: datetime
archived: bool = False
max_workload_priority: Optional[Priority] = None


class WorkspaceRef(BaseModel):
Expand Down
Loading