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

ResourceWarning: Enable tracemalloc to get the object allocation traceback #25

Open
sudhanshu746 opened this issue Jun 19, 2024 · 1 comment

Comments

@sudhanshu746
Copy link

tokens_map = json.load(open(str(self.model_dir / "special_tokens_map.json")
You have opened special token file, used it, but then forgot to close the file.

when Python closes it for you when it notices that the file object is dead, but this only occurs after some unknown time has elapsed. Thus in recent versions, Python also prints a ResourceWarning when it does that.

@albertauyeung
Copy link

I think this issue is fixed in the main branch now. @PrithivirajDamodaran will there be a new release soon?

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

No branches or pull requests

2 participants