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

Allow Naive passing of Julia class_weight dictionary #64

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

tylerjthomas9
Copy link
Collaborator

@tylerjthomas9 tylerjthomas9 commented Jan 3, 2024

Ref: #63

I have also added Aqua.jl to the tests, and fixed some compt errors that it identified.

I introduced a function, _prepare_param, that handles preparing parameters being passed to the python constructor. Right now, it does nothing unless a Dictionary is passed. I tried to make it generic for future extensions to other types as needed.

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (530ce27) 94.49% compared to head (75f718a) 94.60%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #64      +/-   ##
==========================================
+ Coverage   94.49%   94.60%   +0.10%     
==========================================
  Files          14       14              
  Lines         309      315       +6     
==========================================
+ Hits          292      298       +6     
  Misses         17       17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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. Thanks for this valuable contribution, @tylerjthomas9 🙏🏾

Could you have a look at the 1.6 fails, please?

@tylerjthomas9
Copy link
Collaborator Author

tylerjthomas9 commented Jan 3, 2024

The 1.6 failures were due to Aqua.jl saying there is a method ambiguity in MLJModelInterface.jl. I have disabled checking them, for now. Something funky is going on with the nightly build. Do you think its worth investigating before merging?

Here is the 1.6 ambiguity from Aqua.jl:

1 ambiguities found
Ambiguity #1
in(x::MLJModelInterface.MLJType, itr::AbstractVector{T} where T) in MLJModelInterface at /Users/runner/.julia/packages/MLJModelInterface/ieFuy/src/equality.jl:158
in(x::T, r::AbstractRange{T}) where T in Base at range.jl:1088

Possible fix, define
  in(::T, ::AbstractRange{T}) where T<:MLJModelInterface.MLJType

@ablaom
Copy link
Member

ablaom commented Jan 3, 2024

I've flagged MLJModelInterface.jl issue found by Aqua. I'm happy not to dig into the nightly issue at this time. So go ahead and merge/tag when ready.

@tylerjthomas9
Copy link
Collaborator Author

I am going to hold off on tagging because I want to look into the issues with fitting classifiers with a single class here and with CatBoost.jl, then just push a release with both of them.

@tylerjthomas9 tylerjthomas9 merged commit cfff77e into JuliaAI:dev Jan 3, 2024
8 of 11 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.

None yet

2 participants