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

TestVaxRolloutCoverage::test_vax_rollout_coverage test failed #33

Open
YeChen-IDM opened this issue Dec 11, 2023 · 3 comments
Open

TestVaxRolloutCoverage::test_vax_rollout_coverage test failed #33

YeChen-IDM opened this issue Dec 11, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@YeChen-IDM
Copy link
Collaborator

Tested with emod_typhoid-0.0.7.dev3.

Comps link: https://comps2.idmod.org/#explore/Simulations?filters=ExperimentId=b029026d-5798-ee11-92fe-f0921c167864&offset=0&count=100&selectedId=b329026d-5798-ee11-92fe-f0921c167864

Tests for other coverage values(0.5-1) work fine except these 2;

    BAD: at time step 3651, vax coverage 0.6344827586206897, expected 0.7.
Result is False.
SUMMARY: Success=False
    BAD: at time step 3651, vax coverage 0.5474339035769828, expected 0.6.
Result is False.
SUMMARY: Success=False
@YeChen-IDM
Copy link
Collaborator Author

It looks like the tolerance for coverage is set to 5% in the test.

            if not math.isclose(actual_vax_coverage, expected_coverage, abs_tol=0.05): # we allow 5% difference
                self.success = False
                outfile.write(
                    f"    BAD: at time step {self.campaign_obj['Start_Day'][2]}, vax coverage {actual_vax_coverage}, expected {expected_coverage}.\n")
                outfile.write("Result is False.\n")
            else:
                self.success = True
                outfile.write("GOOD: coverage is correct!\n")
                outfile.write("Result is True.\n")

@jonathanhhb jonathanhhb self-assigned this Dec 12, 2023
@jonathanhhb jonathanhhb added the bug Something isn't working label Dec 12, 2023
@jonathanhhb
Copy link
Collaborator

I wonder if this gets fixed with a larger population. I will investigate.

@YeChen-IDM
Copy link
Collaborator Author

Fixed the test in the PR #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants