We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20faca0 commit dfd94caCopy full SHA for dfd94ca
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,
@@ -484,6 +483,10 @@ export async function runEval(
484
483
);
485
const totalDatapoints = hlDataset.datapoints!.length;
486
progressBar.start(totalDatapoints, 0);
+
487
+ // p-map is esm only since v5. Since we're targeting cjs, we need to
488
+ // import it dynamically, so it works for both cjs and esm consumers on node < 22.
489
+ const { default: pMap } = await import("p-map");
490
await pMap(
491
hlDataset.datapoints!,
492
async (datapoint) => {
0 commit comments