moment-timeseries-foundation-model / moment

MOMENT: A Family of Open Time-series Foundation Models
https://moment-timeseries-foundation-model.github.io/
MIT License
319 stars 51 forks source link

TypeError: MOMENTPipeline.__init__() missing 1 required positional argument: 'config' #40

Closed XinyuanLiao closed 3 weeks ago

XinyuanLiao commented 2 months ago

Hi,

When I try to run the blow code on my mac, I meet the above error. But it's ok when I run it on colab.

from momentfm import MOMENTPipeline

model = MOMENTPipeline.from_pretrained(
    "AutonLab/MOMENT-1-large",
    model_kwargs={
        'task_name': 'classification',
        'n_channels': 1,
        'num_class': 5
    }, # We are loading the model in `classification` mode
)
model.init()
print(model)
audreyeternal commented 1 month ago

same problem.

audreyeternal commented 1 month ago

@XinyuanLiao, I think the most possible reason would be the internet issue. here the model will try to download the config file from the hub and here the config will be merged into model_kwargs. So if it fails to retrieve the config file, the above mentioned error will show up.

mononitogoswami commented 3 weeks ago

Hi Xinyuan, Thanks for your interest in MOMENT! The latest version of the model should not have this issue.

Let us know if you have any questions!

Best, Mononito