-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[docs] How to build the docs on macOS using conda #9276
Conversation
jaceklaskowski
commented
Jun 8, 2023
- Describe the steps to build the docs on macOS using conda in "Contribute to XGBoost"
- Fix a typo in "XGBoost JVM Package" main page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the detailed instructions on building the documents, @jaceklaskowski ! Some comments on the details.
doc/contrib/docs.rst
Outdated
The online document is hosted by `Read the Docs <https://readthedocs.org/>`__ where the imported project is managed by `Hyunsu Cho <https://github.com/hcho3>`__ and `Jiaming Yuan <https://github.com/trivialfis>`__. | ||
|
||
=============================== | ||
Build Docs on macOS using Conda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you use conda for illustration, it should work across various platforms. We just need to replace the brew
step with graphviz
from conda forge.
Aside from this, let's make it clear that this is building the HTML document.
doc/contrib/docs.rst
Outdated
conda activate xgboost-docs | ||
|
||
#. Install required packages (in the current environment) using ``pip`` command. | ||
For some reason, it is currently not possible to install the required packages using ``conda``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I installed the required packages from conda with packages from the conda-forge
channel.
Would be great to keep the toolchain as consistent as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue I had was with ray and Python version. I started with Python 3.11 and make html
couldn't resolve xgboost-ray. Once I switched to Python 3.10 it all started well but only with pip
. I couldn't convince conda
to resolve all the deps. I'll give it a try again and report back with the findings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the issue I'm facing with conda install
. Any idea how to fix it (and how it's possible that it works for you?!)
$ conda install --file requirements.txt --yes -c conda-forge
Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- xgboost_ray
Current channels:
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
doc/contrib/docs.rst
Outdated
|
||
=============================== | ||
Build Docs on macOS using Conda | ||
=============================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't build the C++ doc, which requires the C++ document tools like doxygen. After having doxygen, one can run:
READTHEDOCS=True make html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The C++-part of xgboost was of little to no interest to me honestly and so I didn't even bother myself with this. I also simply followed the current version of the doc how to use make html
and since there was no mention about the other options I didn't add them either.
... | ||
The HTML pages are in _build/html. | ||
|
||
Build finished. The HTML pages are in _build/html. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A reference to the sphinx doc build would be great. There are many other options like output format, each with a different set of dependencies (like pdflatex for pdf).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A reference to the sphinx doc build would be great. is already included in the Documentation
section at the top of the page so I skip this. I added a note about the other options (make help
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for improving the doc, @jaceklaskowski !
Some edits:
|