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

invalid escape sequences in h2o-py docstrings #16466

Open
jmahlik opened this issue Dec 23, 2024 · 0 comments
Open

invalid escape sequences in h2o-py docstrings #16466

jmahlik opened this issue Dec 23, 2024 · 0 comments
Labels

Comments

@jmahlik
Copy link

jmahlik commented Dec 23, 2024

H2O version, Operating System and Environment
main branch, windows, python 3.12+

Actual behavior
There are some invalid escape sequences in the docstrings of h2o-py.

These will eventually raise errors when the package is imported. https://docs.python.org/3/whatsnew/3.12.html#other-language-changes. I ran in to this when generating documentation via sphinx when h2o is installed. It causes sphinx to crash since sphix is using the content of the docstrings.

python -Werror ./venv/Lib/site-packages/h2o/model/model_base.py
...\venv\Lib\site-packages\h2o\model\model_base.py:913: SyntaxWarning: invalid escape sequence '\s'
  """
python -Werror ./venv/Lib/site-packages/h2o/estimators/xgboost.py
...\venv\Lib\site-packages\h2o\estimators\xgboost.py", line 2559
    """
    ^^^
SyntaxError: invalid escape sequence '\*'

Expected behavior
Replace the invalid sequences with valid escapes or use raw strings

Steps to reproduce
Steps to reproduce the behavior (with working code on a sample dataset, if possible):
Just running the file is enough to trigger this i.e. python -Werror ./venv/Lib/site-packages/h2o/estimators/xgboost.py

Upload logs
If you can, please upload the H2O logs. More information on how to do that is available here, or you can use the h2o.downloadAllLogs() in R or the h2o.download_all_logs() function in Python.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@jmahlik jmahlik added the bug label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant