Skip to content

Commit

Permalink
Add JobRuntimeData docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
un-def committed Feb 5, 2025
1 parent 8b555f7 commit a6dcde2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/dstack/_internal/core/models/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,17 @@ def get_base_backend(self) -> BackendType:


class JobRuntimeData(CoreModel):
"""
Holds various information only available after the job is submitted, such as:
* offer (depends on the instance)
* volumes used by the job
* resource constraints for container (depend on the instance)
* port mapping (reported by the shim only after the container is started)
Some fields are mutable, for example, `ports` only available when the shim starts
the container.
"""

network_mode: NetworkMode
# GPU, CPU, memory resource shares. None means all available (no limit)
gpu: Optional[int] = None
Expand Down

0 comments on commit a6dcde2

Please sign in to comment.