Layer is a declarative MLOps platform. It enables you to define your machine learning entities in a declarative manner. That's why we are going to use a 'YML' file to introduce our ML Model in a Layer project.
Layer discovers your ML Models within a reserved file called
model.yml. This file contains all directives and definitions about your ML Model. Let's see what's in this file now.
Version of the model definition file
Give your ML Model a unique name and a description. You will be referring to your model with this unique name whenever you want to use it. Also, it will be visible in the model catalog under this name.
This is the part you provide the training declarations of your ML Model. With the
training key, you can:
- Define where your ML Model's source code is
- Pass the environment config
- Tune your model
Give your ML Model training a name and a description. It will help you to monitor your training job.
You can pass the Python source code of your model with an
entrypoint key like here. This file should be in the same directory as this
You may need extra Python libraries to develop your ML Model. You can pass those required libraries with a
requirements.txt file so that Layer can install them to prepare the environment for the training job.
You might want to tune your parameters to find the best version of your model. You can define the tuning directives here and Layer will automatically execute the search. In the highlighted section on the right, we see a tuning declaration with the Bayesian Search algorithm. Visit Hyperparameter Tuning to learn more.