Time Series Plugin

Options
cwcomiskey
cwcomiskey Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 4 ✭✭✭

Hello,

I want to replicate the work of the Time Series Plugin. Namely, I want to fit STLDecomposition models, save them, reuse the later in my flow.

I need help saving and retrieving the models: I don't know how to save the models as pickle binaries, and I don't know how/where to store/retrieve them. I tried (and failed) to find where/how this is done in the TS Plugin Recipe source code; close, but not quite. Can someone point me to the right page(s); and give me a running start?

Thanks,

Chris

Answers

  • StanG
    StanG Dataiker, Registered Posts: 52 Dataiker
    Options

    Hi,

    To understand how to save and load models from a Dataiku folder, you can have a look at the read_from_folder and write_from_folder methods of the plugin here: utils.py

    These methods are more generic than just what you want to do but that is a good starting point.

  • cwcomiskey
    cwcomiskey Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 4 ✭✭✭
    edited July 17
    Options

    Great, thanks!

    I'm having trouble saving STLForecast models as a pickle. I get this error:

    TypeError: no default __reduce__ due to non-trivial __cinit__

    However, the plugin obviously saves these same models. How does Dataiku get around this? Can you point me to the right spot, as you did with utils.py?

    Thanks!

  • StanG
    StanG Dataiker, Registered Posts: 52 Dataiker
    Options

    Hi again,

    What code env are you using ? Maybe it has different packages versions from the plugin requirements that make this fail. You can see these requirements in the Currently installed packages tab of the plugin code env.

    Also, can you share the code you used to train the model and save it ?

  • cwcomiskey
    cwcomiskey Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 4 ✭✭✭
    Options

    After your question, and a bit of digging: it was b/c of my code environment. It's working now. Thanks for your help!

Setup Info
    Tags
      Help me…