openclimatefix / skillful_nowcasting

Implementation of DeepMind's Deep Generative Model of Radar (DGMR) https://arxiv.org/abs/2104.00954
MIT License
223 stars 59 forks source link

Fix: token issue when loading pretrained model #67

Closed hchen19 closed 8 months ago

hchen19 commented 8 months ago

Pull Request

Description

Fixes issue https://github.com/openclimatefix/skillful_nowcasting/issues/65

Changed the keyword argument use_auth_token in hf_hub_download() in dgmr/hub.py file to token. According to the parameters defined in huggingface_hub.hf_hub_download, the argument name is token, not use_auth_token. (https://huggingface.co/docs/huggingface_hub/v0.22.0.rc0/en/package_reference/file_download#huggingface_hub.hf_hub_download)

How Has This Been Tested?

_Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

from dgmr import DGMR, Sampler, Generator, Discriminator, LatentConditioningStack, ContextConditioningStack
access_token = "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"
model = DGMR.from_pretrained("openclimatefix/dgmr", use_auth_token=access_token)

If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?

Checklist: