I’m trying to do a hyper-parameter search using the huggingface Trainer and ray[tune].
I’m more specifically following this example from RAY.
However, when I try to use the trainer (after all of the code from the example is executed) to predict I get the following error:
(Pdb) trainer.predict(train_dataset) *** AttributeError: 'NoneType' object has no attribute 'forward'
Am I supposed to retrain the trainer after a hyper-parameter search?
Here is the exact steps I took for clarification:
- Downloaded example file i.e.
- Added a
import pdb; pdb.set_trace()on line 147 (after the last call in the function)
- Ran this with
python pbt_transformers.py --smoke-test
- Once the debugger started I entered
I apologize if the answer is somewhere but I looked at these examples (below) and didn’t see anything that is done after calling