Time Series using V1

I can dump my stack trace here if needed, but I just want to make sure I’m not missing something that hasn’t been indexed by google yet.

I’m trying to use V1 of fastai on a dataset that has a time feature in it (web session data for an in-class assignment here). There seems to be no add_datepart any longer. Am I missing something? Is that taken care of inside Categorify or somewhere that I can’t find in the code?

Add_datepart is not implemented indeed. I only put in tabular the basic transforms (handling missing values, categorify things and normalize continuous variables) for now. A transform that add the dateparts would indeed be a fine addition so if you want to add it don’t hesitate to work on this!

Note that we ask that new contributions are added in the form of a notebook that we will refactor into the code in a second part (from contributing: Before implementing a non-trivial new feature, first create a notebook version of your new feature, like those in dev_nb. It should show step-by-step what your code is doing, and why, with the result of each step. Try to simplify the code as much as possible. When you’re happy with it, let us know on the forum (include a link to a gist with your notebook.))

Hey, @bhollan if you want to add the add_datepart feature, that would be great. But, if you would like to pass I can start on it. Please let me know.

@sgugger Also, just wanted to clarify, is it okay to create a separate branch in a PR and make changes in a notebook there? Or should I just create an independent gist and add new changes there and share it with you all?

I’ll take a stab at it and if it’s too embarrassing, somebody else can take it.

What we’re envisioning is more a notebook that would stand on its own, more like changing an existing one. In this case, it’s easy to add a tabular transform in a new notebook.

There’s nothing embarrassing about a first draft so don’t be afraid :wink: First, manage to do what you want, then refactor pieces you see appearing several times.
Then people can refactor it even more and you’ll probably learn tons of things by seeing how they can transform your code. I know I did these past months with Jeremy.

1 Like

That’s actually super encouraging, thanks!

1 Like

If you add a few tests in your notebook, then that’ll help us all ensure that our refactorings don’t break anything!