Skip to content

Return axes from TFTExplainer.plot_variable_selection#3039

Open
ReinerBRO wants to merge 1 commit intounit8co:masterfrom
ReinerBRO:fix/2892-return-variable-selection-axes
Open

Return axes from TFTExplainer.plot_variable_selection#3039
ReinerBRO wants to merge 1 commit intounit8co:masterfrom
ReinerBRO:fix/2892-return-variable-selection-axes

Conversation

@ReinerBRO
Copy link

Summary

  • return matplotlib axes from TFTExplainer.plot_variable_selection() so callers can post-process plots (save/close/customize)
  • keep behavior for single-series explanations simple by returning one axes array
  • return a list of axes arrays when plotting multiple series
  • add a focused regression assertion in test_variable_selection_explanation

Why

Issue #2892 requests access to the figure/axes from plot_variable_selection(); previously the method only showed the plot and returned None.

Validation

  • . .venv/bin/activate && python -m pytest darts/tests/explainability/test_tft_explainer.py -k variable_selection_explanation -q
  • . .venv/bin/activate && ruff check darts/explainability/tft_explainer.py darts/tests/explainability/test_tft_explainer.py

Fixes #2892

@ReinerBRO ReinerBRO requested a review from dennisbader as a code owner March 18, 2026 19:49
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.

Return the figure plotted by TFT explainer variable selection

1 participant