Skip to content

Conversation

@Himanshu-Verma-ds
Copy link
Contributor

changed the importing of pytorch-forecasting in order to account for this error "model must be a LightningModule or torch._dynamo.OptimizedModule, got TemporalFusionTransformer"

Description

This PR solves the issue of importing of pytorch-forecasting in order to account for this error "model must be a LightningModule or torch._dynamo.OptimizedModule, got TemporalFusionTransformer"

Checklist

  • Linked issues (if existing)
  • Amended changelog for large changes (and added myself there as contributor)
  • Added/modified tests
  • Used pre-commit hooks when committing to ensure that code is compliant with hooks. Install hooks with pre-commit install.
    To run hooks independent of commit, execute pre-commit run --all-files

Make sure to have fun coding!

changed the importing of pytorch-forecasting in order to account for this error "`model` must be a `LightningModule` or `torch._dynamo.OptimizedModule`, got `TemporalFusionTransformer`"
Copy link
Member

@fnhirwa fnhirwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current state of the repo fixed this issue, This should be closed.
FYI @fkiraly

@fkiraly fkiraly changed the title Updated base_model.py to account for importing error [BUG] Updated base_model.py to account for importing error Jul 10, 2025
@fkiraly fkiraly added the bug Something isn't working label Jul 10, 2025
@fkiraly
Copy link
Collaborator

fkiraly commented Jul 10, 2025

Agree - though the PR would have fixed the issue as well, if merged.
I think we should just merge this PR (empty though) for sake of crediting that.

@fkiraly fkiraly merged commit 7467b27 into sktime:main Jul 10, 2025
1 of 2 checks passed
@codecov
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@6ff532f). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1488   +/-   ##
=======================================
  Coverage        ?   86.36%           
=======================================
  Files           ?       96           
  Lines           ?     7801           
  Branches        ?        0           
=======================================
  Hits            ?     6737           
  Misses          ?     1064           
  Partials        ?        0           
Flag Coverage Δ
cpu 86.36% <0.00%> (?)
pytest 86.36% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Fixed/resolved

Development

Successfully merging this pull request may close these issues.

3 participants