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

[Bug][Testing] Broken test_loss_functions.py #9440

Closed
1 of 4 tasks
jaketae opened this issue Jan 6, 2023 · 1 comment · Fixed by #9442
Closed
1 of 4 tasks

[Bug][Testing] Broken test_loss_functions.py #9440

jaketae opened this issue Jan 6, 2023 · 1 comment · Fixed by #9442
Assignees
Labels
Bug Report Report bugs detected in Ivy.

Comments

@jaketae
Copy link
Contributor

jaketae commented Jan 6, 2023

Bug Explanation

A number of open PRs are being affected by test_loss_functions.py, which is failing on the CI with the following error message ((example job)[https://github.com/unifyai/ivy/actions/runs/3853660784/jobs/6566851736]):

_ ERROR collecting ivy_tests/test_ivy/test_frontends/test_torch/test_loss_functions.py _
(https://github.com/unifyai/ivy/actions/runs/3853660784/jobs/6566851736#step:6:62)
ivy_tests/test_ivy/test_frontends/test_torch/test_loss_functions.py:203: in <module>
(https://github.com/unifyai/ivy/actions/runs/3853660784/jobs/6566851736#step:6:63)
    dtype_and_pos_weight=helpers.array_or_none(
(https://github.com/unifyai/ivy/actions/runs/3853660784/jobs/6566851736#step:6:64)
E   AttributeError: module 'ivy_tests.test_ivy.helpers' has no attribute 'array_or_none'
(https://github.com/unifyai/ivy/actions/runs/3853660784/jobs/6566851736#step:6:65)
_ ERROR collecting ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py _

The problematic helpers.array_or_none() function was deleted in commit c8d0524.

Steps to Reproduce Bug

CI logs

Environment

N/A

Ivy Version

master

Backend

  • NumPy
  • TensorFlow
  • PyTorch
  • JAX

Device

No response

@jaketae jaketae added the Bug Report Report bugs detected in Ivy. label Jan 6, 2023
@jaketae jaketae changed the title [Bug][Testing]: Fix broken test_loss_functions.py [Bug][Testing]: Broken test_loss_functions.py Jan 6, 2023
@jaketae
Copy link
Contributor Author

jaketae commented Jan 6, 2023

As can be seen in the referenced commit, this can be fixed by replacing helper.array_or_none() with st.one_of(...). Will publish a PR with this fix.

@jaketae jaketae changed the title [Bug][Testing]: Broken test_loss_functions.py [Bug][Testing] Broken test_loss_functions.py Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Report bugs detected in Ivy.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants