JDACS4C-IMPROVE / IMPROVE

Libraries and scripts for basic IMPROVE functionalities
0 stars 3 forks source link

unexpected keyword argument 'squared' in metrics.py #11

Closed wilke closed 2 months ago

wilke commented 2 months ago

Command:

singularity run \
 --nv \
 -B /homes/wilke/IMPROVE/HPO/experiments/HPO2404:/candle_data_dir \
  /homes/wilke/IMPROVE/Singularity/build//IGTD.sif train.sh 0 /candle_data_dir \
  --model_outdir /candle_data_dir/outputs/IGTD/train/gCSI \
  --train_ml_data_dir /candle_data_dir/outputs/IGTD/preprocess/gCSI \
  --test_ml_data_dir /candle_data_dir/outputs/IGTD/preprocess/gCSI \
  --val_ml_data_dir /candle_data_dir/outputs/IGTD/preprocess/gCSI \
  --epochs 1

2024-04-19 10:44:44.909852: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 30575 MB memory) -> physical GPU (device: 0, name: Tesla V100-SXM2-32GB, pci bus id: 0000:1a:00.0, compute capability: 7.0) Traceback (most recent call last): File "/usr/local/IGTD//IGTD_train_improve.py", line 243, in main() File "/usr/local/IGTD//IGTD_train_improve.py", line 238, in main val_scores = run(params) File "/usr/local/IGTD//IGTD_train_improve.py", line 223, in run outdir=params["model_outdir"], metrics=metrics_list File "/usr/local/IMPROVE/improve/framework.py", line 542, in compute_performace_scores scores = compute_metrics(y_true, y_pred, metrics) File "/usr/local/IMPROVE/improve/metrics.py", line 39, in compute_metrics scores[mtstr] = str2Class(mapstr)(y_true, y_pred) File "/usr/local/IMPROVE/improve/metrics.py", line 78, in rmse rmse = mean_squared_error(y_true, y_pred, squared=False) TypeError: mean_squared_error() got an unexpected keyword argument 'squared' Command exited with non-zero status 1

wilke commented 2 months ago

From the documentation:

Deprecated since version 1.4: squared is deprecated in 1.4 and will be removed in 1.6. Use root_mean_squared_error instead to calculate the root mean squared error.

@adpartin Either specify the version or upgrade and use root_mean_squared_error where appropriate

wilke commented 2 months ago

See PR #12