@m4trix/evals 0.29.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -1731,6 +1731,8 @@ function processOneEvaluation(task, unit, totalEvaluations, publishEvent, persis
1731
1731
  output,
1732
1732
  meta: {
1733
1733
  triggerId: task.triggerId,
1734
+ triggerTimestamp: task.triggerTimestamp,
1735
+ triggeredAt: new Date(task.triggerTimestamp).toISOString(),
1734
1736
  runId: evaluatorRunId,
1735
1737
  datasetName: task.dataset.getDisplayLabel(),
1736
1738
  testCaseId: testCaseItem.id,
@@ -2211,6 +2213,7 @@ var EffectRunner = class {
2211
2213
  const globalConcurrency = Math.max(1, request.globalConcurrency);
2212
2214
  const sem = effect.Effect.unsafeMakeSemaphore(globalConcurrency);
2213
2215
  const triggerId = request.triggerId ?? `trg-${crypto.randomUUID()}`;
2216
+ const triggerTimestamp = request.triggerTimestamp ?? Date.now();
2214
2217
  const snapshots = [];
2215
2218
  for (const job of request.jobs) {
2216
2219
  snapshots.push(
@@ -2218,6 +2221,7 @@ var EffectRunner = class {
2218
2221
  datasetId: job.datasetId,
2219
2222
  evaluatorIds: job.evaluatorIds,
2220
2223
  triggerId,
2224
+ triggerTimestamp,
2221
2225
  maxConcurrency: this.config.maxConcurrency ?? 1,
2222
2226
  globalEvaluationSemaphore: sem,
2223
2227
  runConfigName: job.runConfigName,
@@ -2255,6 +2259,7 @@ var EffectRunner = class {
2255
2259
  datasetId: request.datasetId,
2256
2260
  evaluatorIds: request.evaluatorIds,
2257
2261
  triggerId: request.triggerId,
2262
+ triggerTimestamp: request.triggerTimestamp ?? Date.now(),
2258
2263
  maxConcurrency: request.concurrency ?? this.config.maxConcurrency ?? 1,
2259
2264
  repetitions: request.repetitions,
2260
2265
  runConfigName,
@@ -2282,6 +2287,7 @@ var EffectRunner = class {
2282
2287
  const totalEvaluations = selectedTestCases.length * repetitions;
2283
2288
  const runConfigTags = [...params.runConfigTags ?? []];
2284
2289
  const triggerId = params.triggerId ?? `trg-${crypto.randomUUID()}`;
2290
+ const triggerTimestamp = params.triggerTimestamp ?? Date.now();
2285
2291
  const runId = `run-${crypto.randomUUID()}`;
2286
2292
  const artifactPath = createArtifactPath(this.config.artifactDirectory, params.datasetId, runId);
2287
2293
  const snapshot = {
@@ -2325,6 +2331,7 @@ var EffectRunner = class {
2325
2331
  effect.Queue.offer(this.runQueue, {
2326
2332
  runId,
2327
2333
  triggerId,
2334
+ triggerTimestamp,
2328
2335
  datasetId: params.datasetId,
2329
2336
  dataset: dataset.dataset,
2330
2337
  evaluators: selectedEvaluators,
@@ -3103,7 +3110,8 @@ function EvalsCliApp({ data, args, runner }) {
3103
3110
  void runner.runDatasetWith({
3104
3111
  datasetId: selectedDataset.id,
3105
3112
  evaluatorIds: clampedState.selectedEvaluatorIds,
3106
- ...PROGRAMMATIC_RUN_CONFIG
3113
+ ...PROGRAMMATIC_RUN_CONFIG,
3114
+ triggerTimestamp: Date.now()
3107
3115
  }).then((snapshot) => {
3108
3116
  setRuntimeMessage(
3109
3117
  `Started ${snapshot.runId} on ${selectedDataset.name} (${snapshot.totalTestCases} cases).`