Skip to content

Commit

Permalink
support imports in relative values models
Browse files Browse the repository at this point in the history
  • Loading branch information
berekuk committed Jan 10, 2024
1 parent e53ef68 commit 38e5073
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/hub/src/relative-values/values/ModelEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
SqStringValue,
} from "@quri/squiggle-lang";

import { squiggleHubLinker } from "@/squiggle/components/linker";

import { cartesianProduct } from "../lib/utils";
import {
RelativeValue,
Expand Down Expand Up @@ -102,7 +104,10 @@ export class ModelEvaluator {
RelativeValuesModelRevision$data["forRelativeValues"]
>["cache"]
): Promise<result<ModelEvaluator, string>> {
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);
Expand Down

0 comments on commit 38e5073

Please sign in to comment.