Skip to content

Tips to reduce memory consumption in Auto-PyTorch #259

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

Closed
6 tasks
franchuterivera opened this issue Jun 17, 2021 · 1 comment
Closed
6 tasks

Tips to reduce memory consumption in Auto-PyTorch #259

franchuterivera opened this issue Jun 17, 2021 · 1 comment

Comments

@franchuterivera
Copy link
Contributor

  • We should not let the datamanager actively reside in memory when we are not using it. For example, there is no need to have a datamanager in smbo.
  • Also, after search has save the datamanager to disk, we can delete and garbage collect it.
  • We also should datacollect and challenge the need of datamanager in the evaluator
  • We should improve the cross validation handling of the out of fold predictions. Rather than having a list that contains the OOF predicitons here we should have a fixed array of n_samples created once at the beginning. OOF predictions from the k-fold model should be added smartly to this pre-existing array, something like self.Y_optimization[test_indices] = opt_pred. This ways predictions are sorted and can be used directly by ensemble selection without the need of saving this array
  • Calculating the train loss should be optional, not done by default here. We should prevent doing predict if not strictly needed.
  • As reported already by @nabenabe0928 the biggest contribution comes from import files. In particular, just doing import torch consumes 2Gb of peak virtual memory and the majority of times this happens is for mypy typing. We should encapsulate these calls under typing.TYPE_CHECKING and only import the strictly needed class from pytorch.
@nabenabe0928
Copy link
Collaborator

Hi, thanks for raising this issue, I will move this issue to another memory consumption issue and close this issue once.

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