XanaduAI / MrMustard

A differentiable bridge between phase space and Fock space
https://mrmustard.readthedocs.io/
Apache License 2.0
78 stars 27 forks source link

Silencing TensorFlow warning #332

Closed SamFerracin closed 9 months ago

SamFerracin commented 9 months ago

Description of the Change: Using python built-in logger, this PR silences the annoying ComplexWarnings coming from tf.cast. Additionally, it gets rid of tensorflow's import messages.

codecov[bot] commented 9 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (4cb1fd7) 83.97% compared to head (a98c24c) 84.14%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #332 +/- ## =========================================== + Coverage 83.97% 84.14% +0.17% =========================================== Files 64 65 +1 Lines 4742 4775 +33 =========================================== + Hits 3982 4018 +36 + Misses 760 757 -3 ``` | [Files](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI) | Coverage Δ | | |---|---|---| | [mrmustard/\_\_init\_\_.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [mrmustard/lab/abstract/measurement.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL2xhYi9hYnN0cmFjdC9tZWFzdXJlbWVudC5weQ==) | `89.41% <100.00%> (+2.05%)` | :arrow_up: | | [mrmustard/lab/gates.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL2xhYi9nYXRlcy5weQ==) | `97.24% <ø> (ø)` | | | [mrmustard/math/backend\_tensorflow.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL21hdGgvYmFja2VuZF90ZW5zb3JmbG93LnB5) | `100.00% <100.00%> (ø)` | | | [mrmustard/utils/filters.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL3V0aWxzL2ZpbHRlcnMucHk=) | `100.00% <100.00%> (ø)` | | | [mrmustard/utils/settings.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL3V0aWxzL3NldHRpbmdzLnB5) | `98.31% <100.00%> (+0.11%)` | :arrow_up: | | [mrmustard/utils/typing.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL3V0aWxzL3R5cGluZy5weQ==) | `100.00% <100.00%> (+3.33%)` | :arrow_up: | | [mrmustard/training/callbacks.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL3RyYWluaW5nL2NhbGxiYWNrcy5weQ==) | `92.85% <75.00%> (+0.22%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Last update [4cb1fd7...a98c24c](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/332?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI).