Open mapengsen opened 1 year ago
I got the same error when trying to finetune for regresssion
This is a common and well-known error for the Delaney dataset.. Most of the time it is solved by ensuring at train time, by ensuring that both input and labels are both floats. Ensure that at some point, you at least call X.float() and y.float() (it is usually the label). However, this can be an issue as a double is float64 and a normal float is float32. You have Double the precision of a normal float, hence the name.
Have you worked it out? I avoided this error by modifying the label to float32, but this resulted in another error: TypeError: Object of type float32 is not JSON serializable. The error location is in this code: best_trial = trainer.hyperparameter_search( backend="optuna", direction="minimize", hp_space=custom_hp_space_optuna, n_trials=FLAGS.n_trials, ) Help!
when i run the command : python chemberta/finetune/finetune.py --datasets=delaney
but get this error: RuntimeError: Found dtype Double but expected Float