pytorch-ts icon indicating copy to clipboard operation
pytorch-ts copied to clipboard

File not found: datasets/pts_m5/metadata.json

Open cowwoc opened this issue 4 years ago • 8 comments

Excuse me if this is a newbie question but when I try to run https://github.com/zalandoresearch/pytorch-ts/blob/master/examples/m5-tft.ipynb I am running into the following error:

Traceback (most recent call last):
  File "C:\Users\Gili\Documents\myproject\pytorch-ts-test.py", line 17, in <module>
    dataset = get_dataset("pts_m5", regenerate=False)
  File "C:\Users\Gili\Documents\myproject\python\lib\site-packages\gluonts\dataset\repository\datasets.py", line 232, in get_dataset
    return load_datasets(
  File "C:\Users\Gili\Documents\myproject\python\lib\site-packages\gluonts\dataset\common.py", line 491, in load_datasets
    meta = MetaData.parse_file(Path(metadata) / "metadata.json")
  File "pydantic\main.py", line 613, in pydantic.main.BaseModel.parse_file
  File "pydantic\parse.py", line 57, in pydantic.parse.load_file
  File "C:\Python39\lib\pathlib.py", line 1248, in read_bytes
    with self.open(mode='rb') as f:
  File "C:\Python39\lib\pathlib.py", line 1241, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "C:\Python39\lib\pathlib.py", line 1109, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Gili\\.mxnet\\gluon-ts\\datasets\\pts_m5\\metadata.json'

Looking at https://www.kaggle.com/c/m5-forecasting-accuracy/data this file does not seem to exist. What am I missing here?

cowwoc avatar Jul 14 '21 03:07 cowwoc

I have the same problem

slaweks17 avatar Jul 17 '21 11:07 slaweks17

So once the appropriate files from kaggle are in the folder then you need to:

 get_dataset("pts_m5",  regenerate=True)

to generate the files which can be used by the gluonts/pytorchts models. Once the files have been generated then make sure you set regenerate=False for the next time...

kashif avatar Jul 17 '21 12:07 kashif

Thank you. And, I would add, be patient, it takes at least half an hour.

slaweks17 avatar Jul 17 '21 12:07 slaweks17

@slaweks17 yes I might be doing something dumb... I would appreciate another pair of eyes to look through that code in https://github.com/zalandoresearch/pytorch-ts/blob/master/pts/dataset/repository/_m5.py

kashif avatar Jul 17 '21 12:07 kashif

OK, I will try.

slaweks17 avatar Jul 17 '21 12:07 slaweks17

oh @slaweks17 ! I didn't realise it is you Slawek. Let me know if you have any other questions etc. I am busy this next week with ICML but I will try to make some time perhaps in 2 weeks?

kashif avatar Jul 17 '21 13:07 kashif

Sure! I will also learn more about your project before then.

Have a nice weekend, Slawek

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Kashif @.> Sent: Saturday, July 17, 2021 6:00 AM To: @.> Cc: @.>; @.> Subject: Re: [zalandoresearch/pytorch-ts] File not found: datasets/pts_m5/metadata.json (#65)

oh @slaweks17https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fslaweks17&data=04%7C01%7C%7Cdc4bfaf6f10344fa5baf08d94922d721%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637621236246344261%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=TCrYnkKTISBHO47qACT0mQvxkakg0G12mH1HCxNUAgc%3D&reserved=0 ! I didn't realise it is you Slawek. Let me know if you have any other questions etc. I am busy this next week with ICML but I will try to make some time perhaps in 2 weeks?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fzalandoresearch%2Fpytorch-ts%2Fissues%2F65%23issuecomment-881895194&data=04%7C01%7C%7Cdc4bfaf6f10344fa5baf08d94922d721%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637621236246344261%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=rs3Hif5fhRXsF6TAwSzkM3tHYNXcwg2%2FnICmp399IkQ%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACEFLDJARDKL3AK36VC7NOTTYF5GNANCNFSM5AKSBOCA&data=04%7C01%7C%7Cdc4bfaf6f10344fa5baf08d94922d721%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637621236246354257%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=AY0XPf4d1UBcupPO0coMy4lWJEym1kZlXrET6ZTxOkc%3D&reserved=0.

slaweks17 avatar Jul 17 '21 13:07 slaweks17

Is it possible to add this step to the README?

cowwoc avatar Jul 17 '21 21:07 cowwoc