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]: ResourceWarning: unclosed file #135

Closed
valentinsulzer opened this issue Feb 9, 2022 · 1 comment
Closed

[Bug]: ResourceWarning: unclosed file #135

valentinsulzer opened this issue Feb 9, 2022 · 1 comment
Labels
wontfix This will not be worked on

Comments

@valentinsulzer
Copy link
Member

liionpack Version

0.2.1

Python Version

3.9

Describe the bug

Lots of ResourceWarning about unclosed files when running the unit tests

Steps to Reproduce

Run python -m unittest

Expected behaviour

No warnings

Relevant log output

/usr/local/Caskroom/miniforge/base/envs/lipack/lib/python3.9/site-packages/ray/node.py:993: ResourceWarning: unclosed file <_io.BufferedWriter name=35>
  self._kill_process_impl(
/usr/local/Caskroom/miniforge/base/envs/lipack/lib/python3.9/asyncio/selector_events.py:248: ResourceWarning: unclosed file <_io.FileIO name='/tmp/ray/session_2022-02-09_11-11-24_988045_16608/logs/redis.out' mode='ab' closefd=True>
  transport = self._transports[fileno]
/usr/local/Caskroom/miniforge/base/envs/lipack/lib/python3.9/asyncio/selector_events.py:248: ResourceWarning: unclosed file <_io.FileIO name='/tmp/ray/session_2022-02-09_11-11-24_988045_16608/logs/redis.err' mode='ab' closefd=True>
  transport = self._transports[fileno]
/usr/local/Caskroom/miniforge/base/envs/lipack/lib/python3.9/asyncio/selector_events.py:248: ResourceWarning: unclosed file <_io.FileIO name='/tmp/ray/session_2022-02-09_11-11-24_988045_16608/logs/redis-shard_0.out' mode='ab' closefd=True>
  transport = self._transports[fileno]
/usr/local/Caskroom/miniforge/base/envs/lipack/lib/python3.9/asyncio/selector_events.py:248: ResourceWarning: unclosed file <_io.FileIO name='/tmp/ray/session_2022-02-09_11-11-24_988045_16608/logs/redis-shard_0.err' mode='ab' closefd=True>
  transport = self._transports[fileno]
/usr/local/Caskroom/miniforge/base/envs/lipack/lib/python3.9/site-packages/ray/node.py:913: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/ray/session_2022-02-09_11-11-24_988045_16608/logs/gcs_server.out' mode='a' encoding='utf-8'>
  self.start_gcs_server()
/usr/local/Caskroom/miniforge/base/envs/lipack/lib/python3.9/site-packages/ray/node.py:913: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/ray/session_2022-02-09_11-11-24_988045_16608/logs/gcs_server.err' mode='a' encoding='utf-8'>
  self.start_gcs_server()
/usr/local/Caskroom/miniforge/base/envs/lipack/lib/python3.9/site-packages/ray/node.py:915: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/ray/session_2022-02-09_11-11-24_988045_16608/logs/monitor.out' mode='a' encoding='utf-8'>
  self.start_monitor()
/usr/local/Caskroom/miniforge/base/envs/lipack/lib/python3.9/site-packages/ray/node.py:915: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/ray/session_2022-02-09_11-11-24_988045_16608/logs/monitor.err' mode='a' encoding='utf-8'>
  self.start_monitor()
/usr/local/Caskroom/miniforge/base/envs/lipack/lib/python3.9/site-packages/ray/node.py:957: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/ray/session_2022-02-09_11-11-24_988045_16608/logs/raylet.out' mode='a' encoding='utf-8'>
  self.start_raylet(plasma_directory, object_store_memory)
/usr/local/Caskroom/miniforge/base/envs/lipack/lib/python3.9/site-packages/ray/node.py:957: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/ray/session_2022-02-09_11-11-24_988045_16608/logs/raylet.err' mode='a' encoding='utf-8'>
  self.start_raylet(plasma_directory, object_store_memory)

Additional context

No response

@valentinsulzer valentinsulzer added the bug Something isn't working label Feb 9, 2022
@TomTranter
Copy link
Collaborator

This issue is in ray itself and occurs for us when running unittests but not when running the same scripts interactively in spyder. There is a PR open ray-project/ray#22419 to fix but has gone stale

@TomTranter TomTranter added wontfix This will not be worked on and removed bug Something isn't working labels May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants