Skip to content
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

Support for parameters with CallableModel #157

Open
mcfarljm opened this issue Nov 23, 2022 · 0 comments
Open

Support for parameters with CallableModel #157

mcfarljm opened this issue Nov 23, 2022 · 0 comments

Comments

@mcfarljm
Copy link

Is the interface for CallableModel supposed to support parameter values? It doesn't appear that this is currently possible (it would need to be sub-classed for the user to define parameter_names (which is used to determine full_size), but then it doesn't propagate any kwargs back to Model.__init__ for specifying parameter values).

AFAICT, it's not possible to use parameters with CallableModel, but that contradicts some parts of the interface, e.g., compute_gradient, which implies parameters (currently CallableModel.compute_gradient always operates on a null (length-0) parameter vector; this even occurs in some of the test cases, e.g., test_callable_mean, which has a check_gradient call that operates on a null parameter vector).

Since implementing a callable model with parameters by subclassing Model is straightforward, it's unclear what the use case for the CallableModel class is, and it might be better to remove it to avoid confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant