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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

randomwalks.py doesn't work on v0.3 or current main #106

Closed
dpaleka opened this issue Nov 21, 2022 · 1 comment
Closed

randomwalks.py doesn't work on v0.3 or current main #106

dpaleka opened this issue Nov 21, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@dpaleka
Copy link

dpaleka commented Nov 21, 2022

馃悰 Describe the bug

On both v0.3 and https://github.com/CarperAI/trlx/commit/ff0d0776ce9189c7e0ebc954dd14bbca1136a450, following the instructions from README.md and running

wandb disable && python examples/randomwalks.py

produces the following error:

Traceback (most recent call last):
  File "/home/dpaleka/code/trlx/examples/randomwalks.py", line 103, in <module>
    trlx.train(
  File "/home/dpaleka/code/trlx/trlx/trlx.py", line 95, in train
    model.learn()
  File "/home/dpaleka/code/trlx/trlx/model/accelerate_base_model.py", line 240, in learn
    results = self.evaluate()
  File "/home/dpaleka/code/trlx/trlx/model/accelerate_base_model.py", line 160, in evaluate
    samples = self.generate(prompts)
  File "/home/dpaleka/code/trlx/trlx/model/accelerate_base_model.py", line 133, in generate
    return self.accelerator.unwrap_model(self.model).generate(
  File "/home/dpaleka/code/trlx/trlx/model/nn/ilql_models.py", line 306, in generate
    logits[torch.where(logit_mask[input_ids[:, -1].squeeze()])] = -np.inf
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)

Which trlX version are you using?

trlx==0.3

Additional system and package information

No response

@dpaleka dpaleka added the bug Something isn't working label Nov 21, 2022
@LouisCastricato
Copy link
Contributor

Resolved #105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants