Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(js): add dataset version to evaluate response #1408

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion js/src/evaluation/_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ export class _ExperimentManager {
const project = await this._getProject(firstExample);
await this._printExperimentStart();
this._metadata["num_repetitions"] = this._numRepetitions;
this._metadata["dataset_version"] = await this._getDatasetVersion();
return new _ExperimentManager({
examples,
experiment: project,
Expand Down Expand Up @@ -869,7 +870,6 @@ export class _ExperimentManager {
throw new Error("Experiment not yet started.");
}
const projectMetadata = await this._getExperimentMetadata();
projectMetadata["dataset_version"] = await this._getDatasetVersion();
projectMetadata["dataset_splits"] = await this._getDatasetSplits();
// Update revision_id if not already set
if (!projectMetadata["revision_id"]) {
Expand Down Expand Up @@ -903,6 +903,10 @@ class ExperimentResults implements AsyncIterableIterator<ExperimentResultRow> {
return this.manager.experimentName;
}

get datasetVersion(): string | undefined {
return this.manager._metadata?.dataset_version;
}

[Symbol.asyncIterator](): AsyncIterableIterator<ExperimentResultRow> {
return this;
}
Expand Down