Skip to content

Commit

Permalink
Merge pull request #2952 from quantified-uncertainty/rv-linker-fix
Browse files Browse the repository at this point in the history
Support imports in relative values models
  • Loading branch information
berekuk authored Jan 10, 2024
2 parents 9204b72 + 38e5073 commit 59c108c
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

1 comment on commit 59c108c

@vercel
Copy link

@vercel vercel bot commented on 59c108c Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.