opentensor / validators

Repository for bittensor validators
https://www.bittensor.com/
MIT License
14 stars 9 forks source link

fix gating model tokenizer + fix wandb reward model tags #71

Closed p-ferreira closed 1 year ago

p-ferreira commented 1 year ago

The run started yesterday broke several times with the message:

ValueError: Unable to create tensor, you should probably activate truncation
and/or padding with 'padding=True' 'truncation=True' to have batched tensors
with the same length. Perhaps your features (`input_ids` in this case) have
excessive nesting (inputs type `list` where type `int` is expected).
During handling of the above exception, another exception occurred:

https://wandb.ai/opentensor-dev/openvalidators/runs/j1n1rbcl/logs?workspace=user-

The same error can be simulated by passing an input > 2048 (context window of gating model gpt-neo).

This PR proposes the fix to this problem by adding padding=True and setting the eos token as default pad_token on model initialization (required, otherwise we get another exception)

This PR also proposes a fix for the reward model tags in wandb, as they were being logged incorrectly.