SebastianGer / WildfireSpreadTS

MIT License
18 stars 4 forks source link

train.py: error: Configuration check failed #4

Open ry-zakari opened 2 months ago

ry-zakari commented 2 months ago

Hello,

Good work you have done. I am trying to repleacate your results and compare with my model but i am getting some errors: SEE BELOW

this is when i am trying to run : python src/train.py --config=cfgs/unet/res18_monotemporal.yaml --trainer=cfgs/trainer_single_gpu.yaml --data=cfgs/data_monotemporal_full_features.yaml --seed_everything=0 --trainer.max_epochs=200 --do_test=True --data.data_dir D:/Wildfire_Risk/WildfireSpreadTS/Converted

train.py: error: Parser key "model": Problem with given class_path 'models.SMPModel':

SebastianGer commented 2 months ago

Hello!

this is when i am trying to run : python src/train.py --config=cfgs/unet/res18_monotemporal.yaml --trainer=cfgs/trainer_single_gpu.yaml --data=cfgs/data_monotemporal_full_features.yaml --seed_everything=0 --trainer.max_epochs=200 --do_test=True --data.data_dir D:/Wildfire_Risk/WildfireSpreadTS/Converted

train.py: error: Parser key "model": Problem with given class_path 'models.SMPModel': - 'Configuration check failed :: No action for destination key "loss_function" to check its value.'

When I'm running the same thing, I don't get any error. Have you made some modifications to the code? It sounds like you're setting model.loss_function, but the given models.SMPModel does not take that as an argument. What should happen is that SMPModel takes it as an argument and passes it to BaseModel's init function. In SMPModel.py, have you maybe removed the following lines from the init function's arguments?

*args: Any, **kwargs: Any

ry-zakari commented 2 months ago

I have not made any modification. also i did not delete *args: Any, **kwargs: Any

ruzcko commented 2 weeks ago

I am having the same problem, also the deterministic value in the .yaml configuration was set to 'warn', it was having errors so I changed to 'true'. It was then working until I encountered an error similar to the issue above.

SebastianGer commented 2 weeks ago

I am having the same problem

Could you maybe post the packages in your environment and their respective versions, together with the command you ran that resulted in an error? I can only imagine that it's a version conflict if we're all using the same code, but on my end it hasn't come up when I set up a fresh environment. If two people are already experiencing it, we should be able to somehow reproduce and then debug it.

also the deterministic value in the .yaml configuration was set to 'warn', it was having errors so I changed to 'true'. It was then working until I encountered an error similar to the issue above.

"warn" tries to set everything to deterministic when possible and prints a warning if something is not deterministic, as opposed to raising an exception that prevents the program from continuing. The problem is that sometimes very common operations don't have deterministic backward passes, e.g. bilinear interpolation (unless that has changed by now). So if you set it to "true", and you backpropagate through a bilinear interpolation operation, you'll just get an error and the program ends. That's why I set it to "warn", to get as much determinism where possible.