mirror of
https://github.com/clearml/clearml
synced 2025-02-12 15:45:25 +00:00
Merge branch 'allegroai:master' into master
This commit is contained in:
commit
cae0284d6c
@ -398,11 +398,12 @@ class EventTrainsWriter(object):
|
|||||||
with open(fd, "wb") as f:
|
with open(fd, "wb") as f:
|
||||||
f.write(imdata)
|
f.write(imdata)
|
||||||
return temp_file
|
return temp_file
|
||||||
|
image = np.asarray(im)
|
||||||
output.close()
|
output.close()
|
||||||
if height is not None and height > 0 and width is not None and width > 0:
|
if height is not None and height > 0 and width is not None and width > 0:
|
||||||
val = np.array(im).reshape((height, width, -1)).astype(np.uint8)
|
val = image.reshape((height, width, -1)).astype(np.uint8)
|
||||||
else:
|
else:
|
||||||
val = np.array(im).astype(np.uint8)
|
val = image.astype(np.uint8)
|
||||||
if val.ndim == 3 and val.shape[2] == 3:
|
if val.ndim == 3 and val.shape[2] == 3:
|
||||||
if self._visualization_mode == 'BGR':
|
if self._visualization_mode == 'BGR':
|
||||||
val = val[:, :, [2, 1, 0]]
|
val = val[:, :, [2, 1, 0]]
|
||||||
|
@ -1724,8 +1724,13 @@ class Task(_Task):
|
|||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
"""
|
"""
|
||||||
Closes the current Task and changes its status to completed.
|
Closes the current Task and changes its status to "Completed".
|
||||||
Enables you to manually shutdown the task.
|
Enables you to manually shutdown the task.
|
||||||
|
This method does not terminate the current Python process, in contrast to :meth:`Task.mark_completed`.
|
||||||
|
|
||||||
|
After having :meth:`Task.close`d a task, the respective object cannot be used anymore and
|
||||||
|
methods like :meth:`Task.connect` or :meth:`Task.connect_configuration` will throw a `ValueError`.
|
||||||
|
In order to obtain an object representing the task again, use methods like :meth:`Task.get_task`.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Only call :meth:`Task.close` if you are certain the Task is not needed.
|
Only call :meth:`Task.close` if you are certain the Task is not needed.
|
||||||
|
Loading…
Reference in New Issue
Block a user