Skip to content

[ENH] Allow multiple instances from multiple mock classes in _safe_import #1818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 30, 2025

Conversation

fnhirwa
Copy link
Member

@fnhirwa fnhirwa commented Apr 15, 2025

The issue was spotted in sktime via sktime/sktime#8061

Updated the implementation and copied the unit tests to ensure that it works with pytorch-forecasting.
closes #1815

Copy link

codecov bot commented Apr 15, 2025

Codecov Report

Attention: Patch coverage is 23.63636% with 42 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@4cfa1b8). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ting/utils/_dependencies/tests/test_safe_import.py 0.00% 36 Missing ⚠️
...ch_forecasting/utils/_dependencies/_safe_import.py 68.42% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1818   +/-   ##
=======================================
  Coverage        ?   86.20%           
=======================================
  Files           ?       47           
  Lines           ?     5357           
  Branches        ?        0           
=======================================
  Hits            ?     4618           
  Misses          ?      739           
  Partials        ?        0           
Flag Coverage Δ
cpu 86.20% <23.63%> (?)
pytest 86.20% <23.63%> (?)

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.

@fnhirwa fnhirwa marked this pull request as ready for review April 15, 2025 16:05
@fnhirwa
Copy link
Member Author

fnhirwa commented Apr 18, 2025

pinging @jgyasu
The implementation is similar to that in sktime, is there anything else I should add?

@jgyasu
Copy link
Member

jgyasu commented Apr 19, 2025

Hi @fnhirwa there have been some recent fixes concerning _safe_import in sktime and there are a few things that I still need to discuss. I think once we're done there then you can update this PR with the recent changes.

@fkiraly
Copy link
Collaborator

fkiraly commented Apr 22, 2025

I suppose these have been merged?

@jgyasu
Copy link
Member

jgyasu commented Apr 23, 2025

I suppose these have been merged?

Yes, apologies! I do have some discussion to do around the tests but I am busy with my examinations right now so I think this can be merged and we can have a new PR later on if needed.

@fkiraly
Copy link
Collaborator

fkiraly commented Apr 27, 2025

I updated to what I believe is in sync now with sktime.

@fkiraly fkiraly merged commit 0db17b9 into sktime:main Apr 30, 2025
35 checks passed
PranavBhatP pushed a commit to PranavBhatP/pytorch-forecasting that referenced this pull request May 22, 2025
…mport` (sktime#1818)

The issue was spotted in sktime via
sktime/sktime#8061

Updated the implementation and copied the unit tests to ensure that it
works with pytorch-forecasting.
closes sktime#1815
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENH] _safe_import to allow multiple instances from multiple mock classes
3 participants