Skip to content

Make floating-point tests more tolerant to small numerical differences #129

@KenyaOtsuka

Description

@KenyaOtsuka

Some floating-point tests may be too strict and can fail due to tiny numerical differences across environments.

A recent CI run failed in tests/recon/torch/modules/test_optimizer.py::TestBuildOptimizerFactory::test_build_optimizer_factory with only a very small mismatch:

  • Max absolute difference: 1.3969839e-09
  • Max relative difference: 2.5266988e-06

This seems similar to #117, but occurs in a different test. We may want to add an appropriate atol to the existing assert_allclose and review other similar floating-point assertions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions