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

Adding flat_params function #177

Merged
merged 2 commits into from
Aug 14, 2023
Merged

Adding flat_params function #177

merged 2 commits into from
Aug 14, 2023

Conversation

pebeto
Copy link
Member

@pebeto pebeto commented Aug 14, 2023

This PR solves the requested by @ablaom in #176. The previous implementation has been simplified by the use of the holy traits pattern.

src/MLJModelInterface.jl Outdated Show resolved Hide resolved
@pebeto pebeto changed the title Adding shallow_params and flat_params functions Adding flat_params function Aug 14, 2023
Copy link
Member

@ablaom ablaom left a comment

Choose a reason for hiding this comment

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

Thanks for this @pebeto .

I don't understand why you now return a dictionary, where previously we returned a named tuple (which is what the doc-string example returns). Is there a good reason for returning a dictionary? (Incidentally, you can also merge named tuples). Dictionaries have the disadvantage of losing the information about the order of the properties, which could be inconvenient, don't you think?

@codecov-commenter
Copy link

Codecov Report

Merging #177 (9cc45b8) into dev (60ea476) will increase coverage by 0.23%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##              dev     #177      +/-   ##
==========================================
+ Coverage   88.97%   89.21%   +0.23%     
==========================================
  Files           8        8              
  Lines         372      380       +8     
==========================================
+ Hits          331      339       +8     
  Misses         41       41              
Files Changed Coverage Δ
src/parameter_inspection.jl 100.00% <100.00%> (ø)

Copy link
Member

@ablaom ablaom left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@ablaom ablaom merged commit 0d06ec2 into JuliaAI:dev Aug 14, 2023
2 checks passed
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