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 option to disable progress bar in evaluate #1279

Merged

Conversation

freddiev4
Copy link
Contributor

@freddiev4 freddiev4 commented Sep 11, 2024

Hello there 👋 I noticed that there was no way to disable the progress bar and thought it'd nice to have the option to silence the tqdm call in the executor, as it doesn’t play nicely with logs and adds noise.

I've added the following changes:

Add show_progress flag to Executor class and update evaluate function to use it.

  • Executor Class Changes:

    • Add show_progress flag to the Executor class in src/ragas/executor.py.
    • Use the show_progress flag to control the display of the progress bar.
    • If show_progress is set to False, disable tqdm usage for displaying progress bars.
  • Evaluate Function Changes:

    • Add show_progress parameter to the evaluate function in src/ragas/evaluation.py.
    • Pass the show_progress flag to the Executor class during initialization in the evaluate function.

Hello there 👋 I noticed that there was no way to disable the progress bar and thought it'd nice to have the option to silence the `tqdm` call in the executor.

I've added the following changes:

Add `show_progress` flag to `Executor` class and update `evaluate` function to use it.

* **Executor Class Changes:**
  - Add `show_progress` flag to the `Executor` class in `src/ragas/executor.py`.
  - Use the `show_progress` flag to control the display of the progress bar.
  - If `show_progress` is set to False, disable `tqdm` usage for displaying progress bars.

* **Evaluate Function Changes:**
  - Add `show_progress` parameter to the `evaluate` function in `src/ragas/evaluation.py`.
  - Pass the `show_progress` flag to the `Executor` class during initialization in the `evaluate` function.
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Sep 11, 2024
@freddiev4 freddiev4 changed the title Add show_progress flag to Executor class Add option to disable progress bar in evaluate Sep 11, 2024
Copy link
Member

@jjmachan jjmachan left a comment

Choose a reason for hiding this comment

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

thanks a lot for this improvement @freddiev4 ❤️ 🙌🏽

@jjmachan jjmachan merged commit d452bbc into explodinggradients:main Sep 12, 2024
16 checks passed
shahules786 pushed a commit to shahules786/ragas that referenced this pull request Sep 12, 2024
…1279)

Hello there 👋 I noticed that there was no way to disable the
progress bar and thought it'd nice to have the option to silence the
`tqdm` call in the executor, as it doesn’t play nicely with logs and
adds noise.

I've added the following changes:

Add `show_progress` flag to `Executor` class and update `evaluate`
function to use it.

* **Executor Class Changes:**
- Add `show_progress` flag to the `Executor` class in
`src/ragas/executor.py`.
- Use the `show_progress` flag to control the display of the progress
bar.
- If `show_progress` is set to False, disable `tqdm` usage for
displaying progress bars.

* **Evaluate Function Changes:**
- Add `show_progress` parameter to the `evaluate` function in
`src/ragas/evaluation.py`.
- Pass the `show_progress` flag to the `Executor` class during
initialization in the `evaluate` function.
shahules786 pushed a commit to shahules786/ragas that referenced this pull request Sep 12, 2024
…1279)

Hello there 👋 I noticed that there was no way to disable the
progress bar and thought it'd nice to have the option to silence the
`tqdm` call in the executor, as it doesn’t play nicely with logs and
adds noise.

I've added the following changes:

Add `show_progress` flag to `Executor` class and update `evaluate`
function to use it.

* **Executor Class Changes:**
- Add `show_progress` flag to the `Executor` class in
`src/ragas/executor.py`.
- Use the `show_progress` flag to control the display of the progress
bar.
- If `show_progress` is set to False, disable `tqdm` usage for
displaying progress bars.

* **Evaluate Function Changes:**
- Add `show_progress` parameter to the `evaluate` function in
`src/ragas/evaluation.py`.
- Pass the `show_progress` flag to the `Executor` class during
initialization in the `evaluate` function.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants