Dear DeepChem community,

I know this issue has been reported and discussed previously, but I don’t know if it has been resolved.

I am trying to tune hyperparameters for my regression and classification models.

While the code reported here:

https://github.com/deepchem/deepchem/blob/master/examples/tutorials/Advanced_Model_Training.ipynb

works well with my classification model for tuning hyperparameters, it fails to work for my regression model even after adjusting some of the parameters accordingly.

Is there are standard code for hyperparameter tuning I could use for regression models, like the one in the link above for classification?

Currently, my code for hyperparameter tuning for regression model looks like this:

params_dict = {

‘n_tasks’: [1],

‘layer_sizes’: [[500], [1000], [1000, 1000]],

‘dropouts’: [0.2, 0.5],

‘learning_rate’: [0.001, 0.0001]

}

optimizer = dc.hyper.GridHyperparamOpt(dc.models.GraphConvModel)

metric = dc.metrics.Metric(dc.metrics.pearson_r2_score)

best_model, best_hyperparams, all_results = optimizer.hyperparam_search(

params_dict, train_dataset, valid_dataset, metric, [normalizer])

And the error I get is:

ValueError: y has more than n_class unique elements.