openclimatefix / uk-pvnet-app

Application for running PVNet in production
MIT License
1 stars 4 forks source link

Current app does not run #111

Closed peterdudfield closed 3 months ago

peterdudfield commented 3 months ago

Describe the bug

A clear and concise description of what the bug is.

Screenshot 2024-07-29 at 14 18 46

Screenshot 2024-07-29 at 14 18 40

This happens in pvnet_app = 2.3.21 but not in 2.3.20

Expected behavior

Work with no errors

Additional context

We upgraded torch, and pytorch lightning version in this release

peterdudfield commented 3 months ago

This is odd, because the CI test do not catch this but, but only when run in docker

peterdudfield commented 3 months ago

Tests are run with python3.12 and docker is 3.10, I will try to upgrade and see if it helps

peterdudfield commented 3 months ago

This did not help

peterdudfield commented 3 months ago

Could try rolling back torch upgrades, or perhpas look at hydra versions

peterdudfield commented 3 months ago

Althought hydra seems like the same version in each

peterdudfield commented 3 months ago

It might be that there's a mistake in a different package, should be m=4

Screenshot 2024-07-29 at 15 13 40

peterdudfield commented 3 months ago
torch lightning CI test docker run
2.4.0 2.3.3 yes no
2.3.0 2.3.3 yes TODO
2.2.0 2.3.1 no yes
2.4.0 2.3.1

error in CI is due to Screenshot 2024-07-29 at 22 15 43 error in app, is due to loading model

peterdudfield commented 3 months ago

Difference between 2.3.20 and 2.3.11

old Cartopy-0.23.0 PVNet-summation-0.3.0 PyYAML-6.0.1 geopandas-1.0.1 huggingface-hub-0.20.3 nowcasting_datamodel-1.5.45 numpy-1.26.4 ocf_datapipes-3.3.35 pvnet-3.0.47 pyogrio-0.9.0 pytorch-lightning-2.1.3 torch=2.2.0

new artopy-0.23.0 PVNet-summation-0.3.2 beautifulsoup4-4.12.3 bs4-0.0.2 fiona-1.9.6 geopandas-0.14.4 huggingface-hub-0.24.1 nowcasting_datamodel-1.5.52 numpy-2.0.0 ocf_datapipes-3.3.39 pillow-10.4.0 pvlive-api-1.3.0 pvnet-3.0.50 pytorch-lightning-2.3.3 pyyaml-6.0.1 soupsieve-2.5 torchvision-0.19.0 torch=2.4.0

peterdudfield commented 3 months ago

when running docker locally, i cant import import pvnet.models.multimodal.multimodal as i get a torchvision error

peterdudfield commented 3 months ago

COuld try wrapping this in a try and except - https://github.com/openclimatefix/PVNet/blob/main/pvnet/models/multimodal/multimodal_base.py#L3, so that the import works

peterdudfield commented 3 months ago

Ok - this is due to a torch vision import error - https://github.com/openclimatefix/pvnet_app/actions/runs/10157687269

peterdudfield commented 3 months ago

This is solved in 2.3.23 #114