Giter Site home page Giter Site logo

Comments (10)

ablaom avatar ablaom commented on June 8, 2024 1

Thanks @sylvaticus for adding the wrapper. It's mostly good.

Main thing is that

mutable struct AutoEncoderMLJ <: MLJModelInterface.Deterministic

should be

mutable struct AutoEncoderMLJ <: MLJModelInterface.Unsupervised

Having "MLJ" in the name is unfortunate. Perhaps you put the interface in a submodule to prevent name conflict with AutoEncoder? If you do that, you need to need to amend the load path at https://github.com/sylvaticus/BetaML.jl/blob/38074a9207ba36bd3427bc31eef42f7b990d1ac8/src/Utils/Utils_MLJ.jl#L159

The doc string is great but not strictly compliant. There are examples for transformers (Unsupervised models) at the end of this page.

There's no need to implement predict for Unsupervised models.

Feel free to add the following interface test, but that's up to you:

import BetaML
using MLJTestInterface

@testset "generic mlj interface test" begin
    fails, summary = MLJTestInterface.test(
        [BetaML.Utils.AutoEncoderMLJ,],
        MLJTestInterface.make_regression()[1];
        mod=@__MODULE__,
        verbosity=0, # bump to debug
        throw=false, # set to true to debug
    )
    @test isempty(failures)
end

from mlj.jl.

ablaom avatar ablaom commented on June 8, 2024

FYI I have just updated the MLJ Model Registry which has automatically added this model - my mistake. I don't think that's a big deal, but do let me know as soon as you have fixed Deterministic -> Unsupervised so I can update the registry again.

from mlj.jl.

sylvaticus avatar sylvaticus commented on June 8, 2024

from mlj.jl.

sylvaticus avatar sylvaticus commented on June 8, 2024

I have fixed the Deterministic -> Unsupervised issue and changed its name to AutoEncoder by setting the MLJ in its own submodule BetaML.Bmlj.

MLJTestInterface.test passes, but I am still unsure about MLJModelInterface.metadata_pkg.. there (at the end of /src/BetaML.jl file) I use Bmlj.AutoEncoder, is it fine like that ?

from mlj.jl.

ablaom avatar ablaom commented on June 8, 2024

MLJTestInterface.test passes, but I am still unsure about MLJModelInterface.metadata_pkg.. there (at the end of /src/BetaML.jl file) I use Bmlj.AutoEncoder, is it fine like that ?

I'm not completely sure I understand the question, but I do see that the package-related metadata is getting defined for Bmlj.AutoEncoder:

julia> package_name(BetaML.Bmlj.AutoEncoder)
"BetaML"

Is that what you were worried about?

from mlj.jl.

sylvaticus avatar sylvaticus commented on June 8, 2024

Yes, is it fine like that?

from mlj.jl.

ablaom avatar ablaom commented on June 8, 2024

Yes. It looks good to me. The most important thing is that the load path is good and it is:

julia> load_path(BetaML.Bmlj.AutoEncoder)
"BetaML.Bmlj.AutoEncoder"

from mlj.jl.

ablaom avatar ablaom commented on June 8, 2024

Note to self: This issue is addressed on BetaML#master; waiting for next release (currently at 0.10.4).

from mlj.jl.

sylvaticus avatar sylvaticus commented on June 8, 2024

just done it. Released v0.11.0 with all MLJ interface models isolated in their own submodule. This allowed the MLJ model struct to share the same name with BetaML models and I have taken the occasion to uniform all the model names.. (so, unfortunately, big breaking release)..

from mlj.jl.

ablaom avatar ablaom commented on June 8, 2024

Congratulations on the refactor.

This is issue can be closed after:

from mlj.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.