Skip to content

Commit eb7ecdd

Browse files
committed
change save_artifact type to eval
1 parent 608367d commit eb7ecdd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

scripts/examples/fake_evals.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def run_evaluation():
5858
saved_path_default = lab.save_artifact(
5959
df_default,
6060
name="eval_results_default.csv",
61-
type="evals"
61+
type="eval"
6262
)
6363
lab.log(f"✅ Saved evaluation results: {saved_path_default}")
6464
lab.update_progress(50)
@@ -90,7 +90,7 @@ def run_evaluation():
9090
saved_path_custom = lab.save_artifact(
9191
df_custom,
9292
name="eval_results_custom.csv",
93-
type="evals",
93+
type="eval",
9494
config={
9595
"evals": {
9696
"input": "question",
@@ -124,7 +124,7 @@ def run_evaluation():
124124
saved_path_multi = lab.save_artifact(
125125
df_multi,
126126
name="eval_results_multi_metric.csv",
127-
type="evals",
127+
type="eval",
128128
config={
129129
"evals": {
130130
"input": "input",

src/lab/lab_facade.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def save_artifact(
122122
123123
Args:
124124
source_path: Path to the file or directory to save, OR a pandas DataFrame
125-
when type="evals" or type="dataset"
125+
when type="eval" or type="dataset"
126126
name: Optional name for the artifact. If not provided, uses source basename
127127
or generates a default name for DataFrames. When type="dataset",
128128
this is used as the dataset_id. When type="model", this is used as the model name
@@ -133,7 +133,7 @@ def save_artifact(
133133
- If "model", saves to workspace models directory and creates Model Zoo metadata.
134134
- Otherwise saves to artifacts directory.
135135
config: Optional configuration dict.
136-
When type="evals", can contain column mappings under "evals" key, e.g.:
136+
When type="eval", can contain column mappings under "evals" key, e.g.:
137137
{"evals": {"input": "input_col", "output": "output_col",
138138
"expected_output": "expected_col", "score": "score_col"}}
139139
When type="dataset", can contain:
@@ -207,7 +207,7 @@ def save_artifact(
207207
return output_path
208208

209209
# Handle DataFrame input when type="evals"
210-
if type == "evals" and hasattr(source_path, "to_csv"):
210+
if type == "eval" and hasattr(source_path, "to_csv"):
211211
# Normalize input: convert Hugging Face datasets.Dataset to pandas DataFrame
212212
df = source_path
213213
try:

0 commit comments

Comments
 (0)