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

benchmark_v2/str_locality_benchmark.py throws errors #3797

Closed
ajpotts opened this issue Sep 30, 2024 · 3 comments · Fixed by #3800
Closed

benchmark_v2/str_locality_benchmark.py throws errors #3797

ajpotts opened this issue Sep 30, 2024 · 3 comments · Fixed by #3800
Assignees
Labels
bug Something isn't working

Comments

@ajpotts
Copy link
Contributor

ajpotts commented Sep 30, 2024

Describe the bug
When I run make benchmark size=10 on my local linux box, I get the following errors:

--- Logging error ---
Traceback (most recent call last):
  File "/home/amandapotts/anaconda3/envs/arkouda-dev/lib/python3.12/logging/__init__.py", line 1163, in emit
    stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
  File "/home/amandapotts/git/arkouda/arkouda/pdarrayclass.py", line 376, in __del__
    logger.debug(f"deleting pdarray with name {self.name}")
Message: 'deleting pdarray with name id_q7pl9AR_3'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
  File "/home/amandapotts/anaconda3/envs/arkouda-dev/lib/python3.12/logging/__init__.py", line 1163, in emit
    stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
  File "/home/amandapotts/git/arkouda/arkouda/pdarrayclass.py", line 376, in __del__
    logger.debug(f"deleting pdarray with name {self.name}")
Message: 'deleting pdarray with name id_q7pl9AR_6'
Arguments: ()
@ajpotts ajpotts added the bug Something isn't working label Sep 30, 2024
@ajpotts ajpotts self-assigned this Sep 30, 2024
@ajpotts ajpotts added this to the Update Benchmarks milestone Sep 30, 2024
@ajpotts
Copy link
Contributor Author

ajpotts commented Sep 30, 2024

Setting setuptools==66.1.1 removes the DeprecationWarning: pkg_resources is deprecated as an API. As discussed here:
https://stackoverflow.com/questions/76043689/pkg-resources-is-deprecated-as-an-api

@ajpotts
Copy link
Contributor Author

ajpotts commented Sep 30, 2024

The bug seems to originate at the global variable updates here:
https://github.com/Bears-R-Us/arkouda/blob/master/benchmark_v2/str_locality_benchmark.py#L40
and here:
https://github.com/Bears-R-Us/arkouda/blob/master/benchmark_v2/str_locality_benchmark.py#L44

The error disappears with the use of the pytest -s flag:
python3 -m pytest -c benchmark.ini --benchmark-autosave --benchmark-storage=file://benchmark_v2/.benchmarks --size=10 -s
This flag disables all capturing:
https://docs.pytest.org/en/stable/how-to/capture-stdout-stderr.html

@ajpotts
Copy link
Contributor Author

ajpotts commented Sep 30, 2024

Here is a related PR: #2279

ajpotts added a commit to ajpotts/arkouda that referenced this issue Sep 30, 2024
ajpotts added a commit to ajpotts/arkouda that referenced this issue Sep 30, 2024
ajpotts added a commit to ajpotts/arkouda that referenced this issue Sep 30, 2024
ajpotts added a commit to ajpotts/arkouda that referenced this issue Sep 30, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 30, 2024
)

* Closes #3793:  make benchmark errors

* Closes #3797: benchmark_v2/str_locality_benchmark.py throws errors.

---------

Co-authored-by: Amanda Potts <[email protected]>
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

Successfully merging a pull request may close this issue.

1 participant