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

Memory is unable to free #89

Closed
XiangyanChen opened this issue Nov 22, 2019 · 3 comments · Fixed by #90
Closed

Memory is unable to free #89

XiangyanChen opened this issue Nov 22, 2019 · 3 comments · Fixed by #90

Comments

@XiangyanChen
Copy link

When I call the function 'compute_metrics', I notice that system memory is unable to free. Could u give me some advice on it?

@temporaer
Copy link
Member

can you give some more details please? e.g.

  • which metrics are you using
  • which platform are you on,
  • how did you try to free memory? (ie which operation failed)

@XiangyanChen
Copy link
Author

can you give some more details please? e.g.

  • which metrics are you using
  • which platform are you on,
  • how did you try to free memory? (ie which operation failed)

while True:
metrics_dict = compute_metrics(hypothesis=hypothesis, references=references, no_skipthoughts=True,no_glove=True)

Everytime I call the function above, I found the memory usage keep increasing and I don't know how to free memory. Therefore I am seeking your help.(My program was running at ubuntu)

@juharris
Copy link
Contributor

juharris commented Nov 22, 2019

I believe I have solved the major reason for this. Sorry we thought we did things to stop this from happening. I'll have a PR coming soon but in the meantime you can use the object oriented version of the API which will also be faster if you're calling it many times because it pre-loads many things: https://github.com/Maluuba/nlg-eval#object-oriented-api-for-repeated-calls-in-a-script---multiple-examples (note that the input is lists, not filenames). You can see what the method you're currently calling does to read the files and just copy that to turn your files into lists.

Just to clarify your two options:

  1. Recommended: Use the object oriented API
  2. Wait for my pull request

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 a pull request may close this issue.

3 participants