Open Alex-Wenner-FHR opened 9 months ago
It appears, that when using the same dataset spec with my subset, the other categories are still represented for whatever reason.
for iter in ds_val._data_entries.iterable.iterable:
print(iter)
[0 rows x 24 columns])
('cat2', Empty DataFrame
Columns: [...]
Index: []
[0 rows x 24 columns])
('cat3', Empty DataFrame
Columns: [...]
Index: []
This is less than ideal, but doing something like this allows a single item_id to be inferenced:
iterable: tuple = ds_val._data_entries.iterable.iterable
iterable = [t for t in iterable if len(t[1]) > 1]
ds_val._data_entries.iterable.iterable = tuple(iterable)
@lostella - has anyone from the team been able to lend an eye to this?
@Alex-Wenner-FHR predict
gets a dataset just like train
: if you want to only predict a specific item id, you should be able to construct a PandasDataset
with only a subset of the data, and pass that to predict
. Does that work?
It does not - if you check out the issue a few comments above I put a work around that I was able to implement to get it to work, but natively it does not!
I am using:
I have a
TemporalFusionTransformer
that was trained with aPandasDataset.from_long_dataframe(...)
. In this PandasDataset I have multipleitem_ids
This dataset includes several past_feat_dynamic_reals and a few static_features.
I want to predict on just one category. However when I do something like
I get the following error:
Does anyone have any ideas on how one item at a time can be inferenced instead of having to pass multiple items in a dataset at once? The shape of this subset is the exact same as the training shape along with dtypes. Thanks!
Originally posted by @Alex-Wenner-FHR in https://github.com/awslabs/gluonts/discussions/3126