romilbert / samformer

Official implementation of SAMformer, a transformer leveraging Sharpness-Aware Minimization and Channel-Wise Attention for Time Series Forecasting.
MIT License
71 stars 8 forks source link

TypeError: save_additional_metrics() takes 5 positional arguments #5

Open erickmiller opened 2 months ago

erickmiller commented 2 months ago

While running training, using: sh run_script.sh -m transformer -d ETTh1 -u -a

When the code hits the early stopping point, I ran into the error:

Traceback (most recent call last):
  File "/samformer/run.py", line 187, in <module>
    main()
  File "/samformer/run.py", line 184, in main
    save_additional_metrics(model, args, history, test_result, elapsed_training_time, train_data, current_directory, capture_weights_callback)
TypeError: save_additional_metrics() takes 5 positional arguments but 8 were given

Was a quick fix, tested and it appears to fix the issue, here's the pull request: https://github.com/romilbert/samformer/pull/4

erickmiller commented 2 months ago

Cool project, by the way 👍

romilbert commented 2 months ago

Thank you for your comments. The method we currently use to save the metrics will be updated in an upcoming version of the code.