Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Sep 5, 2025

This PR introduces a comprehensive issue reporting utility that helps users generate well-formatted GitHub issue reports programmatically. The utility addresses common challenges in bug reporting by automatically collecting system information and formatting reports according to cuDF's contributing guidelines.

New Functionality

The cudf.utils.issue_reporting module provides three main functions:

create_issue_report(title, description, error=None, minimal_example=None, output_file=None)

Creates comprehensive issue reports with system information, error details, and code examples:

import cudf

report = cudf.utils.create_issue_report(
    title="DataFrame.merge() fails with large datasets",
    description="Memory error occurs when merging DataFrames with 1M+ rows",
    minimal_example="""
    import cudf
    df1 = cudf.DataFrame({'id': range(1000000)})
    df2 = cudf.DataFrame({'id': range(1000000)})
    result = df1.merge(df2)  # Fails here
    """
)

report_error(error, context=None, title=None, minimal_example=None)

Generates issue reports specifically for exceptions with full stack traces:

try:
    df = cudf.DataFrame({'a': [1, 2, 3]})
    result = df.some_invalid_operation()
except Exception as e:
    report = cudf.utils.report_error(
        error=e,
        context="Attempting to call non-existent method"
    )

get_system_info()

Collects relevant system information including cuDF version, Python version, platform details, GPU information, and CUDA version.

Generated Report Format

Reports are formatted for GitHub issues and include:

  • System Information: cuDF version, Python version, OS, GPU details, CUDA version
  • Error Details: Exception type, message, and full traceback (when applicable)
  • Code Examples: Minimal reproducible examples in proper markdown code blocks
  • Structured Layout: Follows cuDF's issue template format

Implementation Details

  • Robust Error Handling: Gracefully handles missing dependencies (cupy, nvidia-smi, nvcc)
  • Lazy Loading: Uses __getattr__ in cudf.utils to avoid import overhead
  • File Output: Supports writing reports directly to files
  • No External Dependencies: Uses only standard library modules

Use Cases

This utility is particularly useful for:

  • Automated error reporting in applications using cuDF
  • Generating comprehensive bug reports with all necessary diagnostic information
  • Ensuring consistent issue format across the community
  • Reducing back-and-forth in issue triage by including complete environment details

Testing

Comprehensive test suite covering all functionality, including edge cases like missing dependencies and file I/O operations.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI assigned Copilot and vuule Sep 5, 2025
Copy link

copy-pr-bot bot commented Sep 5, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@vuule vuule closed this Sep 5, 2025
@Copilot Copilot AI changed the title [WIP] can you open an issue? Add programmatic issue reporting utility to cuDF Sep 5, 2025
Copilot finished work on behalf of vuule September 5, 2025 18:39
@Copilot Copilot AI requested a review from vuule September 5, 2025 18:39
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