PyroSys: A dynamic framework for PYthon based computational pROtein SYStems biology.
There are two part of one AI model:
-
The
Model
which is the model itself that holds the parameters and basic inference logic. Once you have a model, you can use it to make predictions. -
The
Trainer
which is the part of how to get the model parameters from scratch. You DON'T need aTrainer
to just use themodel
.
-
The boundary between
Model
andTrainer
is wheather you need to build the model or to use the model. -
The core of PyroSys is to make ProtoTypes of the model. Complex inference method is not our focus.
-
The simplicity of PyroSys comes from separating engineering from science. You can focus on the science part only.
We use pl.LightiningModule
to build the model. There are two main parts in the Model
:
-
Module: The module is the basic building blocks of the model. Any module should be a
torch.nn.Module
and can be used in theModel
. The flexibiltiy of PyroSys comes from the how we classify differentModules
. -
Adapter: The adapter is the part that loads the model parameters based on Structure rather than parameter names. This allow us to use the same weights in different models while keeping the module-level composition.
We use pl.Trainer
or optionally Ray.Train
to train the model. For a seperation of build and use of the model, all losses and data sampling logics are implemented in the Trainer
.
-
Dataloader: The dataloader is the part that loads the data from the dataset with some predefined sampling logics. If you are using PyroSys without default datasets, you should preprocess the data by yourself.
-
Training: Standard training API with infrastructures.
-
Loss and metrics: We set them apart from both the
Model
andTrainer
because they are not related to use the model itself but are used inpl.LightiningModule
. This is a design choice to make the code more readable and maintainable. -
Advanced model analysis based on
mlflow
.