gen_ai_hub.evaluations.models.artifact_source module¶
- class gen_ai_hub.evaluations.models.artifact_source.ArtifactSource(file_type: Literal['csv', 'json', 'jsonl'], artifact: str | Artifact, path: str | None = None)¶
Bases:
objectExtends the artifact object with the relative path user can provide inside to be used for EvaluationConfig Example Usage:
>>> ArtifactSource( artifact={ "id": "xyfz-rtyu-2456-ojns-yu6s", "name": "dataset-artifact", "url": "ai://default/eval_dataset" ... }, path= "rootfolder/data.csv, file_type="csv" ) >>> ArtifactSource( artifact="xyfz-rtyu-2456-ojns-yu6s", path="rootfolder/data.json, file_type="json" ) )
- __init__(file_type: Literal['csv', 'json', 'jsonl'], artifact: str | Artifact, path: str | None = None)¶
- Parameters:
artifact (Union[str,Artifact]) – Can just provide the artifact id as a string or the Artifact object of the AI_API_Client sdk.
path (Optional[str]) – Relative path within the artifact path provided and should point to a single file.
file_type (Literal["csv", "json", "jsonl"]) – One of the supported file_types