Fix bug for Titan inference.
Cast config_file as a Path instead of a str as intended for from_json argument.
Command:
python bin/inference.py --model_path /scratch/shared/py4cast/logs/camp0/titan/halfunet/sezn_run_dev_41 --date 2023010300 --dataset titan --infer_steps 2
Stack trace:
Traceback (most recent call last):
File "/home/mrmn/seznecc/repository/py4cast/bin/inference.py", line 71, in
dm = PlDataModule(
File "", line 10, in init
File "/home/mrmn/seznecc/repository/py4cast/py4cast/lightning.py", line 63, in post_init
self.train_ds, self.val_ds, self.test_ds = get_datasets(
File "/home/mrmn/seznecc/repository/py4cast/py4cast/datasets/init__.py", line 95, in get_datasets
return dataset_kls.from_json(
File "/home/mrmn/seznecc/repository/py4cast/py4cast/datasets/titan/init__.py", line 699, in from_json
fname.stem,
AttributeError: 'str' object has no attribute 'stem
Fix bug for Titan inference. Cast config_file as a Path instead of a str as intended for from_json argument. Command: python bin/inference.py --model_path /scratch/shared/py4cast/logs/camp0/titan/halfunet/sezn_run_dev_41 --date 2023010300 --dataset titan --infer_steps 2
Stack trace: Traceback (most recent call last): File "/home/mrmn/seznecc/repository/py4cast/bin/inference.py", line 71, in
dm = PlDataModule(
File "", line 10, in init
File "/home/mrmn/seznecc/repository/py4cast/py4cast/lightning.py", line 63, in post_init
self.train_ds, self.val_ds, self.test_ds = get_datasets(
File "/home/mrmn/seznecc/repository/py4cast/py4cast/datasets/init__.py", line 95, in get_datasets
return dataset_kls.from_json(
File "/home/mrmn/seznecc/repository/py4cast/py4cast/datasets/titan/init__.py", line 699, in from_json
fname.stem,
AttributeError: 'str' object has no attribute 'stem