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

[pre-commit.ci] pre-commit autoupdate #100

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

pre-commit-ci[bot]
Copy link
Contributor

@pre-commit-ci pre-commit-ci bot commented Jun 17, 2024

updates:
- [github.com/pycqa/flake8: 7.0.0 → 7.1.0](PyCQA/flake8@7.0.0...7.1.0)
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.83%. Comparing base (9b5e229) to head (902ba24).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #100   +/-   ##
=======================================
  Coverage   86.83%   86.83%           
=======================================
  Files          14       14           
  Lines        1193     1193           
  Branches      172      172           
=======================================
  Hits         1036     1036           
  Misses        105      105           
  Partials       52       52           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sk1p
Copy link
Member

sk1p commented Jun 25, 2024

@matbryan52 do you have an idea about the test failure? It seems that we are missing the tolerance by just a tiny bit:

E           Not equal to tolerance rtol=1e-07, atol=0.5
E           
E           Mismatched elements: 1 / 2 (50%)
E           Max absolute difference: 0.5083443
E           Max relative difference: 0.15369503
E            x: array([ 0.832502, 29.035461], dtype=float32)
E            y: array([ 0.98369 , 28.527117]

Is something going on, or do we need to tweak the tolerance?

(note that it's not related to numpy 2.0, as hdbscan installs a numpy version <2)

@matbryan52
Copy link
Member

@matbryan52 do you have an idea about the test failure? It seems that we are missing the tolerance by just a tiny bit:

E           Not equal to tolerance rtol=1e-07, atol=0.5
E           
E           Mismatched elements: 1 / 2 (50%)
E           Max absolute difference: 0.5083443
E           Max relative difference: 0.15369503
E            x: array([ 0.832502, 29.035461], dtype=float32)
E            y: array([ 0.98369 , 28.527117]

Is something going on, or do we need to tweak the tolerance?

(note that it's not related to numpy 2.0, as hdbscan installs a numpy version <2)

I have a feeling it's a tolerance issue, but it must be a rare one. The large tolerance is due to the small-ish number of peaks in the fake CBED frame and the fact that cbed_frame has to centre its peaks on integer pixels despite using floating (and random) a/b vectors:

        zero = shape / 2 + np.random.uniform(-1, 1, size=2)
        a = np.array([27.17, 0.]) + np.random.uniform(-1, 1, size=2)
        b = np.array([0., 29.19]) + np.random.uniform(-1, 1, size=2)

At a later time we could modify the testcase to be more precise, but for now I would not worry.

@sk1p
Copy link
Member

sk1p commented Jun 25, 2024

As the re-trigger worked fine, I created an issue for the tolerance, and I'll go ahead and merge this one.

@sk1p sk1p merged commit 1d47d64 into master Jun 25, 2024
19 checks passed
@sk1p sk1p deleted the pre-commit-ci-update-config branch June 25, 2024 15:54
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

Successfully merging this pull request may close these issues.

2 participants