From 41930852c45c274e0b99f0f1a3c017a8da8418ed Mon Sep 17 00:00:00 2001 From: Igor Davidyuk Date: Thu, 4 Jul 2024 11:53:30 +0200 Subject: [PATCH] job and model rest schema update Signed-off-by: Igor Davidyuk --- geti_sdk/data_models/job.py | 1 + geti_sdk/data_models/model.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/geti_sdk/data_models/job.py b/geti_sdk/data_models/job.py index 11ea065f5..9dc230181 100644 --- a/geti_sdk/data_models/job.py +++ b/geti_sdk/data_models/job.py @@ -207,6 +207,7 @@ class JobCancellationInfo: :var cancel_time: Time at which the Job was cancelled """ + cancellable: bool = True is_cancelled: bool = False user_uid: Optional[str] = None cancel_time: Optional[str] = attr.field(converter=str_to_datetime, default=None) diff --git a/geti_sdk/data_models/model.py b/geti_sdk/data_models/model.py index bd5300a85..edba7a2d9 100644 --- a/geti_sdk/data_models/model.py +++ b/geti_sdk/data_models/model.py @@ -229,8 +229,11 @@ class Model(BaseModel): architecture: str = attr.field(kw_only=True) score_up_to_date: bool = attr.field(kw_only=True) - optimization_capabilities: OptimizationCapabilities = attr.field(kw_only=True) optimized_models: List[OptimizedModel] = attr.field(kw_only=True) + # Removed in Geti 2.2 + optimization_capabilities: Optional[OptimizationCapabilities] = attr.field( + default=None, kw_only=True + ) labels: Optional[List[Label]] = None version: Optional[int] = attr.field(default=None, kw_only=True) # 'version' is deprecated in v1.1 -- IS IT?