Closed XiangyanChen closed 4 years ago
can you give some more details please? e.g.
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)
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
When I call the function 'compute_metrics', I notice that system memory is unable to free. Could u give me some advice on it?