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: Object of type Tensor is not JSON serializable when running train_transformer_style with takes_target as 1 #197
Comments
flow-forecast/flood_forecast/pytorch_training.py Lines 211 to 212 in 7927c51
this is updating the forward_params with Tensor objects in models.params when takes_target==1 This should be sent as copy of dictionary instead of dictionary itself flow-forecast/flood_forecast/pytorch_training.py Lines 90 to 98 in 7927c51
|
@isaacmg should I create a PR to should I change this ? |
#197 Sending copy of dictionary of forward_params, instead of dictionary itself won't send "target" key with Tensor in model.params and cause issue during saving model
This didn't seem to occur before with the full transformer though flow-forecast/tests/full_transformer.json Line 54 in 7927c51
|
If that is the sole issue one would think this test should fail too flow-forecast/.circleci/config.yml Line 251 in 7927c51
|
The value t only gets tensor object when takes_target argument is passed as True to torch_single_train |
The text was updated successfully, but these errors were encountered: