From 9cb0aac8926d1f20347ce9679b24f8467110bd5a Mon Sep 17 00:00:00 2001 From: Igor Davidyuk Date: Thu, 4 Jul 2024 13:44:28 +0300 Subject: [PATCH] job and model rest schema update (#459) 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 11ea065f..9dc23018 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 bd5300a8..edba7a2d 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?