INNER CODE UNIT · Python
add_artifact
IDSIA/sacred · sacred/run.py:169
def add_artifact(self, filename, name=None, metadata=None, content_type=None):
"""Add a file as an artifact.
In Sacred terminology an artifact is a file produced by the experiment
run. In case of a MongoObserver that means storing the file in the
database.
See also :py:meth:`sacred.Experiment.add_artifact`.
Parameters
----------
filename : str
name of the file to be stored as artifact
name : str, optional
optionally set the name of the artifact.
Defaults to the filename.
metadata: dict
optionally attach metadata to the artifact.