Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Reference JSON Files #2

Open
AdamIshay opened this issue Jul 2, 2022 · 1 comment
Open

Missing Reference JSON Files #2

AdamIshay opened this issue Jul 2, 2022 · 1 comment

Comments

@AdamIshay
Copy link

When trying to run train_mass_property.sh I get the following error:

Traceback (most recent call last):
  File "train_enc_clevrer.py", line 183, in <module>
    train_loader = build_dataloader(args, phase='train', sim_st_idx=args.train_st_idx, sim_ed_idx= args.train_ed_idx)
  File "train_enc_clevrer.py", line 218, in train
    for batch_idx, data_list in enumerate(train_loader):
  File "/home/XX/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 615, in __next__
    batch = self.collate_fn([self.dataset[i] for i in indices])
  File "/home/XX/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 615, in <listcomp>
    batch = self.collate_fn([self.dataset[i] for i in indices])
  File "/data/property_learner_predictor/clevrer/clevrer_dataset.py", line 160, in __getitem__
    return self.__getitem_render__(index)
  File "/data/property_learner_predictor/clevrer/clevrer_dataset.py", line 249, in __getitem_render__
    smp_num = random.randint(1, ref_num)
  File "/usr/lib/python3.6/random.py", line 221, in randint
    return self.randrange(a, b+1)
  File "/usr/lib/python3.6/random.py", line 199, in randrange
    raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (1,1, 0)

This happens when the dataloader is fetching from the dataset. It seems that when certain indices of the dataset are used, there are some files that do not exist. For example dataset[4052] does not work, since in v16_prp_reference/config there are no sim_06052_X.json files (4052 maps to 6052 file index). Also, files sim_XXXXX_X.json with index 3042-3999 are missing. I manually changed self.sim_list in clevrer/clevrer_dataset.py to a custom list of numbers and it seems to work fine for now.

@AdamIshay AdamIshay changed the title Missing Reference Video Files Missing Reference JSON Files Jul 2, 2022
@zfchenUnique
Copy link

Hi, sorry to be confusing! The updated repo for dynamic predictors should be at https://github.com/zfchenUnique/property_learner_predictor . This repo should be closed after submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants