mirror of
https://github.com/clearml/clearml
synced 2025-02-12 07:35:08 +00:00
Add Task.runtime to API v2.13
This commit is contained in:
parent
9d108d855f
commit
84025a75b2
@ -1512,6 +1512,8 @@ class Task(NonStrictDataModel):
|
|||||||
:type hyperparams: dict
|
:type hyperparams: dict
|
||||||
:param configuration: Task configuration params
|
:param configuration: Task configuration params
|
||||||
:type configuration: dict
|
:type configuration: dict
|
||||||
|
:param runtime: Task runtime mapping
|
||||||
|
:type runtime: dict
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_schema = {
|
_schema = {
|
||||||
@ -1599,6 +1601,11 @@ class Task(NonStrictDataModel):
|
|||||||
"format": "date-time",
|
"format": "date-time",
|
||||||
"type": ["string", "null"],
|
"type": ["string", "null"],
|
||||||
},
|
},
|
||||||
|
"runtime": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Task runtime mapping",
|
||||||
|
"additionalProperties": True,
|
||||||
|
},
|
||||||
"script": {
|
"script": {
|
||||||
"description": "Script info",
|
"description": "Script info",
|
||||||
"oneOf": [{"$ref": "#/definitions/script"}, {"type": "null"}],
|
"oneOf": [{"$ref": "#/definitions/script"}, {"type": "null"}],
|
||||||
@ -1678,6 +1685,7 @@ class Task(NonStrictDataModel):
|
|||||||
last_metrics=None,
|
last_metrics=None,
|
||||||
hyperparams=None,
|
hyperparams=None,
|
||||||
configuration=None,
|
configuration=None,
|
||||||
|
runtime=None,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
super(Task, self).__init__(**kwargs)
|
super(Task, self).__init__(**kwargs)
|
||||||
@ -1713,6 +1721,7 @@ class Task(NonStrictDataModel):
|
|||||||
self.last_metrics = last_metrics
|
self.last_metrics = last_metrics
|
||||||
self.hyperparams = hyperparams
|
self.hyperparams = hyperparams
|
||||||
self.configuration = configuration
|
self.configuration = configuration
|
||||||
|
self.runtime = runtime
|
||||||
|
|
||||||
@schema_property("id")
|
@schema_property("id")
|
||||||
def id(self):
|
def id(self):
|
||||||
@ -2199,6 +2208,18 @@ class Task(NonStrictDataModel):
|
|||||||
|
|
||||||
self._property_configuration = value
|
self._property_configuration = value
|
||||||
|
|
||||||
|
@schema_property("runtime")
|
||||||
|
def runtime(self):
|
||||||
|
return self._property_runtime
|
||||||
|
|
||||||
|
@runtime.setter
|
||||||
|
def runtime(self, value):
|
||||||
|
if value is None:
|
||||||
|
self._property_runtime = None
|
||||||
|
return
|
||||||
|
self.assert_isinstance(value, "runtime", dict)
|
||||||
|
self._property_runtime = value
|
||||||
|
|
||||||
|
|
||||||
class TaskUrls(NonStrictDataModel):
|
class TaskUrls(NonStrictDataModel):
|
||||||
"""
|
"""
|
||||||
@ -5855,6 +5876,8 @@ class EditRequest(Request):
|
|||||||
:type models: TaskModels
|
:type models: TaskModels
|
||||||
:param container: Docker container parameters
|
:param container: Docker container parameters
|
||||||
:type container: dict
|
:type container: dict
|
||||||
|
:param runtime: Task runtime mapping
|
||||||
|
:type runtime: dict
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_service = "tasks"
|
_service = "tasks"
|
||||||
@ -6136,6 +6159,11 @@ class EditRequest(Request):
|
|||||||
"description": "Project ID of the project to which this task is assigned Must exist[ab]",
|
"description": "Project ID of the project to which this task is assigned Must exist[ab]",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
},
|
},
|
||||||
|
"runtime": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Task runtime mapping",
|
||||||
|
"additionalProperties": True,
|
||||||
|
},
|
||||||
"script": {"$ref": "#/definitions/script", "description": "Script info"},
|
"script": {"$ref": "#/definitions/script", "description": "Script info"},
|
||||||
"system_tags": {
|
"system_tags": {
|
||||||
"description": "System tags list. This field is reserved for system use, please don't use it.",
|
"description": "System tags list. This field is reserved for system use, please don't use it.",
|
||||||
@ -6175,6 +6203,7 @@ class EditRequest(Request):
|
|||||||
configuration=None,
|
configuration=None,
|
||||||
models=None,
|
models=None,
|
||||||
container=None,
|
container=None,
|
||||||
|
runtime=None,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
super(EditRequest, self).__init__(**kwargs)
|
super(EditRequest, self).__init__(**kwargs)
|
||||||
@ -6194,6 +6223,7 @@ class EditRequest(Request):
|
|||||||
self.configuration = configuration
|
self.configuration = configuration
|
||||||
self.models = models
|
self.models = models
|
||||||
self.container = container
|
self.container = container
|
||||||
|
self.runtime = runtime
|
||||||
|
|
||||||
@schema_property("task")
|
@schema_property("task")
|
||||||
def task(self):
|
def task(self):
|
||||||
@ -6443,6 +6473,18 @@ class EditRequest(Request):
|
|||||||
self.assert_isinstance(value, "container", dict)
|
self.assert_isinstance(value, "container", dict)
|
||||||
self._property_container = value
|
self._property_container = value
|
||||||
|
|
||||||
|
@schema_property("runtime")
|
||||||
|
def runtime(self):
|
||||||
|
return self._property_runtime
|
||||||
|
|
||||||
|
@runtime.setter
|
||||||
|
def runtime(self, value):
|
||||||
|
if value is None:
|
||||||
|
self._property_runtime = None
|
||||||
|
return
|
||||||
|
self.assert_isinstance(value, "runtime", dict)
|
||||||
|
self._property_runtime = value
|
||||||
|
|
||||||
|
|
||||||
class EditResponse(Response):
|
class EditResponse(Response):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user