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

Add simple test case for coords behavior #3977

Merged
merged 5 commits into from
Jun 24, 2020

Conversation

kyleabeauchamp
Copy link
Contributor

@kyleabeauchamp kyleabeauchamp commented Jun 21, 2020

This PR adds a simple test case that attempts to trigger issue #3976. I'm mainly checking to see whether the current CI/CD reproduces the issue I'm seeing. I've also bumped the minimum version of arviz to ensure correct behavior of coords.

@kyleabeauchamp
Copy link
Contributor Author

Can someone confirm that Travis will pick up a test like this? It's not obvious whether the test harness only includes a select subset on travis, or whether all additions will get picked up by default.

@kyleabeauchamp
Copy link
Contributor Author

OK, looks like my new test is running and failing, now I just need to wait for the error message to print out.

pymc3/tests/test_coords.py::test_coords FAILED                           [  0%]

@kyleabeauchamp
Copy link
Contributor Author

Boom:

=================================== FAILURES ===================================
_________________________________ test_coords __________________________________
    def test_coords():
        chains = 2
        n_features = 3
        n_samples = 10
    
        coords = {"features": np.arange(n_features)}
    
        with pm.Model(coords=coords):
            a = pm.Uniform("a", -100, 100, dims="features")
            b = pm.Uniform("b", -100, 100, dims="features")
            tr = pm.sample(n_samples, chains=chains, return_inferencedata=True)
    
>       assert "features" in tr.posterior.a.coords.dims
E       AssertionError: assert 'features' in ('chain', 'draw', 'a_dim_0')

@kyleabeauchamp
Copy link
Contributor Author

kyleabeauchamp commented Jun 21, 2020

I suspect this will be fixed by the next arviz release? Anyone know for sure?

@kyleabeauchamp kyleabeauchamp changed the title [WIP] Add simple test case for coords behavior Add simple test case for coords behavior Jun 21, 2020
@kyleabeauchamp
Copy link
Contributor Author

I think this is the arviz PR that needs to be present for pymc3 <> arviz coords behavor to work: arviz-devs/arviz#1228

@kyleabeauchamp
Copy link
Contributor Author

I've added to this PR a version bump on Arviz that ensures the correct version in the pymc3 requirements. This is ready for review and merge. The only test failure is an unrelated failure on text_matrix_multiply.

@lucianopaz
Copy link
Contributor

Pinging @michaelosthege as it would be great to bump the bug fix version of pymc3 (move it to 3.9.2) to ensure an upgrade of pymc3 will also upgrade to the proper arviz version.

@AlexAndorra AlexAndorra merged commit 9c7ed77 into pymc-devs:master Jun 24, 2020
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.

4 participants