mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +00:00
Add overwriting artifacts
This commit is contained in:
parent
1a5ed1132a
commit
9ffee412d7
@ -1,13 +1,12 @@
|
|||||||
import weakref
|
|
||||||
from copy import deepcopy
|
|
||||||
|
|
||||||
import numpy as np
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
from copy import deepcopy
|
||||||
|
from multiprocessing.pool import ThreadPool
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
from threading import Thread, Event
|
from threading import Thread, Event
|
||||||
from multiprocessing.pool import ThreadPool
|
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
from pathlib2 import Path
|
from pathlib2 import Path
|
||||||
|
|
||||||
from ..debugging.log import LoggerRoot
|
from ..debugging.log import LoggerRoot
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -76,6 +75,8 @@ class Artifacts(object):
|
|||||||
|
|
||||||
def register_artifact(self, name, artifact, metadata=None):
|
def register_artifact(self, name, artifact, metadata=None):
|
||||||
# currently we support pandas.DataFrame (which we will upload as csv.gz)
|
# currently we support pandas.DataFrame (which we will upload as csv.gz)
|
||||||
|
if name in self._artifacts_dict:
|
||||||
|
LoggerRoot.get_base_logger().info('Register artifact, overwriting existing artifact \"{}\"'.format(name))
|
||||||
self._artifacts_dict[name] = artifact
|
self._artifacts_dict[name] = artifact
|
||||||
if metadata:
|
if metadata:
|
||||||
self._artifacts_dict.add_metadata(name, metadata)
|
self._artifacts_dict.add_metadata(name, metadata)
|
||||||
|
Loading…
Reference in New Issue
Block a user