Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

More efficiently use diskspace#1012

Merged
mergify[bot] merged 1 commit intoinstructlab:maininstructlab/instructlab:mainfrom
derekhiggins:use_less_diskderekhiggins/instructlab:use_less_diskCopy head branch name to clipboard
May 21, 2024
Merged

More efficiently use diskspace#1012
mergify[bot] merged 1 commit intoinstructlab:maininstructlab/instructlab:mainfrom
derekhiggins:use_less_diskderekhiggins/instructlab:use_less_diskCopy head branch name to clipboard

Conversation

@derekhiggins
Copy link
Contributor

In order to allow ilab to run e2e on colab where diskspace is limited we move rather then copy large files around, also rm files we're done with to save space for the next step.

Fix #1011

@derekhiggins derekhiggins force-pushed the use_less_disk branch 3 times, most recently from 346387f to 5479f8e Compare April 30, 2024 21:31
@mergify mergify bot added the testing Relates to testing label Apr 30, 2024
@derekhiggins derekhiggins force-pushed the use_less_disk branch 2 times, most recently from fd90dbe to 0f3e9e4 Compare April 30, 2024 22:01
linux_train_mock,
is_macos_with_m_chip_mock,
):
# pylint: disable=consider-using-with
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you may be able to avoid arguing with the linter about this if you declare a helper function instead of using a lambda?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, the lambda has been replaced

@derekhiggins derekhiggins changed the title More efficienlty use diskspace More efficiently use diskspace May 9, 2024
Comment on lines 1057 to 1058
if os.path.exists(final_results_dir):
shutil.rmtree(final_results_dir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit uncomfortable blindly removing this whole directory. I'd rather only operate on exactly the files we know are relevant to the current run of ilab and not make assumptions about what can be removed otherwise. I just want to avoid any surprising destructive behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually looking at this again I think I can just remove these two lines. The large model files that it contained is now moved instead of copied so this directory isn't taking up a lot of space.

@mergify mergify bot added the ci-failure PR has at least one CI failure label May 17, 2024
In order to allow ilab to run e2e on colab where diskspace
is limited we move rather then copy large files around, also
rm files we're done with to save space for the next step.

Fix instructlab#1011

Signed-off-by: Derek Higgins <derekh@redhat.com>
@mergify mergify bot removed the ci-failure PR has at least one CI failure label May 17, 2024
for file in glob(final_results_dir + "/*.safetensors"):
os.remove(file)

shutil.move(final_results_dir + "/ggml-model-f16.gguf", gguf_models_file)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only if you have to make another change anyway, would be good to make this os.path.join(). I know this isn't new code though, so it's not worth blocking over

@mergify mergify bot added the one-approval PR has one approval from a maintainer label May 20, 2024
@mergify mergify bot merged commit 0429bbc into instructlab:main May 21, 2024
@mergify mergify bot removed the one-approval PR has one approval from a maintainer label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Relates to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Training uses up all available disk space in colab

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.