text-generation-inference icon indicating copy to clipboard operation
text-generation-inference copied to clipboard

Print error logs from launcher during integration tests

Open Atry opened this issue 2 years ago • 5 comments

What does this PR do?

Print error logs from launcher during integration tests

Before submitting

  • [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [x] Did you read the contributor guideline, Pull Request section?
  • [ ] Was this discussed/approved via a Github issue or the forum? Please add a link to it if that's the case.
  • [ ] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
  • [ ] Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR.

@OlivierDehaene OR @Narsil

Atry avatar Jun 20 '23 21:06 Atry

Hey @Atry thanks for the contribution.

Do you mind sharing a bit more about the problem this is trying to solve ?

Narsil avatar Jun 20 '23 23:06 Narsil

I should be able to see error logs from the launcher's stderr, when running integration tests. The error logs are useful to debug failed tests.

Atry avatar Jun 21 '23 02:06 Atry

But that's already the case with the -s pytest arg isn't it?

OlivierDehaene avatar Jun 21 '23 08:06 OlivierDehaene

The -s option affects how to capture pytest's stdout and stderr, but it does not affect launcher's stderr in the current implementation, because launcher's stderr is not forwarded to pytest.

This PR redirects launcher's stderr to launcher's stdout, which is already forwarded to pytest's stderr at https://github.com/huggingface/text-generation-inference/pull/480/files#diff-f99db5aabf9de5120c24409d7be1b79e635a807f5dc3c12de0116b66f5528be2R256, solving this problem.

Atry avatar Jun 21 '23 16:06 Atry

Hi @OlivierDehaene, could you trigger the CI for this PR? You will see more logs than the main branch.

Atry avatar Jun 22 '23 19:06 Atry