apple / ml-4m

4M: Massively Multimodal Masked Modeling
https://4m.epfl.ch
Apache License 2.0
1.62k stars 97 forks source link

CLIPScore moved in latest torchmetrics v1.4.0.post0 #8

Closed dylanhogg closed 5 months ago

dylanhogg commented 5 months ago

Firstly, thank you for releasing an amazing repo.

I see in pyproject.toml you have torchmetrics>=1.3.1. Given this is not pinned to an exact version, if a new env is created the latest v1.4.0.post0 is used and this breaks run_generation.py.

Changing the import from torchmetrics.multimodal import CLIPScore to be from torchmetrics.multimodal.clip_score import CLIPScore solves this issue.

I'm happy to raise a PR if that's helpful.