-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove external_class
as config parameter
#67
Conversation
…e` is a key the registry or a libpath.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
==========================================
- Coverage 38.33% 37.60% -0.74%
==========================================
Files 17 17
Lines 720 734 +14
==========================================
Hits 276 276
- Misses 444 458 +14 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -27,22 +27,22 @@ def get_or_load_class(config: dict, registry: dict) -> type: | |||
a `name` nor `external_cls` key was found in the config. | |||
""" | |||
|
|||
# User specifies one of the built in classes by name | |||
#! Once we have confidence in the config having default values, we can remove this check | |||
if "name" in config: | |||
class_name = config.get("name") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the new config stuff went in you will probably have to make this config[name]
to get it working again.
Removing
external_class
as a config parameter, and checking ifname
is a key the registry or a libpath.In the case of an externally defined model and config file, if the user specified the external_class as the model to use, we would instead default to the model defined in the
name
key of thefibad_default_config.toml
file. Clearly not what the user would expect.So for now, we allow
name
tobe either a key into the registry dictionary or a libpath string for an external model class.This isn't quite where I would like it. There are plenty of exceptions raised, but it would be nice to add some simple logging as well.