From 38e50734390e74629629b82b172f8f79b995f74d Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Wed, 10 Jan 2024 13:35:22 -0600 Subject: [PATCH] support imports in relative values models --- packages/hub/src/relative-values/values/ModelEvaluator.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/hub/src/relative-values/values/ModelEvaluator.ts b/packages/hub/src/relative-values/values/ModelEvaluator.ts index 96a6177a4e..b5035ac94b 100644 --- a/packages/hub/src/relative-values/values/ModelEvaluator.ts +++ b/packages/hub/src/relative-values/values/ModelEvaluator.ts @@ -7,6 +7,8 @@ import { SqStringValue, } from "@quri/squiggle-lang"; +import { squiggleHubLinker } from "@/squiggle/components/linker"; + import { cartesianProduct } from "../lib/utils"; import { RelativeValue, @@ -102,7 +104,10 @@ export class ModelEvaluator { RelativeValuesModelRevision$data["forRelativeValues"] >["cache"] ): Promise> { - const project = SqProject.create(); + // TODO - versioned SqProject + const project = SqProject.create({ + linker: squiggleHubLinker, + }); project.setSource("wrapper", "RelativeValues.wrap(fn)"); project.setContinues("wrapper", ["model"]); project.setSource("model", modelCode);