When I ran the PSICHIs program on BindingDB dataset, ValueError appeared, as shown below. It is known that I can pass it normally on the 2016 and 2020 data sets. Can you give me some tips about this error? Thank you very much.
root@a15fb6723046:/data/PSICHIC-main# CUDA_VISIBLE_DEVICES=2 python main.py --datafolder /data/PSICHIC-main11/dataset/BindingDB/protein -
-result_path result/BindingDB --regression_task True
Namespace(seed=1, device='cuda:0', config_path='config.json', datafolder='/data/PSICHIC-main11/dataset/BindingDB/protein', result_path='result/BindingDB', save_interpret=True, regression_task=True, classification_task=None, mclassification_task=None, epochs=30, evaluate_epoch=1, total_iters=None, evaluate_step=500, lrate=0.0001, eps=1e-08, betas=(0.9, 0.999), batch_size=16, sampling_col='', trained_model_path='', finetune_modules=None, nb_mode=False)
Loading Protein Graph data...
Loading Ligand Graph data...
Computing training data degrees for PNA
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 2140/2140 [00:58<00:00, 36.35it/s]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 2140/2140 [00:54<00:00, 39.24it/s]
Model loaded with number of parameters being: 5871321
start training model
training: 3%|███ | 2140/64200 [09:38<5:14:46, 3.29it/s/opt/conda/envs/grit/lib/python3.9/site-packages/numpy/lib/function_base.py:520: RuntimeWarning: Mean of empty slice.
avg = a.mean(axis, keepdims_kw)
/opt/conda/envs/grit/lib/python3.9/site-packages/numpy/core/_methods.py:129: RuntimeWarning: invalid value encountered in divide
ret = ret.dtype.type(ret / rcount)
/data/PSICHIC-main/utils/metrics.py:67: RuntimeWarning: Mean of empty slice.
rmse = sqrt(((y - f)2).mean(axis=0))
/data/PSICHIC-main/utils/metrics.py:71: RuntimeWarning: Mean of empty slice.
mae = (np.abs(y-f)).mean()
Traceback (most recent call last):
File "/data/PSICHIC-main/main.py", line 260, in
engine.train_epoch(train_loader, val_loader = valid_loader, test_loader = test_loader, evaluate_epoch = args.evaluate_epoch)
File "/data/PSICHIC-main/utils/trainer.py", line 166, in train_epoch
val_result = self.eval(val_loader)
File "/data/PSICHIC-main/utils/trainer.py", line 511, in eval
eval_reg_result = evaluate_reg(reg_truths, reg_preds)
File "/data/PSICHIC-main/utils/metrics.py", line 100, in evaluate_reg
'sd': float(get_sd(Y,F)),
File "/data/PSICHIC-main/utils/metrics.py", line 77, in get_sd
lr.fit(f,y)
File "/opt/conda/envs/grit/lib/python3.9/site-packages/sklearn/base.py", line 1473, in wrapper
return fit_method(estimator, *args, kwargs)
File "/opt/conda/envs/grit/lib/python3.9/site-packages/sklearn/linear_model/_base.py", line 609, in fit
X, y = self._validate_data(
File "/opt/conda/envs/grit/lib/python3.9/site-packages/sklearn/base.py", line 650, in _validate_data
X, y = check_X_y(X, y, check_params)
File "/opt/conda/envs/grit/lib/python3.9/site-packages/sklearn/utils/validation.py", line 1301, in check_X_y
X = check_array(
File "/opt/conda/envs/grit/lib/python3.9/site-packages/sklearn/utils/validation.py", line 1087, in check_array
raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 1 is required by LinearRegression.
training: 3%|███ | 2140/64200 [10:20<4:59:50, 3.45it/s]
When I ran the PSICHIs program on BindingDB dataset, ValueError appeared, as shown below. It is known that I can pass it normally on the 2016 and 2020 data sets. Can you give me some tips about this error? Thank you very much.
root@a15fb6723046:/data/PSICHIC-main# CUDA_VISIBLE_DEVICES=2 python main.py --datafolder /data/PSICHIC-main11/dataset/BindingDB/protein - -result_path result/BindingDB --regression_task True Namespace(seed=1, device='cuda:0', config_path='config.json', datafolder='/data/PSICHIC-main11/dataset/BindingDB/protein', result_path='result/BindingDB', save_interpret=True, regression_task=True, classification_task=None, mclassification_task=None, epochs=30, evaluate_epoch=1, total_iters=None, evaluate_step=500, lrate=0.0001, eps=1e-08, betas=(0.9, 0.999), batch_size=16, sampling_col='', trained_model_path='', finetune_modules=None, nb_mode=False) Loading Protein Graph data... Loading Ligand Graph data... Computing training data degrees for PNA 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 2140/2140 [00:58<00:00, 36.35it/s] 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 2140/2140 [00:54<00:00, 39.24it/s] Model loaded with number of parameters being: 5871321
start training model training: 3%|███ | 2140/64200 [09:38<5:14:46, 3.29it/s/opt/conda/envs/grit/lib/python3.9/site-packages/numpy/lib/function_base.py:520: RuntimeWarning: Mean of empty slice.
engine.train_epoch(train_loader, val_loader = valid_loader, test_loader = test_loader, evaluate_epoch = args.evaluate_epoch)
File "/data/PSICHIC-main/utils/trainer.py", line 166, in train_epoch
val_result = self.eval(val_loader)
File "/data/PSICHIC-main/utils/trainer.py", line 511, in eval
eval_reg_result = evaluate_reg(reg_truths, reg_preds)
File "/data/PSICHIC-main/utils/metrics.py", line 100, in evaluate_reg
'sd': float(get_sd(Y,F)),
File "/data/PSICHIC-main/utils/metrics.py", line 77, in get_sd
lr.fit(f,y)
File "/opt/conda/envs/grit/lib/python3.9/site-packages/sklearn/base.py", line 1473, in wrapper
return fit_method(estimator, *args, kwargs)
File "/opt/conda/envs/grit/lib/python3.9/site-packages/sklearn/linear_model/_base.py", line 609, in fit
X, y = self._validate_data(
File "/opt/conda/envs/grit/lib/python3.9/site-packages/sklearn/base.py", line 650, in _validate_data
X, y = check_X_y(X, y, check_params)
File "/opt/conda/envs/grit/lib/python3.9/site-packages/sklearn/utils/validation.py", line 1301, in check_X_y
X = check_array(
File "/opt/conda/envs/grit/lib/python3.9/site-packages/sklearn/utils/validation.py", line 1087, in check_array
raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 1 is required by LinearRegression.
training: 3%|███ | 2140/64200 [10:20<4:59:50, 3.45it/s]
avg = a.mean(axis, keepdims_kw) /opt/conda/envs/grit/lib/python3.9/site-packages/numpy/core/_methods.py:129: RuntimeWarning: invalid value encountered in divide ret = ret.dtype.type(ret / rcount) /data/PSICHIC-main/utils/metrics.py:67: RuntimeWarning: Mean of empty slice. rmse = sqrt(((y - f)2).mean(axis=0)) /data/PSICHIC-main/utils/metrics.py:71: RuntimeWarning: Mean of empty slice. mae = (np.abs(y-f)).mean() Traceback (most recent call last): File "/data/PSICHIC-main/main.py", line 260, in