Skip to content

Conversation

@Thomas-MMJ
Copy link

@Thomas-MMJ Thomas-MMJ commented Dec 13, 2022

extract_lora_ups_down currently returns a list, by returning a generator we can save some memory. With this change I less frequently get an OOM during saves.

… of a list

extract_lora_ups_down currently returns a list, by returning a generator we can save some memory
@cloneofsimo
Copy link
Owner

Quick question, was this be compatible with, for example, CLIs and so on?

@Thomas-MMJ
Copy link
Author

CLI? Command line interface or some other acronym? If you mean command line interface then yes. If not, then please clarify what acronym you mean. Generators are a widely used python structure, you can learn more about them here,

https://wiki.python.org/moin/Generators

They have the benefit of less memory usage and you can start consuming them while they are being created, so have shorter runtime.

@cloneofsimo
Copy link
Owner

Can you change this to dev branch? Thanks

@Thomas-MMJ
Copy link
Author

okay it is now PR #46

@Thomas-MMJ Thomas-MMJ closed this Dec 15, 2022
@Thomas-MMJ Thomas-MMJ deleted the patch-1 branch December 15, 2022 19:42
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