mirror of
https://github.com/clearml/clearml
synced 2025-03-03 18:52:12 +00:00
Fix artifact preview limit 64kb
This commit is contained in:
parent
0f65d6345d
commit
41cad87b77
@ -514,6 +514,12 @@ class Artifacts(object):
|
|||||||
else:
|
else:
|
||||||
raise ValueError("Artifact type {} not supported".format(type(artifact_object)))
|
raise ValueError("Artifact type {} not supported".format(type(artifact_object)))
|
||||||
|
|
||||||
|
# verify preview not out of scope:
|
||||||
|
if artifact_type_data.preview and len(artifact_type_data.preview) > (self.max_preview_size_bytes+1024):
|
||||||
|
artifact_type_data.preview = '# full preview too large to store, storing first {}kb\n{}'.format(
|
||||||
|
self.max_preview_size_bytes // 1024, artifact_type_data.preview[:self.max_preview_size_bytes]
|
||||||
|
)
|
||||||
|
|
||||||
# remove from existing list, if exists
|
# remove from existing list, if exists
|
||||||
for artifact in self._task_artifact_list:
|
for artifact in self._task_artifact_list:
|
||||||
if artifact.key == name:
|
if artifact.key == name:
|
||||||
|
Loading…
Reference in New Issue
Block a user