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

(TBV) fix: memory limit #203

Closed
wants to merge 1 commit into from
Closed

Conversation

YuriCat
Copy link
Contributor

@YuriCat YuriCat commented Jun 1, 2021

Does repeatedly checking memory cost much?


while psutil.virtual_memory().percent >= 95:
if 'memory_over' not in self.flags:
warnings.warn("memory usage %.1f%% with buffer size %d" % (mem_used_ratio * 100, len(self.trainer.episodes)))
Copy link
Member

@ikki407 ikki407 Jun 1, 2021

Choose a reason for hiding this comment

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

Is mem_used_ratio defined anywhere?

Does there exist a way not to use self.flags? ie. "once" (I'm thinking...)

Copy link
Member

@ikki407 ikki407 Jun 1, 2021

Choose a reason for hiding this comment

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

related?
https://stackoverflow.com/a/22661838/10809665

Repetitions of a particular warning for the same source location are typically suppressed.

https://docs.python.org/3/library/warnings.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops

@ikki407
Copy link
Member

ikki407 commented Jun 2, 2021

Thank you for your coding. #204 has been merged!

@YuriCat YuriCat closed this Jun 2, 2021
@YuriCat YuriCat deleted the fix/memory_limit branch February 11, 2022 18:04
This pull request was closed.
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.

2 participants