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

improve log output of fromager for debugging resolver failures #498

Closed
dhellmann opened this issue Nov 7, 2024 · 1 comment
Closed

improve log output of fromager for debugging resolver failures #498

dhellmann opened this issue Nov 7, 2024 · 1 comment
Assignees

Comments

@dhellmann
Copy link
Member

dhellmann commented Nov 7, 2024

We get errors like

Traceback (most recent call last):^M
  File "/opt/app-root/lib64/python3.11/site-packages/fromager/bootstrapper.py", line 134, in bootstrap^M
    self.bootstrap(dep, RequirementType.INSTALL)^M
  File "/opt/app-root/lib64/python3.11/site-packages/fromager/bootstrapper.py", line 108, in bootstrap^M
    ) = self._prepare_source(req, source_filename, resolved_version)^M
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^M
  File "/opt/app-root/lib64/python3.11/site-packages/fromager/bootstrapper.py", line 227, in _prepare_source^M
    self._handle_build_requirements(^M
  File "/opt/app-root/lib64/python3.11/site-packages/fromager/bootstrapper.py", line 265, in _handle_build_requirements^M
    raise ValueError(^M
ValueError: could not handle build-system dependency torch~=2.3.1 for [(<RequirementType.TOP_LEVEL: 'toplevel'>, <Requirement('docling[tesserocr]')>, <Versio\
n('2.3.1')>), (<RequirementType.INSTALL: 'install'>, <Requirement('docling-ibm-models<3.0.0,>=2.0.3')>, <Version('2.0.3')>), (<RequirementType.INSTALL: 'inst\
all'>, <Requirement('torchvision<1,>=0')>, <Version('0.18.1')>)]^M

which are hard to read. We can improve the formatting.

We should also ensure that we log that information as we start each step of bootstrapping, since the recursion means that for some packages the beginning of processing may be very far away in the log from the point where their build step fails.

dhellmann added a commit to dhellmann/fromager that referenced this issue Nov 7, 2024
Format the dependency chain so it is easier to read. Update the way
exceptions and log messages are written. Log the chain at the start
of the build process.

Addresses python-wheel-build#498
@dhellmann dhellmann self-assigned this Nov 7, 2024
@dhellmann
Copy link
Member Author

The basic ideas for this are done. We can track other improvements separately.

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

No branches or pull requests

1 participant