Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
score = trainedLr.score(input=XTest, targetOutput=yTest)

Storing and Retrieving the trained C3 Pipeline

...

Once a model is trained, you can store it as a persisted MLSerialPipeline Type. You can then retrieve this model later in a different script or different component of the C3 AI Suite. Let's look at storing:

Code Block
upsertedPipeline = trainedLr.upsert()

Now `upsertedPipeline` contains an 'id' value of the upserted MLSerialPipeline object. We can retrieve this object one of two ways:

Code Block
# Using the get function of the upsertedPipeline object
fetchedPipeline = upsertedPipeline.get()

pipeline_id = upsertedPipeline.id
# Using the MLSerialPipeline get function with the id
fetchedPipeline = c3.MLSerialPipeline.get(pipeline_id)

Now you can use `process` on new data with the fetched Pipeline!

Example Notebooks

Several jupyter notebooks exist which demonstrate the usage of these Pipeline types. We list directions to each here.

...