Closed OAGr closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
quri-hub | ✅ Ready (Inspect) | Visit Preview | Apr 11, 2024 8:15pm |
Latest commit: 91cfca60347cb0be1dcebbbdfed290b92cc050d3
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
This PR does a few things:
buildRecentModelRevision
into amain.ts
and aworker.ts
. This way, when it crashes, or takes too long, we can easily cancel it, and return an error.lastRevisionWithBuild
param on Model, which returns the last revision that also had a build. This is useful for getting the most recent build runSecond time or similar, for the model. (Another option here is to just get thelastBuild
for the Model, if that's preferable. That could be a bit faster, as there might be one less query.)lastRevisionWithBuild
, withrunSeconds
, to help setautorunmode
for the playground, in cases where it's not already set. For now, we just set it tofalse
whenever the build took 5s+. (Note that this doesn't capture cases where the build ran out of memory - we could do this later).squiggleLinker
that gets squiggle models/snippets in therunSquiggle.ts
query, in both GraphQL and REST API. This means that now, people can call imports directly in therunSquiggle
prompts. These still have limitations though - they use caching, they don't allow forsampleCount
to be set, they don't allow you to choose which modelRevision of a model you want to run.buildRecentModelRevision
now runs a loop, that runs every 0.5s, to process the build queue.Closes https://github.com/quantified-uncertainty/squiggle/issues/3162
I wasn't very sure about some of the thread code in the
worker
. I expect it's likely we'll change it later, so I'm not too worried.On my computer, this script seemed to hit memory limits before the browser version did. I spent some time trying to improve this, but didn't get far.