-
Notifications
You must be signed in to change notification settings - Fork 69
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
TypeError: unhashable type: 'list' Raised when the batch_size is set #8
Comments
It seems the copy_batch() in pinns_module.py is accepting the last batch but a tuple, here I tried to figure this out by adding a judgement on the type of batch before proceeding the batch copy to self.static_batch. I am still trying to find the source of this issue by going through the LightningModule class. If you have any adivce on this to solve this issue intrinsically, that would be of great help! Here is my patch on the code may tentatively solve this issue, in pinn_module.py:
|
I've met the same issue those days and it really bothered me. I've searched a lot of content but I still cannot fix the problem. Thank for your contribution and it really help me a lot. |
I think the issue is the prediction step will return a pred as a list, but the copy_batch() method cannot process list. It is caused by the statement that if it is not val_stage, it will run copy_bath() instead of transfer_batch_to_device(). What I did is changing val_stage to True in predict_step and it seems to work fine to me. |
Hi, thanks for your efforts on this wonderful project! When I am setting the batch_size in the config.yaml. There is error like this. I have seen the same issue, and tried to set the
save_pred: true
in the config.yaml, but still the same error.The text was updated successfully, but these errors were encountered: