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

Avoid logging in __del__ functions #76

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Avoid logging in __del__ functions #76

merged 1 commit into from
Dec 19, 2024

Conversation

ehsantn
Copy link
Collaborator

@ehsantn ehsantn commented Dec 18, 2024

Changes included in this PR

Fixes an issue I noticed when running examples on an AWS instance.

Exception ignored in: <function LazyArrowExtensionArray.__del__ at 0x7fc6700efb00>
Traceback (most recent call last):
  File "/home/bodo/.conda/envs/Bodo120/lib/python3.12/site-packages/bodo/pandas/arrow/array.py", line 131, in __del__
  File "/home/bodo/.conda/envs/Bodo120/lib/python3.12/site-packages/bodo/submit/utils.py", line 49, in debug_msg
AttributeError: 'NoneType' object has no attribute 'user_logging'

I think it's because logging during atexit is not safe. Adding logs here isn't that critical anyways.

Testing strategy

User facing changes

Checklist

  • Pipelines passed before requesting review. To run CI you must include [run CI] in your commit message.
  • I am familiar with the Contributing Guide
  • I have installed + ran pre-commit hooks.

@ehsantn ehsantn requested review from scott-routledge2 and IsaacWarren and removed request for scott-routledge2 December 18, 2024 22:48
Copy link
Contributor

@IsaacWarren IsaacWarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ehsan

Copy link
Contributor

@scott-routledge2 scott-routledge2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! In spawner.reset we also do some logging but it's in a try/except

@ehsantn ehsantn merged commit 827e909 into main Dec 19, 2024
18 of 19 checks passed
@ehsantn ehsantn deleted the ehsan/rm_del_logging branch December 19, 2024 00:57
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.

3 participants