https://github.com/mlrun/ltm
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mlrun/ltm
- Owner: mlrun
- License: apache-2.0
- Created: 2021-11-17T13:18:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-24T12:04:28.000Z (almost 4 years ago)
- Last Synced: 2025-06-30T23:35:46.948Z (about 1 year ago)
- Language: Python
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# project-demo
demo the use with project object
see documentation in: https://docs.mlrun.org/en/latest/projects/overview.html
## Load & Run using MLRun SDK
When our project is already created and stored in a git archive we can quickly load and use it with the
`mlrun.load_project()` method. `load_project` will use a local context directory (with initialized `git`)
or clone a remote repo into the local dir and return a project object.
Users need to provide the path to the `context` dir and the git/zip/tar archive `url`, the `name` can be specified or taken
from the project object, they can also specify `secrets` (repo credentials), `init_git` flag (to initialize git in the context dir),
`clone` flag (indicating we must clone and ignore/remove local copy), and `user_project` flag (indicate the project name is unique to the user).
example, load a project from git and run the `main` workflow:
```python
project = mlrun.load_project("./", "git://github.com/mlrun/project-demo.git")
project.run("main", arguments={'data': data_url})
```
## Load & run using MLRun CLI
Loading a project from `git` into `./project` :
```
mlrun project -n myproj -u "git://github.com/mlrun/project-demo.git" ./project
```
Running a specific workflow (`main`) from the project stored in `.` (current dir):
```
mlrun project -r main -w ./project
```