facebookresearch/beanmachine

SingleSiteRandomWalk's adaptation fails with "scalar" random variable

horizon-blue opened this issue · 0 comments

Issue Description

This issue was originally reported by @agunapal when working with PPL Bench in pytorch/benchmark#869. When running models with scalar random variable (i.e. variable.size() == torch.Size([])), the following error was thrown:

File ".../lib/python3.8/site-packages/beanmachine/ppl/inference/proposer/single_site_random_walk_proposer.py", line 30, in do_adaptation
    if world[self.node].shape[0] == 1:
IndexError: tuple index out of range

Expected Behavior

Well, it shouldn't fail :)

System Info

Please provide information about your setup

  • PyTorch Version: 1.11
  • Python version: 3.8