Docs/fit dataset error#3086
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3086 +/- ##
==========================================
- Coverage 96.29% 96.22% -0.07%
==========================================
Files 160 160
Lines 17227 17231 +4
==========================================
- Hits 16588 16581 -7
- Misses 639 650 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dennisbader
left a comment
There was a problem hiding this comment.
Thanks for the PR @jakubchlapek 🚀
I added some suggestions, mainly regarding the warning that would now also be raised whenever user calls fit() or predict() directly
| ``{"some_column": (64, 8)}``. | ||
| Note that ``TorchForecastingModels`` only support numeric data. Consider transforming/encoding your data | ||
| with `darts.dataprocessing.transformers.static_covariates_transformer.StaticCovariatesTransformer`. | ||
| When training via ``TorchForecastingModel.fit_from_dataset()``, categorical embeddings are resolved by |
There was a problem hiding this comment.
| When training via ``TorchForecastingModel.fit_from_dataset()``, categorical embeddings are resolved by | |
| When training via ``fit_from_dataset()``, categorical embeddings are resolved by |
| This function can be called several times to do some extra training. If ``epochs`` is specified, the model | ||
| will be trained for some (extra) ``epochs`` epochs. | ||
|
|
||
| Encoders configured via ``add_encoders`` at model creation are not applied here; ``train_dataset`` |
There was a problem hiding this comment.
this could be wrapped in a "note" section (similar to how we have it in other places) to make it more obvious
| self | ||
| Fitted model. | ||
| """ | ||
| if self.encoders is not None and self.encoders.encoding_available: |
There was a problem hiding this comment.
fit_from_dataset() is also called when calling fit() directly. So this warning will always show. We want it to only show if the user called it fit_from_dataset directly
| ``trainer``. For more information on PyTorch Lightning Trainers check out `this link | ||
| <https://pytorch-lightning.readthedocs.io/en/stable/common/trainer.html>`__. | ||
|
|
||
| Encoders configured via ``add_encoders`` at model creation are not applied here; ``dataset`` must already |
There was a problem hiding this comment.
could also be a note section
|
|
||
| self._verify_inference_dataset_type(dataset) | ||
|
|
||
| if self.encoders is not None and self.encoders.encoding_available: |
There was a problem hiding this comment.
same comment here this would also be called when calling predict() directly
…dict_from_dataset call via private param
Checklist before merging this PR:
Fixes #3006 .
Summary
Document and log a warning that add_encoders are ignored on TorchForecastingModel.fit_from_dataset / predict_from_dataset, and note TFT categorical_embedding_sizes keying by column index when using that path.