We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5fce6f4 + dfd94ca commit 4ca50caCopy full SHA for 4ca50ca
1 file changed
src/eval_utils/run.ts
@@ -10,7 +10,6 @@
10
import cliProgress from "cli-progress";
11
import { Humanloop, HumanloopClient } from "index";
12
import _ from "lodash";
13
-import pMap from "p-map";
14
15
import {
16
BooleanEvaluatorStatsResponse,
@@ -488,6 +487,10 @@ export async function runEval(
488
487
);
489
const totalDatapoints = hlDataset.datapoints!.length;
490
progressBar.start(totalDatapoints, 0);
+
491
+ // p-map is esm only since v5. Since we're targeting cjs, we need to
492
+ // import it dynamically, so it works for both cjs and esm consumers on node < 22.
493
+ const { default: pMap } = await import("p-map");
494
await pMap(
495
hlDataset.datapoints!,
496
async (datapoint) => {
0 commit comments