-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
@@ -4,7 +4,9 @@ using LearnBase | |||
using MLLabelUtils | |||
|
|||
using LearnBase: ObsDimension | |||
import LearnBase: nobs, getobs, getobs!, gettarget, gettargets, targets, datasubset, default_obsdim | |||
import StatsBase: nobs | |||
import LearnBase: getobs, getobs!, gettarget, gettargets, targets, datasubset, default_obsdim, DataView, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these unexported by LearnBase 0.4?
DataView, AbstractObsView, AbstractBatchView, DataIterator, AbstractDataIterator, ObsIterator, BatchIterator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK yes
julia> using LearnBase
julia> DataView
ERROR: UndefVarError: DataView not defined
julia> AbstractObsView
ERROR: UndefVarError: AbstractObsView not defined
julia> AbstractBatchView
ERROR: UndefVarError: AbstractBatchView not defined
julia> DataIterator
ERROR: UndefVarError: DataIterator not defined
julia> AbstractDataIterator
ERROR: UndefVarError: AbstractDataIterator not defined
julia> ObsIterator
ERROR: UndefVarError: ObsIterator not defined
julia> BatchIterator
ERROR: UndefVarError: BatchIterator not defined
julia> LearnBase.BatchIterator
LearnBase.BatchIterator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was quite a lot of unexporting in JuliaML/LearnBase.jl@v0.3.0...v0.4.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can export these in JuliaML/LearnBase.jl#44 if that is the preferred end result. Seems like a lot got lost in translation between 0.3 and 0.4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to merge as long as the test passes
But keep in mind that once JuliaML/LearnBase.jl#44 is merged, we will need to handle 0.5 compatibilities here, and that would be way more complex since the whole ObsDim trick is removed. |
Yes, I'm aware of that, thanks. But hopefully the interface will be simpler that, using dims the cleaner way. |
I need to be diligent about making sure everything still works, but on my local copy, I was able to replace all the |
It would be great if you shared the diff, I think some small "migration guide" would be helpful given the fact that multiple libraries will be affected |
Absolutely, I just need to do a little clean-up since it's a mess of commenting out parts and deleting parts right now. But I'll share something soon. |
Here is a PR that reflects the diff. I also included a summary of my experience. |
Hm, there are some problems with dependencies, most probably related to ReferenceTests and its image related functions for Julia 1.0, I have no idea how to fix it. Maybe restrict version of ReferenceTests? |
Yeah I am not surprised. I didn't commit Project.toml because I have local copies of LearnBase, MLLabelUtils, and MLDataPattern floating around. I ran into a bunch of issues trying to get those dependencies to work together without version issues or method errors once I deprecated |
Should be fixed after JuliaRegistries/General#23858 (Edit: fixed) There are some io changes in the nightly test, could you help to fix that as well? The reference tests could be relaxed using |
I see that in nightly, the string representation of type is different, julia> typeof(zeros(2,3))
Matrix{Float64} (alias for Array{Float64, 2}) instead of julia> typeof(zeros(2,3))
Array{Float64,2} this should be also handled by custom comparison function? |
Yes, for example, in MLDataPattern.jl/test/tst_datasubset.jl Line 50 in 2cf8d0e
+ strip_summary(content::String) = join(split(content, "\n")[2:end], "\n")
- @test_reference "references/DataSubset2.txt" @io2str showcompact(::IO, DataSubset(X))
+ @test_reference "references/DataSubset2.txt" strip_summary(@io2str(showcompact(::IO, DataSubset(X)))) Such an example can be found in https://github.com/JuliaTesting/ReferenceTests.jl/blob/c8104a1628295d9e2ce79f58a29a97f0c3dc26bf/test/runtests.jl#L58 |
I see, thanks. Done. |
lol the reference files in |
And what exactly? Because they are passing on Julia 1.0 and 1, right? |
@racinmat Thanks for updating the codes! |
Changes needed in order to have #45 working.
Locally it works, tried with MLLabelUtils fork JuliaML/MLLabelUtils.jl#40.
I hope it's correct, all tests are passing.