Skip to content

Checking the runmode of .prior files #251

Discussion options

You must be logged in to vote

Hi Hannes,

Ah indeed, I had a folder called reinvent in my own code, causing a name overlap and the imports no longer worked properly.
After refactoring, loading the prior worked.

prior = torch.load(io.BytesIO(uploaded_prior.read()), map_location="cpu", weights_only=False)
run_mode = prior.get("model_type")

Gives the run mode the prior was trained on, allowing the verification that the user selects the correct prior for the correct mode.

Thanks!

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@christophhillisch
Comment options

Answer selected by christophhillisch
@halx
Comment options

halx Jun 30, 2025
Maintainer

@christophhillisch
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants