The api.objects.Artifact
class¶
Generic Simvue artifact retrieval class
Methods¶
__init__(...)¶
Initialise an instance of generic artifact retriever.
Parameters
identifier | str | None |
= None |
identifier of artifact object to retrieve |
from_name(...)¶
Retrieve an artifact by name.
Parameters
run_id | str |
the identifier of the run to retrieve from. |
|
name | str |
the name of the artifact to retrieve. |
Returns
FileArtifact | ObjectArtifact | None
the artifact if found
from_run(...)¶
Return artifacts associated with a given run.
Parameters
run_id | str |
The ID of the run to retriece artifacts from |
|
category | Optional[Literal['input', 'output', 'code']] |
= None |
category of artifacts to return, if None, do not filterinput - this file is an input file.output - this file is created by the run.code - this file represents an executed script |
Yields
Iterator[typing.Generator[tuple[str, FileArtifact | ObjectArtifact], None, None]]
identifier for artifact the artifact itself as a class instance
Returns
typing.Generator[tuple[str, FileArtifact | ObjectArtifact], None, None]
The artifacts
Raises
ObjectNotFoundError
Raised if artifacts could not be found for that run
get(...)¶
Parameters
count | int | None |
= None |
limit the number of results, default of None returns all. |
offset | int | None |
= None |
start index for returned results, default of None starts at 0. |
sorting | list[simvue.api.objects.artifact.fetch.ArtifactSort] | None |
= None |
list of sorting definitions in the form {'column': str, 'descending': bool} |
Yields
tuple[str, FileArtifact | ObjectArtifact]
identifier for artifact the artifact itself as a class instance