Comments (6)
Hi. It seems that there is no issue on your end. But as pointed out on #78 , this might be a compatibility error.
I will try to get this to work. If I can't get this to work, then I will try to send you the Project.toml i.e. exact versions of the setup I had (old list though), which worked.
from fairness.jl.
Hi @ashryaagr - ah I thought that it was related! If you don't have time right now, if you send me the Project.toml of the older version I could create a PR that adds compat entries to the Project.toml of Fairness. Then, as you go through trying to see what can be updated with CompatHelper, we could update the compat entries incrementally until things are largely up to date. Would that work/be helpful? Feel free to drop the toml here and I could pick up on things from there.
from fairness.jl.
Hi @TheCedarPrince - Here is the Project.toml . This is basically the same as that currently on repository.
My best guess for the reason for this issue is that MLJFlux has been updated and Fairness.jl is behind on updates (most probably only with compat updates). So, can you try by restricting MLJFLux to be of version v0.1.6. Pkg.add("[email protected]").
And once Fairness.jl gets back on track with the updates, it should be usable with the latest MLJ and MLJFlux version
Big thanks for taking the initiative to help with the compat entries!!
from fairness.jl.
Update - turns out that restricting to v1.6 leaves no satisfiable version of Flux to install due to some CUDA issue. It might also be because I opened my dual-booted linux system after a long time and lag on some update.
from fairness.jl.
### So here is a solution - not a standard solution, but a workaround for the time-being. You can download the repository and delete all the compat requirements from Fairness. Then you can install that package. Then you can install latest version of MLJ and MLJFlux. I have tried this on my system and this fix does work. I do not get any errors with @load NeuralNetworkClassifier
And in case you still run into an error like this (I did, but was able to solve this):
ERROR: LoadError: UndefVarError: @aggressive_constprop not defined
then, delete the packages in your ~/.julia/packages . Then re-install the downloaded repository, MLJ and MLJFlux. This solved this problem and everything ran smoothly.
The only issue is that LinProgWrapper and PenaltyAlgorithm give errors during tests on my system - perhaps because they require changes with these latest packages. But anyways these two algorithms are our own proposed algorithms. The other standard algorithms like reweighing, equalized odds and calibrated equalized odds work perfectly.
from fairness.jl.
Hey! Thanks for the temporary workaround! I can confirm I was able to get this working but instead of destroying everything in .julia/packages
, I was able to do the following:
- Clone Fairness.jl repository
- Delete compat entries from Project.toml
- Create temporary environment (I created one for myself by running
pkg> activate @DEV
) - Dev Fairness into the environment (i.e.
@DEV> dev /path/to/Fairness/.
) - Install MLJ and MLJFlux via
@DEV> add MLJ, MLJFlux
- Update MLJ and MLJFlux to latest versions and dependencies
@DEV> up
And that works.
I ran the test suite for Fairness and can confirm the only failing tests are for LinProgWrapper and PenaltyWrapper -- that may need to be its own issue perhaps.
I'll open a PR on compat entries that we can start experimenting with.
Thanks for all the help so far!
P.S. For completeness, here is the stack trace of the failed tests:
Testing Running tests...
Test Summary: | Pass Total Time
fair_tensor | 3 3 16.3s
Evaluating over 6 folds: 100%[=========================] Time: 0:00:06
Evaluating over 6 folds: 100%[=========================] Time: 0:00:00
Evaluating over 6 folds: 100%[=========================] Time: 0:00:00
Evaluating over 6 folds: 100%[=========================] Time: 0:00:00
Test Summary: | Pass Total Time
measures | 56 56 24.6s
Test Summary: | Pass Total Time
dataset_macros | 24 24 1m10.9s
[ Info: Training machine(ReweighingWrapper(grp = Sex, …), …).
[ Info: Training machine(ConstantClassifier(), …).
[ Info: Training machine(ReweighingSamplingWrapper(grp = Sex, …), …).
[ Info: Training machine(ConstantClassifier(), …).
[ Info: Training machine(EqOddsWrapper(grp = Sex, …), …).
[ Info: Training machine(ConstantClassifier(), …).
[ Info: Training machine(CalEqOddsWrapper(grp = Sex, …), …).
[ Info: Training machine(ConstantClassifier(), …).
[ Info: Training machine(LinProgWrapper(grp = Sex, …), …).
[ Info: Training machine(ConstantClassifier(), …).
┌ Error: Problem fitting the machine machine(LinProgWrapper(grp = Sex, …), …
).
└ @ MLJBase ~/.julia/packages/MLJBase/CtxrQ/src/machines.jl:627
[ Info: Running type checks...
[ Info: Type checks okay.
LinProgWrapper Postprocessing: Error During Test at /home/src/Projects/open_
source_contribs/Fairness.jl/test/algorithms/postprocessing.jl:26
Got exception outside of a @test
UndefVarError: add_NL_constraint not defined
Stacktrace:
[1] getproperty
@ ./Base.jl:31 [inlined]
[2] fit(model::LinProgWrapper{ConstantClassifier}, verbosity::Int64, X::
DataFrames.DataFrame, y::CategoricalArrays.CategoricalVector{Int64, UInt32,
Int64, CategoricalArrays.CategoricalValue{Int64, UInt32}, Union{}})
@ Fairness /home/src/Projects/open_source_contribs/Fairness.jl/src/alg
orithms/postprocessing/linprog.jl:106
[3] fit_only!(mach::Machine{LinProgWrapper{ConstantClassifier}, true}; r
ows::Nothing, verbosity::Int64, force::Bool)
@ MLJBase ~/.julia/packages/MLJBase/CtxrQ/src/machines.jl:625
[4] fit_only!
@ ~/.julia/packages/MLJBase/CtxrQ/src/machines.jl:572 [inlined]
[5] #fit!#61
@ ~/.julia/packages/MLJBase/CtxrQ/src/machines.jl:693 [inlined]
[6] fit!(mach::Machine{LinProgWrapper{ConstantClassifier}, true})
@ MLJBase ~/.julia/packages/MLJBase/CtxrQ/src/machines.jl:690
[7] macro expansion
@ /home/src/Projects/open_source_contribs/Fairness.jl/test/algorithms/
postprocessing.jl:31 [inlined]
[8] macro expansion
@ /home/src/Programs/Julia/julia-1.8.0/share/julia/stdlib/v1.8/Test/sr
c/Test.jl:1357 [inlined]
[9] top-level scope
@ /home/src/Projects/open_source_contribs/Fairness.jl/test/algorithms/
postprocessing.jl:27
[10] include(fname::String)
@ Base.MainInclude ./client.jl:476
[11] top-level scope
@ /home/src/Projects/open_source_contribs/Fairness.jl/test/algorithms/
algorithms.jl:2
[12] include(fname::String)
@ Base.MainInclude ./client.jl:476
[13] macro expansion
@ /home/src/Projects/open_source_contribs/Fairness.jl/test/runtests.jl
:19 [inlined]
[14] macro expansion
@ /home/src/Programs/Julia/julia-1.8.0/share/julia/stdlib/v1.8/Test/sr
c/Test.jl:1357 [inlined]
[15] top-level scope
@ /home/src/Projects/open_source_contribs/Fairness.jl/test/runtests.jl
:19
[16] include(fname::String)
@ Base.MainInclude ./client.jl:476
[17] top-level scope
@ none:6
[18] eval
@ ./boot.jl:368 [inlined]
[19] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:276
[20] _start()
@ Base ./client.jl:522
┌ Warning: The `@pipeline` macro is deprecated. For pipelines without target
transformations use pipe syntax, as in `ContinuousEncoder() |> Standardizer
() |> my_classifier`. For details, query the `Pipeline` docstring. To wrap a
supervised model in a target transformation, use `TransformedTargetModel`,
as in `TransformedTargetModel(my_regressor, target=Standardizer())`
│ caller = ip:0x0
└ @ Core :-1
[ Info: For silent loading, specify `verbosity=0`.
import MLJDecisionTreeInterface ✔
[ Info: For silent loading, specify `verbosity=0`.
import MLJDecisionTreeInterface ✔
[ Info: Training machine(PenaltyWrapper(grp = sex, …), …).
┌ Error: Problem fitting the machine machine(PenaltyWrapper(grp = sex, …), …
).
└ @ MLJBase ~/.julia/packages/MLJBase/CtxrQ/src/machines.jl:627
[ Info: Running type checks...
[ Info: Type checks okay.
PenaltyWrapper Inprocessing: Error During Test at /home/src/Projects/open_so
urce_contribs/Fairness.jl/test/algorithms/inprocessing.jl:1
Got exception outside of a @test
MethodError: no method matching Fairness.FairTensor(::Array{Any, 3}, ::Vec
tor{InlineStrings.String7})
Closest candidates are:
Fairness.FairTensor(::Any, ::Vector{String}) at /home/src/Projects/open_
source_contribs/Fairness.jl/src/fair_tensor.jl:17
Stacktrace:
[1] fit(model::PenaltyWrapper{Pipeline316}, verbosity::Int64, X::DataFra
mes.DataFrame, y::CategoricalArrays.CategoricalVector{Int64, UInt32, Int64,
CategoricalArrays.CategoricalValue{Int64, UInt32}, Union{}})
@ Fairness /home/src/Projects/open_source_contribs/Fairness.jl/src/alg
orithms/inprocessing/penalty.jl:64
[2] fit_only!(mach::Machine{PenaltyWrapper{Pipeline316}, true}; rows::No
thing, verbosity::Int64, force::Bool)
@ MLJBase ~/.julia/packages/MLJBase/CtxrQ/src/machines.jl:625
[3] fit_only!
@ ~/.julia/packages/MLJBase/CtxrQ/src/machines.jl:572 [inlined]
[4] #fit!#61
@ ~/.julia/packages/MLJBase/CtxrQ/src/machines.jl:693 [inlined]
[5] fit!(mach::Machine{PenaltyWrapper{Pipeline316}, true})
@ MLJBase ~/.julia/packages/MLJBase/CtxrQ/src/machines.jl:690
[6] macro expansion
@ /home/src/Projects/open_source_contribs/Fairness.jl/test/algorithms/
inprocessing.jl:6 [inlined]
[7] macro expansion
@ /home/src/Programs/Julia/julia-1.8.0/share/julia/stdlib/v1.8/Test/sr
c/Test.jl:1357 [inlined]
[8] top-level scope
@ /home/src/Projects/open_source_contribs/Fairness.jl/test/algorithms/
inprocessing.jl:2
[9] include(fname::String)
@ Base.MainInclude ./client.jl:476
[10] top-level scope
@ /home/src/Projects/open_source_contribs/Fairness.jl/test/algorithms/
algorithms.jl:3
[11] include(fname::String)
@ Base.MainInclude ./client.jl:476
[12] macro expansion
@ /home/src/Projects/open_source_contribs/Fairness.jl/test/runtests.jl
:19 [inlined]
[13] macro expansion
@ /home/src/Programs/Julia/julia-1.8.0/share/julia/stdlib/v1.8/Test/sr
c/Test.jl:1357 [inlined]
[14] top-level scope
@ /home/src/Projects/open_source_contribs/Fairness.jl/test/runtests.jl
:19
[15] include(fname::String)
@ Base.MainInclude ./client.jl:476
[16] top-level scope
@ none:6
[17] eval
@ ./boot.jl:368 [inlined]
[18] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:276
[19] _start()
@ Base ./client.jl:522
Test Summary: | Pass Error Total Time
algorithms | 8 2 10 33.2s
Reweighing | 2 2 4.8s
ReweighingSampling | 2 2 2.0s
Equalized Odds Postprocessing | 2 2 10.1s
Calibrated Equalized Odds Postprocessing | 2 2 2.1s
LinProgWrapper Postprocessing | 1 1 7.0s
PenaltyWrapper Inprocessing | 1 1 3.1s
ERROR: LoadError: Some tests did not pass: 8 passed, 0 failed, 2 errored, 0
broken.
in expression starting at /home/src/Projects/open_source_contribs/Fairness.j
l/test/runtests.jl:18
ERROR: Package Fairness errored during testing
from fairness.jl.
Related Issues (12)
- Implementing the MLJ measures API HOT 1
- Feedback on the wrappers
- How to contribute? HOT 9
- Issue to generate new releases HOT 14
- Dataset loading functions should not use macros HOT 1
- Rewrite implementation of FairTensor using AxisArrays? HOT 1
- Assumptions about target are too restrictive
- TagBot trigger issue HOT 4
- @load_adult changes current directory HOT 1
- Maintenance HOT 7
- Transition to StatisticalMeasures.jl HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fairness.jl.