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

Fix MLJ metadata declarations so that new docstrings get written to the MLJ model registry #180

Merged
merged 2 commits into from
Oct 27, 2022

Conversation

ablaom
Copy link
Contributor

@ablaom ablaom commented Oct 27, 2022

Currently:

julia> using MLJModels

julia> doc("EvoTreeClassifier")
  Multi-classification with softmax and cross-entropy loss.

This is also an issue for EvoLinear.jl and the fix required is likely the same.

Follow up required:

  • Update the MLJ model registry

@codecov-commenter
Copy link

codecov-commenter commented Oct 27, 2022

Codecov Report

Base: 49.86% // Head: 49.86% // No change to project coverage 👍

Coverage data is based on head (fd45084) compared to base (689a01e).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #180   +/-   ##
=======================================
  Coverage   49.86%   49.86%           
=======================================
  Files          17       17           
  Lines        1500     1500           
=======================================
  Hits          748      748           
  Misses        752      752           
Impacted Files Coverage Δ
src/MLJ.jl 87.23% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jeremiedb
Copy link
Member

Sorry about the naive question, but I'm not sure to understand what's the issue with the example provided:

julia> doc("EvoTreeClassifier")
  Multi-classification with softmax and cross-entropy loss.

What's the expected outcome?

@ablaom
Copy link
Contributor Author

ablaom commented Oct 27, 2022

You should get the full doc-string: the same as if you do "using EvoTrees.jl; @doc EvoTreeClassifier".

The MLJ model trait docstring (alias descs) used to be for a short summary string, which was not that useful, in retrospect. Now it is not to be overloaded but instead falls back to full docstring. More at JuliaAI/MLJ.jl#898 .

@@ -119,7 +119,6 @@ MMI.metadata_model(
target_scitype = AbstractVector{<:MMI.Continuous},
weights = false,
path = "EvoTrees.EvoTreeRegressor",
descr = EvoTreeRegressor_desc,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can remove the short descriptions in lines 97-101 as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Done.

@jeremiedb jeremiedb merged commit 22c0838 into Evovest:main Oct 27, 2022
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

Successfully merging this pull request may close these issues.

3 participants