Skip to content

Conversation

@dameikle
Copy link
Collaborator

@dameikle dameikle commented May 17, 2025

This pull request refactors and improves error handling and logging in the docs/scripts/gen_popular_issues.py script. The changes include introducing a reusable empty DataFrame, adding detailed logging for debugging, and ensuring graceful handling of edge cases such as missing or filtered data.

Refactoring and code reuse:

  • Introduced a constant EMPTY_FRAME to represent an empty DataFrame, replacing inline DataFrame creation for better reusability and readability. [1] [2]

Enhanced logging and debugging:

  • Added logging to display the number of issues fetched in each batch, the total number of issues processed, and the number of issues filtered out. [1] [2]
  • Included warnings and detailed DataFrame information when the State column is missing, to aid in diagnosing issues with the data.

Improved error handling:

  • Ensured the function returns EMPTY_FRAME when no issues data is collected, avoiding potential errors downstream.

@dameikle dameikle self-assigned this May 17, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented May 17, 2025

CodSpeed Performance Report

Merging #1145 will improve performances by ×24

Comparing docs_popular_issues_failures (71d7033) with develop (6dd63f8)

Summary

⚡ 1 improvements

Benchmarks breakdown

Benchmark BASE HEAD Change
test_cache_time 15,826.7 ms 670.8 ms ×24

@github-actions
Copy link

Documentation for this PR has been built. You can view it at: https://distilabel.argilla.io/pr-1145/

@dameikle dameikle merged commit 4bfd01f into develop May 17, 2025
2 of 7 checks passed
@dameikle dameikle deleted the docs_popular_issues_failures branch May 17, 2025 16:45
@dameikle dameikle restored the docs_popular_issues_failures branch May 17, 2025 16:55
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.

1 participant