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

Units Tests Failing #218

Open
raabrp opened this issue Feb 7, 2025 · 0 comments
Open

Units Tests Failing #218

raabrp opened this issue Feb 7, 2025 · 0 comments

Comments

@raabrp
Copy link
Contributor

raabrp commented Feb 7, 2025

In order to get tests to pass on a fresh clone of the repository, I had to make a few edits and set a timeout for pytest. After setting the timeout, some tests continue to fail.

Edits I had to make

  • test_loss.py (replace all occurances of np.float -> float)
  • test_blocks.py (import KANBlock and StackedMLP from neuromancer.modules.blocks)

Unit Tests Still Failing

FAILED tests/psl/test_norm.py::test_emulator_integration4[LotkaVolterra] - Failed: Timeout >10.0s
FAILED tests/test_blocks.py::test_linear_shape - Failed: Timeout >10.0s
FAILED tests/test_blocks.py::test_res_mlp_shape - hypothesis.errors.FlakyStrategyDefinition: Inconsistent data generation! Data generation behaved differently be...
FAILED tests/test_blocks.py::test_bilinear_shape - hypothesis.errors.FlakyFailure: Hypothesis test_bilinear_shape(batchsize=426, insize=426, outsize=258, lin=Spec...
FAILED tests/test_constraints.py::test_constraint_device_placement - AssertionError: Torch not compiled with CUDA enabled
FAILED tests/test_trainer.py::test_train_runs_for_epochs[get_problem0-data_setup_function-10] - TypeError: LitTrainer.fit() missing 1 required positional argument: 'data_setup_function'
FAILED tests/test_trainer.py::test_weight_updates[get_problem0-data_setup_function] - TypeError: LitTrainer.fit() missing 1 required positional argument: 'data_setup_function'
FAILED tests/test_utils.py::test_handle_device_placement[callable_1] - AssertionError: Torch not compiled with CUDA enabled
FAILED tests/test_utils.py::test_handle_device_placement[callable_2] - AssertionError: Torch not compiled with CUDA enabled
FAILED tests/test_utils.py::test_handle_device_placement[callable_3] - AssertionError: Torch not compiled with CUDA enabled

Additional Failure after commenting the above (Non-deterministic?)

test_blocks.py: test_basis_linear_shape

raises .venv/lib/python3.10/site-packages/neuromancer/slim/linear.py:683: TypeError

def forward(self, x):
    x = self.Umultiply(x)
    x = torch.matmul(x, self.Sigma())
    x = self.Vmultiply(x)
  return x + self.bias

E TypeError: unsupported operand type(s) for +: 'Tensor' and 'NoneType'
E Falsifying example: test_basis_linear_shape(
E batchsize=1, # or any other generated value
E insize=1, # or any other generated value
E outsize=1, # or any other generated value
E bias=False,
E lin=neuromancer.slim.linear.SpectralLinear,
E )

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

No branches or pull requests

1 participant