ApolloResearch / rib

Library for methods related to the Local Interaction Basis (LIB)
MIT License
3 stars 0 forks source link

Prevent assignment to all configs #240

Closed danbraunai-apollo closed 9 months ago

danbraunai-apollo commented 9 months ago

We want frozen=True on all of our configs. Without this, the user is allowed to assign values to configs. This could cause all kinds of chaos where we store the config at the end in the results file but it doesn't represent what actually happened.

I think we can just add it to the model_config ConfigDict attribute (as in rib.data.DatasetConfig).

nix-apollo commented 9 months ago

Note new_config = config.model_copy(update={"key":new_val}, deep=true) is an option for e.g. tests

danbraunai-apollo commented 9 months ago

Completed in #237