JuliaAI / MLJModels.jl

Home of the MLJ model registry and tools for model queries and mode code loading
MIT License
79 stars 27 forks source link

Fix warnings #512

Closed juliohm closed 1 year ago

juliohm commented 1 year ago

There is a list of warnings in our test suite coming from this package:

┌ MLJModels [d491faf4-2d78-11e9-2867-c94bc002c0b7]
│  ┌ Warning: 
│  │ Regarding MLJModels.ConstantRegressor: `metadata_model` should not be called with the keyword argument `descr`
│  │ or `docstring`. Implementers of the MLJ model interface should instead create an
│  │ MLJ-compliant docstring in the usual way.  See
│  │ https://alan-turing-institute.github.io/MLJ.jl/dev/adding_models_for_general_use/#Document-strings
│  │ for details.
│  │ 
│  │   caller = top-level scope at Constant.jl:107
│  └ @ Core ~/.julia/packages/MLJModels/UM8fF/src/builtins/Constant.jl:107
│  ┌ Warning: 
│  │ Regarding MLJModels.DeterministicConstantRegressor: `metadata_model` should not be called with the keyword argument `descr`
│  │ or `docstring`. Implementers of the MLJ model interface should instead create an
│  │ MLJ-compliant docstring in the usual way.  See
│  │ https://alan-turing-institute.github.io/MLJ.jl/dev/adding_models_for_general_use/#Document-strings
│  │ for details.
│  │ 
│  │   caller = top-level scope at Constant.jl:114
│  └ @ Core ~/.julia/packages/MLJModels/UM8fF/src/builtins/Constant.jl:114
│  ┌ Warning: 
│  │ Regarding MLJModels.ConstantClassifier: `metadata_model` should not be called with the keyword argument `descr`
│  │ or `docstring`. Implementers of the MLJ model interface should instead create an
│  │ MLJ-compliant docstring in the usual way.  See
│  │ https://alan-turing-institute.github.io/MLJ.jl/dev/adding_models_for_general_use/#Document-strings
│  │ for details.
│  │ 
│  │   caller = top-level scope at Constant.jl:121
│  └ @ Core ~/.julia/packages/MLJModels/UM8fF/src/builtins/Constant.jl:121
│  ┌ Warning: 
│  │ Regarding MLJModels.DeterministicConstantClassifier: `metadata_model` should not be called with the keyword argument `descr`
│  │ or `docstring`. Implementers of the MLJ model interface should instead create an
│  │ MLJ-compliant docstring in the usual way.  See
│  │ https://alan-turing-institute.github.io/MLJ.jl/dev/adding_models_for_general_use/#Document-strings
│  │ for details.
│  │ 
│  │   caller = top-level scope at Constant.jl:128
│  └ @ Core ~/.julia/packages/MLJModels/UM8fF/src/builtins/Constant.jl:128
└  
     Testing Running tests...
┌ Warning: `Zygote.@nograd myfunc` is deprecated, use `ChainRulesCore.@non_differentiable myfunc(::Any...)` instead.

or maybe from BetaML.jl which is the actual implementation we are using of the MLJ interface.

cc: @ablaom @OkonSamuel @sylvaticus

ablaom commented 1 year ago

@juliohm Thanks for reporting.

The culprits are the "descr" declarations appearing here, which can simply be deleted. Detailed docstrings are already implemented.

I dunno about the Zygote warning.

juliohm commented 1 year ago

Thank you @ablaom, looking forward to seeing these warnings fixed.