简体   繁体   中英

What's the recommended way to organize code with MLRun?

When using MLRun, what is the recommended way to structure the code? Is there a certain file directory structure or naming convention required?

The recommended way to organize code in MLRun is via projects . They are essentially a logical abstraction that groups metadata, Git repo, source code, build information, pipelines, data/model artifacts, secrets, and more. Most often, users will organize their code as one Git repo per project

The project object will compile down to a project.yaml file that can be stored in version control and shared with others. The file directory organization within the repo itself does not matter as the project.yaml file will map to the correct file locations and know how to retrieve the required code

Once everything is in the project, you can execute automated pipelines, often via a CI/CD system, via the Python SDK with a command like project.run("train", arguments={"epochs" : 50}) or the equivalent CLI command mlrun project --run train --arguments epochs=50

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM