Transforms
Save and load models with transform script, register them or publish them as an API through DS Lab module.
Using Transforms in Data Science Lab
The Transforms functionality in Data Science Lab (DSLab) allows users to save and load models using transform scripts, register models, or publish them as APIs. This feature enables reproducible data transformations, model deployment, and integration with Data Pipeline workflows.
Saving and Loading a Model with a Transform Script
Navigation path: Data Science Lab > Workspace > Notebook > Code Cell > Transforms
Steps to Save a Model
Open a Notebook in the desired project.
Add a Code cell and write or provide a transform script.
Example: The script may be split across multiple cells.
Run the code cell(s) to execute the transform functions.
Add a new Code cell to define the model.
Add another code cell and click the Save Model option for the defined model.
Specify the model name and model type in the auto-generated script in the next cell.
Run the code cell.
Open the Transforms tab.
The saved model will appear under the Transforms tab.
Steps to Load a Transform Model
Add a new Code cell.
Select the desired Transform model using the checkbox.
Run the code cell to load the model.
Add another Code cell and click the Transforms option.
The auto-generated script will appear.
Specify the training data in the code.
Run the code cell.
The transformed data will be displayed below the cell.
Registering a Transform Model
Navigation path: Workspace > Notebook > Transforms Tab > Ellipsis > Register
Open the Transforms tab for a currently opened notebook from the Workspace left-side panel.
Select a model listed under the Transforms.
Click the Ellipsis (three-dot) icon for the selected saved transform model.
Select Register from the context menu.
The Register Model dialog box will appear.
Click Yes to confirm.
A notification will confirm that the model has been registered.
The model will now appear in the Registered list of models.
Integration with Data Pipeline:
Open a pipeline workflow containing a DS Lab Model Runner component.
The registered transform model will be available under the Meta Information tab for use in pipelines.
Publishing a Transform Model as an API
Publishing a transform model as an API follows the same process as publishing any Data Science Model.
Refer to Register a Model as an API Service for detailed instructions.