jlgleason / hts-constrained-embeddings

Replication material for "Forecasting Hierarchical Time Series with a Regularized Embedding Space," KDD MileTS 2020
MIT License
13 stars 4 forks source link

BucketInstanceSampler(stats.scale_histogram) does not run #3

Open RobbenRibery opened 2 years ago

RobbenRibery commented 2 years ago

Hi I am testing the nootebook, upon running:

samplers = get_bucket_samplers([train_data for (train_data, test_data) in test_datasets])

get the following error:

Traceback (most recent call last): File "/Users/ericliu/Library/Python/3.8/lib/python/site-packages/IPython/core/interactiveshell.py", line 3397, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "/var/folders/6t/cwpxfjt13rd3m9sgky7446mm0000gn/T/ipykernel_42741/2598019560.py", line 7, in <cell line: 7> samplers = get_bucket_samplers([train_data for (train_data, test_data) in test_datasets]) File "../src/data.py", line 459, in get_bucket_samplers return [BucketInstanceSampler(stats.scale_histogram) for stats in dataset_stats] File "../src/data.py", line 459, in return [BucketInstanceSampler(stats.scale_histogram) for stats in dataset_stats] TypeError: init() takes 1 positional argument but 2 were given

During handling of the above exception, another exception occurred:

jlgleason commented 2 years ago

Thanks for pointing this out. Since summer 2020, gluonts has been updated with breaking changes. I updated requirements.txt to use gluonts==0.5.2 and the Dockerfile to build from python3.8. This solves the error on my end - let me know if it works for you.