Introduce lineapy.get_function()
#760
mingjerli
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are pleased to introduce
lineapy.get_function()
, a new LineaPy API for parameter refactoring. It extracts the code to create the list of targeted artifacts and packages the code as a python function. It also allows us to parameterize any literal assigned variables within the code. Furthermore, for any artifact calculation(not just targeted artifacts) in the code, we can swap the calculation part by loading the artifact value(any version) directly from the artifact store.Example Usage
Let's say we have a Jupyter notebook that trains a machine learning model from training data and makes a prediction on inference data like following
Now, if we want to retrain the model because we receive new training data. Instead of copy-paste the code to another notebook and manually changing the
training_data_path
variable, we can useAfter we train the model, now we want to make predictions on new data,
If for any reason, we believe the old model performs better and we want to use the old model to make a prediction, we can achieve it with following
Beta Was this translation helpful? Give feedback.
All reactions