Skip to content
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

[DOC] Correct argument for optimizer ranger in Temporal Fusion Transformer tutorial #1724

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fnhirwa
Copy link
Member

@fnhirwa fnhirwa commented Dec 9, 2024

fixes error in the tutorial which was causing examples to fail.
fixes #1722

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@fnhirwa fnhirwa marked this pull request as ready for review December 9, 2024 11:14
@fkiraly fkiraly added the bug Something isn't working label Dec 10, 2024
Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

the notebook CI failed, looks like a timeout? I will restart

@fnhirwa
Copy link
Member Author

fnhirwa commented Dec 11, 2024

The issue was the training of the TFT model, which is taking longer than the nb sphinx timeout time, which is 600s. I ran the example locally and disabled notebooks run on CI in conf.py. You can check the notebook output from ReviewNB before merging.

Also increased the timeout in the tests to 1200s due to the training time

@fnhirwa fnhirwa requested a review from fkiraly December 11, 2024 10:11
@fnhirwa fnhirwa marked this pull request as draft December 11, 2024 16:23
@fnhirwa fnhirwa marked this pull request as ready for review December 11, 2024 20:54
@@ -180,3 +180,8 @@ def setup(app: Sphinx):
suppress_warnings = [
"autosummary.import_cycle",
]

# -----------nbsphinx extension ----------
nbsphinx_execute = "never" # always
Copy link
Member

Choose a reason for hiding this comment

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

If you never run the notebooks, do the below the configurations have any effect?

Copy link
Member Author

@fnhirwa fnhirwa Dec 12, 2024

Choose a reason for hiding this comment

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

I found that there is a workflow run for testing the notebook and it was one causing the timeout error, this is for building the docs.

Copy link
Member

Choose a reason for hiding this comment

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

If I am not wrong, nbsphinx_execute = "never" will ensure that RTD will not execute the example notebooks while building the docs (ref. https://nbsphinx.readthedocs.io/en/0.9.5/never-execute.html). If that is the case, whether that execution need to ignore errors or not (nbsphinx_allow_errors = False) or how long execution takes (nbsphinx_timeout = 600) should not matter.

Does that make sense? Let me know if I am missing something, or misunedrstanding the purpose of these configurations.

Copy link
Member Author

@fnhirwa fnhirwa Dec 12, 2024

Choose a reason for hiding this comment

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

You're right, these extra configurations are meaningless.
should we keep the nbsphinx_execute = "never"? as we run notebooks in this workflow to test if they don't fail.

run-notebook-tutorials:

Copy link
Member

Choose a reason for hiding this comment

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

I believe never is fine, these executions increase RTD time significantly. Let's skip in sktime too for that matter, if @fkiraly agree as well (I have seen too many timeouts recently).

Copy link
Member

Choose a reason for hiding this comment

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

I'm unable to see this diff in Github (it saus unable to render rich diff), and ReviewNB also seems to lack the notebook.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not quite sure about that, I logged in with my github and was able to see diff on ReviewNB
image

Copy link
Member

Choose a reason for hiding this comment

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

Not sure why it's not working for me, but not a big deal. I checked it from branch it directly.

I am not what change of yours is making the predictions worse. In main branch, the predicted orange line and shaded area seemed to contain the blue actuals pretty well, but in the modified one the gaps seem to have increased notably. Do you agree with observation? Any guess what's causing it (seed remained same at 42 in both cases)?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure about the cause as I can see even the learning_rate got changed from 0.041 to 0.009. I think I'll need to check the logs and see where it is going wrong

@fnhirwa fnhirwa requested a review from yarnabrina December 12, 2024 11:22
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
Development

Successfully merging this pull request may close these issues.

[DOC] Incorrect name on tutorial "Demand forecasting with the Temporal Fusion Transformer"
3 participants