What is the easiest way to deploy and use models

Hi, I’ve been having trouble deploying a very simple model trained in Jupyter Notebook for weeks.

It’s a model with just three input parameters, but I find it impossible to use the model once it’s trained.

Is there any step-by-step guide on how to deploy a model? I don’t want modeling objectives or anything; I just want to use the model in the simplest way possible.

Thanks,
Mateo

Hey!

Where are you trying to use the model?

If you want to avoid using modeling objectives, you can always directly publish your model as a function from the model page, and then that function can be brought into workshop.

Hi Tucker, thanks for your reply!

Is a model to predict prices based on X parameters, is quite simple.

I want to implement this in the middle of my workflow, after the pipeline builder is deployed and before creating the object type based on the dataset. (This dataset would be created with a new column representing the prices predicted by the model.)

Regards,
Mateo

Ah I see - sounds like you want to take the output of your pipeline builder job and use the model to run batch inference over that dataset?

In that case, there is some documentation about using models in python transforms here you may find helpful https://www.palantir.com/docs/foundry/integrate-models/transform-model-input#usage-notes

Hello tucker!

I was trying a lot of things related with this topic,

the last try I was following the house pricing example.

And I implemented it following the steps but with my own code, the example uses Modeling Objective and works fine, but doing the same with my own data I have a “Module (i.e. driver) ran out of memory”.

I don’t know why this happens and how to solve it.

Im confused - sounded like you wanted to avoid Modeling Objectives.

If you saw a Module ran out of memory error in Objectives, you can try applying a larger spark profile to your batch deployment.

If you saw that error in python transforms, you can again try applying a larger spark profile in the code.

Please note that no matter where you use your model (batch deployments or python transforms), the model will not do any batching of your inputs, instead attempting to one-shot the entire dataset. In python transforms, you can use the DistributedInferenceWrapper which will batch the input data for you, or you can manually write the code to batch your inputs when you call .predict.

Hello tucker,

The problem with the memory was solved using a larger spark profile

And I have been able to deploy the model using model objectives.

Thanks for your support,
Mateo