Skip to content

Commit

Permalink
Allow creating a fine-tuning datasplit with a tag. Need this more now…
Browse files Browse the repository at this point in the history
… that we have evals. Cooool.
  • Loading branch information
scosman committed Mar 3, 2025
1 parent 8a95f4d commit 358bd88
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
let dataset_id = disabled_header
let new_dataset_split = disabled_header
let new_dataset_filter = disabled_header
let custom_dataset_tag = ""
let automatic_validation = disabled_header
let data_strategy: FinetuneDataStrategy = "final_only"
let finetune_custom_system_prompt = ""
Expand Down Expand Up @@ -285,6 +286,12 @@
try {
create_dataset_split_loading = true
create_dataset_split_error = null
let dataset_filter_id = new_dataset_filter
if (dataset_filter_id === "custom_tag") {
dataset_filter_id = "tag::" + custom_dataset_tag
}
const { data: create_dataset_split_response, error: post_error } =
await client.POST(
"/api/projects/{project_id}/tasks/{task_id}/dataset_splits",
Expand All @@ -298,7 +305,7 @@
body: {
// @ts-expect-error types are validated by the server
dataset_split_type: new_dataset_split,
filter_id: new_dataset_filter,
filter_id: dataset_filter_id,
},
},
)
Expand Down Expand Up @@ -798,9 +805,20 @@
"thinking_model_high_rated",
"Thinking + High Rated (4+ stars and thinking)",
],
["custom_tag", "Custom Dataset Tag (eg 'training_set_v2')"],
]}
bind:value={new_dataset_filter}
/>
{#if new_dataset_filter === "custom_tag"}
<FormElement
label="Custom Dataset Tag Filter"
description="The dataset split will only include examples with this tag."
inputType="input"
id="custom_dataset_tag"
bind:value={custom_dataset_tag}
/>
{/if}

<FormElement
label="Dataset Splits"
description="Select a splitting strategy for your dataset."
Expand Down

0 comments on commit 358bd88

Please sign in to comment.