Skip to content

Commit

Permalink
change cluster schmea on pipeline get (#450)
Browse files Browse the repository at this point in the history
* change cluster schmea on pipeline get

* add cluster get lean schema

* BPV

* update schema name
  • Loading branch information
plutopulp authored Apr 29, 2024
1 parent 5d6ebc3 commit 0e5baa4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions pipeline/cloud/schemas/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,13 @@
class PipelineClusterConfig(BaseModel):
id: str
node_pool: str


class PipelineClusterGetLean(BaseModel):
"""A lean representation of a cluster when returned from an API call"""

id: str
node_pool: str
# Optional for backward compatibility
name: str | None = None
provider: str | None = None
4 changes: 2 additions & 2 deletions pipeline/cloud/schemas/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from pipeline.cloud.compute_requirements import Accelerator
from pipeline.cloud.schemas import BaseModel, pagination
from pipeline.cloud.schemas.cluster import PipelineClusterConfig
from pipeline.cloud.schemas.cluster import PipelineClusterConfig, PipelineClusterGetLean
from pipeline.cloud.schemas.runs import RunIOType


Expand Down Expand Up @@ -130,7 +130,7 @@ class PipelineGet(Pipeline):

accelerators: t.Optional[t.List[Accelerator]]

cluster: PipelineClusterConfig | None = None
cluster: PipelineClusterGetLean | None = None

extras: t.Optional[dict]
#: The name of the scaling configuration
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pipeline-ai"
version = "2.1.6"
version = "2.1.7"
description = "Pipelines for machine learning workloads."
authors = [
"Paul Hetherington <ph@mystic.ai>",
Expand Down

0 comments on commit 0e5baa4

Please sign in to comment.