diff --git a/setup.py b/setup.py index b4189dba..ad99d561 100644 --- a/setup.py +++ b/setup.py @@ -8,9 +8,9 @@ "pytest-cov", "pytest-xdist", "mypy", - "black==24.2.0", + "black", "flake8", - "isort==5.13.2", + "isort", "nbval", "nbqa", "autoflake", diff --git a/tests/modeling/test_model_components.py b/tests/modeling/test_model_components.py index fbaff292..0f089884 100644 --- a/tests/modeling/test_model_components.py +++ b/tests/modeling/test_model_components.py @@ -198,7 +198,6 @@ def test_add_logistic_component(): assert torch.allclose(child_probs, expected_probs, atol=1e-6) - def test_add_ratio_component(): data_plate = pyro.plate("data_plate", 3) @@ -210,7 +209,7 @@ def test_add_ratio_component(): child_categorical_parents=mock_data_cat, leeway=0.5, data_plate=data_plate, - categorical_levels=categorical_levels + categorical_levels=categorical_levels, ) sigma_child = tr.trace.nodes["sigma_child1"]["value"] @@ -223,7 +222,9 @@ def test_add_ratio_component(): weights_categorical = {} for name in mock_data_cat.keys(): - weights_categorical[name] = tr.trace.nodes[f"weights_categorical_{name}_child1"]["value"] + weights_categorical[name] = tr.trace.nodes[ + f"weights_categorical_{name}_child1" + ]["value"] categorical_contrib = torch.zeros(3) for name, tensor in mock_data_cat.items(): @@ -240,4 +241,3 @@ def test_add_ratio_component(): expected_probs = torch.sigmoid(expected_mean_prediction) assert torch.allclose(child_probs, expected_probs, atol=1e-6) -