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

update bug report ticket with Active backend field #853

Merged
merged 29 commits into from
Mar 16, 2022

Conversation

felixdittrich92
Copy link
Contributor

@felixdittrich92 felixdittrich92 commented Mar 13, 2022

As discussed:

updates the bug report ticket that we can check which backend is enabled for the code the user is running

@codecov
Copy link

codecov bot commented Mar 13, 2022

Codecov Report

Merging #853 (8021129) into main (bc03a0f) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #853   +/-   ##
=======================================
  Coverage   94.84%   94.84%           
=======================================
  Files         133      133           
  Lines        5197     5200    +3     
=======================================
+ Hits         4929     4932    +3     
  Misses        268      268           
Flag Coverage Δ
unittests 94.84% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
doctr/io/pdf.py 93.33% <0.00%> (-6.67%) ⬇️
doctr/transforms/modules/base.py 94.59% <0.00%> (ø)
doctr/transforms/functional/base.py 97.10% <0.00%> (+1.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc03a0f...8021129. Read the comment docs.

@fg-mindee
Copy link
Contributor

Hi @felixdittrich92 :)

Thanks for the PR! I'm having mixed feelings about this feature:

  • perhaps it's best that the output of the environment collection script doesn't change according to env variables 🤔
  • using doctr.file_utils, users can easily know which backend they are running

What do you think?

@felixdittrich92
Copy link
Contributor Author

@fg-mindee
So normally you don't have both frameworks running in one environment. 😅
But if that should be the case, I would generally be in favor of giving the user information about which one is being used (the default on tf in particular is difficult for a user to understand without looking at the code).
However, this is not that easy to implement, since we cannot simply write something to the console or overwrite a possible root logger.
If you have another idea I would be happy 🤗
Another thing we could do is document this better ! For example use from doctr.file_utils -> is_xyz_available or setup a basic logger to log informations from doctr

@fg-mindee
Copy link
Contributor

Considering that the env collection script may be run in another window with different env var, I think it's not useful to display it there. The script shows whether TF or PyTorch can be used, which usually gives us all the necessary information.

Another thing we could do is document this better ! For example use from doctr.file_utils -> is_xyz_available or setup a basic logger to log informations from doctr

That might be a good idea actually, to log the enabled backend. For now, without any env var set, file_utils with return True for both PyTorch and TF if both libraries are installed. The priority is only given in __init__ (cf. https://github.com/mindee/doctr/blob/main/doctr/datasets/generator/__init__.py) but this might complicate things a little.

Perhaps the best option would be to edit the bug report template? (ask user to specify which backend they are running, and how to check that)

@felixdittrich92 felixdittrich92 changed the title version / framework console print update bug report ticket with Active backend field Mar 16, 2022
@felixdittrich92
Copy link
Contributor Author

@fg-mindee

ftm i agree that this would be the easiest way i have totally forgot this templates 😅 👍

Copy link
Contributor

@fg-mindee fg-mindee left a comment

Choose a reason for hiding this comment

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

Thanks! Only a few things left to change

.github/ISSUE_TEMPLATE/bug_report.yml Outdated Show resolved Hide resolved
.github/ISSUE_TEMPLATE/bug_report.yml Outdated Show resolved Hide resolved
@fg-mindee fg-mindee self-assigned this Mar 16, 2022
@fg-mindee fg-mindee added type: enhancement Improvement topic: ci Related to CI labels Mar 16, 2022
@fg-mindee fg-mindee added this to the 0.6.0 milestone Mar 16, 2022
Copy link
Contributor

@fg-mindee fg-mindee left a comment

Choose a reason for hiding this comment

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

Thanks Felix!!

@fg-mindee fg-mindee merged commit fc8efc9 into mindee:main Mar 16, 2022
@felixdittrich92 felixdittrich92 deleted the info branch March 16, 2022 13:55
@frgfm frgfm mentioned this pull request Jun 28, 2022
85 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: ci Related to CI type: enhancement Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants