question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve the precision of our integration tests

See original GitHub issue

We currently have a rather low precision when testing our pipeline due to due reasons.

    • Our reference is an image and not a numpy array. This means that when we created our reference image we lost float precision which is unnecessary
    • We only test for .max() < 1e-2 . IMO we should test for .max() < 1e-4 with the numpy arrays. In my experiements across multiple devices I have not seen differences bigger than .max() < 1e-4 when using full precision.

IMO this could have also prevented: https://github.com/huggingface/diffusers/issues/902

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Lewington-pitsoscommented, Oct 24, 2022

@patrickvonplaten after some research I think I understand the issue.

The images are currently stored in a low-precision format (e.g. png) which prevents us from testing with any greater precision than 1e-2. Even if we convert the image into a numpy array this will not help since the image itself is missing precision.

What we need to do is store a numpy representation of the image, say somewhere inside https://huggingface.co/datasets which we can then download and use for comparison.

The way we could do this is by generating the test output, saving that output as a numpy image and uploading it.

This is what I plan to do tomorrow.

This stack overflow thread was very helpful in understanding the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 best practices for integration testing with continuous ...
How integration testing works with CI and DevOps · Run integration tests until something fails · Determine what needs to be added or...
Read more >
What is integration testing? The basics explained!
Integration testing is the second level in the software testing hierarchy. Learn more about its goals, roles, and commonly used approaches.
Read more >
The Best Way to Manage Continuous Integration Testing
Advantages of Continuous Integration Testing. Increase Your Testing Coverage: Testing most of your code base isn't enough.
Read more >
Confident Testing: Why Unit-Testing Over Integration-Testing
When we develop using Continuous Confidence, when we get to the point of considering testing, our focus becomes Confidence. Confident code.
Read more >
A Breakdown of Continuous Integration Testing - Harness
Let's explore how you can adopt CI/CD to improve your organization's efficiency and delivery pipeline in Harness.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found