davidavdav / GaussianMixtures.jl

Large scale Gaussian Mixture Models
Other
95 stars 36 forks source link

fixing logging api and supporting Pluto #96

Closed PavanChaggar closed 2 years ago

PavanChaggar commented 2 years ago

When using GaussianMixtures.jl in Pluto, one receives the following error:

gmm
type PlutoLogger has no field min_level
getproperty(::Main.PlutoRunner.PlutoLogger, ::Symbol)@Base.jl:42
var"#GMMk#11"(::Symbol, ::Int64, ::Int64, ::Int64, ::typeof(GaussianMixtures.GMMk), ::Int64, ::Matrix{Float64})@train.jl:103
#GMM#9@train.jl:37[inlined]
GMM@train.jl:32[inlined]
top-level scope@[Local: 1](http://localhost:1234/edit?id=eab1dbc0-9e53-11ec-1b37-75a82665b36b#)[inlined]

This is the same issue documented here in Pluto.jl and addressed #90 in GaussianMixtures.jl.

The issue seems to be in src/train.jl where .min_level is used, which is part of an internal api. The fix is the same as here, which switches out .min_level for the corresponding standard interface, `Logging.min_enabled_level().

I dont think this should change anything regarding tests and all test are passing on my local machine.

Let me know if you'd like anything else added.

davidavdav commented 2 years ago

Thanks for the fix!