-
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
Need handling for models with zero hyperparameters #22
Comments
@ablaom I just identified this problem in our code. The way we are identifying and returning leaf values is not correct. This issue is coming from MLJModelInterface. isnotaleaf(::Any) = false
isnotaleaf(m::Model) = length(propertynames(m)) > 0
flat_params(m, ::Val{false}; prefix="") = NamedTuple{(Symbol(prefix),), Tuple{Any}}((m,)) When we pass the |
@pebeto Thanks for the diagnosis. I've made the PR referenced above to give |
@pebeto That PR has been merged. How should we proceed? |
@ablaom, must we throw an error if the model contains zero parameters? Now we are logging the model without issues. |
I wouldn't throw an error if it is working as expected. |
ConstantClassifier
is a model with no hyperparameters. If I changeConstantClassifer
below toDecisionTreeClassifier
, for example, then no error is thrown.The text was updated successfully, but these errors were encountered: