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

Add progress bar to filesystemblob loader, update pytest config for unit tests #4212

Merged
merged 7 commits into from
May 8, 2023

Conversation

eyurtsev
Copy link
Collaborator

@eyurtsev eyurtsev commented May 6, 2023

This PR adds:

  • Option to show a tqdm progress bar when using the file system blob loader
  • Update pytest run configuration to be stricter
  • Adding a new marker that checks that required pkgs exist

@eyurtsev eyurtsev changed the title Adding progress bar, updating pytest settings Add progress bar to filesystemblob loader, update pytest config for unit tests May 7, 2023
@eyurtsev eyurtsev marked this pull request as ready for review May 7, 2023 15:51
tests/unit_tests/conftest.py Outdated Show resolved Hide resolved


def _make_iterator(
length_func: Callable[[], int], show_progress: bool = False
Copy link
Contributor

Choose a reason for hiding this comment

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

out of curiosity can length_func not just be called when passed into this function (so arg would just be length instead of length_func)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It forces us to iterate through all the files on the file system, which is unnecessary if we're not using tqdm to show the progress. So we pass a function so we can calculate the length on the condition that we want to use tqdm

Copy link
Contributor

Choose a reason for hiding this comment

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

now that's big brain 😻

@eyurtsev eyurtsev merged commit aa11f7c into master May 8, 2023
@eyurtsev eyurtsev deleted the eugene/add_progress_bar branch May 8, 2023 20:15
EandrewJones pushed a commit to Oogway-Technologies/langchain that referenced this pull request May 9, 2023
…nit tests (langchain-ai#4212)

This PR adds:

* Option to show a tqdm progress bar when using the file system blob loader
* Update pytest run configuration to be stricter
* Adding a new marker that checks that required pkgs exist
jpzhangvincent pushed a commit to jpzhangvincent/langchain that referenced this pull request May 12, 2023
…nit tests (langchain-ai#4212)

This PR adds:

* Option to show a tqdm progress bar when using the file system blob loader
* Update pytest run configuration to be stricter
* Adding a new marker that checks that required pkgs exist
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