Retrain Final Pipeline¶
First, we'll initialize a client with our server credentials and store it in the variable dai
.
In [1]:
Copied!
import driverlessai
dai = driverlessai.Client(address='http://localhost:12345', username='py', password='py')
import driverlessai
dai = driverlessai.Client(address='http://localhost:12345', username='py', password='py')
We'll then load the new data we want to use to retrain the model.
In [14]:
Copied!
ds = dai.datasets.create('iris_new.csv', name='new_iris')
ds = dai.datasets.create('iris_new.csv', name='new_iris')
Complete 100% - [4/4] Computing column statistics
Then, we get the most recent version of an experiment with 'iris' in the name.
In [15]:
Copied!
ex = [ex for ex in dai.experiments.list() if 'iris' in ex.name][0]
ex = [ex for ex in dai.experiments.list() if 'iris' in ex.name][0]
Finally, we'll use the experiment's retrain()
method with final_pipeline_only=True
to retrain the model.
In [16]:
Copied!
ex.retrain(train_dataset=ds, final_pipeline_only=True)
ex.retrain(train_dataset=ds, final_pipeline_only=True)
Experiment launched at: http://localhost:12345/#experiment?key=a3e052ca-6003-11ea-919d-0242ac110002 Complete 100% - Status: Complete
Out[16]:
<class 'driverlessai.experiments.Model'> a3e052ca-6003-11ea-919d-0242ac110002