Code Monkey home page Code Monkey logo

Comments (3)

aguschin avatar aguschin commented on September 28, 2024

Right now for load logic is the following: we have mlem.api.load function. Args include path, repo, rev.

  1. If you pass repo, then we suppose model is located in a repo.
  2. If you don't pass repo, then we suppose path is a fsspec-compatible path.

When this is decided, we first try to check whether we can just read the model by path, regardless of do we have .mlem folder somewhere or not. Path may be to a link file or model folder, it doesn't matter. If this fails, we assume that the path may be a link. We search for .mlem directory starting from the given path and going up, and when it is found, we treat all what's left as link name.

E.g., if we try to load("examples/dvc-pipeline/latest"), we will find examples/dvc-pipeline/.mlem folder and interpret latest as a link name. (We probably need to just interpret last part of URI as a model name, cause I don't think we want to support links having slash in names, like nn/latest).

Then we search .mlem directory for all objects with the same name (called latest in the example above) and raise an error if we found more or less than one. Otherwise we just load it.

@mike0sv, does this sound ok or something is missing?

from mlem.

aguschin avatar aguschin commented on September 28, 2024

In Alpha we've decided to address only "load" functionality.

"save to GH" functionality will be done in Beta in #18

from mlem.

aguschin avatar aguschin commented on September 28, 2024

As it works already, I close this ticket:

def test_model_loading_from_github(path):

from mlem.

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.