Skip to content

overcome openpyxl dependency#238

Merged
ajassani merged 2 commits intomainfrom
fix/openpyxl_dep
Jul 23, 2025
Merged

overcome openpyxl dependency#238
ajassani merged 2 commits intomainfrom
fix/openpyxl_dep

Conversation

@ajassani
Copy link
Copy Markdown
Collaborator

No description provided.

@ajassani ajassani requested a review from Copilot July 23, 2025 03:34

This comment was marked as outdated.

@ajassani ajassani requested a review from Copilot July 23, 2025 03:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the openpyxl dependency from the package requirements and implements dynamic installation handling. The main purpose is to make openpyxl an optional dependency that is only required when generating Excel files, while also adding CSV output functionality as an alternative.

Key changes include:

  • Commenting out openpyxl from setup.py requirements
  • Adding dynamic openpyxl installation prompting in the performance report generator
  • Implementing CSV output as an alternative to Excel files

Reviewed Changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 4 comments.

File Description
setup.py Removes openpyxl as a required dependency by commenting it out
examples/generate_perf_report.py Adds dynamic openpyxl installation, CSV output functionality, and short kernel analysis features
examples/generate_perf_report.md Adds comprehensive documentation for the performance report generation script

Comment on lines 12 to +13

def main():
def request_install(package_name):
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

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

Prompting users to install packages via subprocess without validation poses security risks. Consider validating the package_name parameter to prevent arbitrary command execution.

Copilot uses AI. Check for mistakes.
choice = input(f"Do you want to install '{package_name}' via pip? [y/N]: ").strip().lower()
if choice == 'y':
try:
subprocess.check_call([sys.executable, "-m", "pip", "install", package_name])
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

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

Installing packages dynamically via subprocess without validation could allow execution of arbitrary commands if package_name is not properly sanitized.

Copilot uses AI. Check for mistakes.
# Generate base DataFrames
df_gpu_timeline = perf_analyzer.get_df_gpu_timeline()

# TODO: move this to the TreePerfAnalyzer class
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

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

This TODO comment indicates technical debt where logic should be moved to the TreePerfAnalyzer class for better code organization.

Copilot uses AI. Check for mistakes.

def get_dfs_short_kernels(perf_analyzer, short_kernel_threshold_us=10, histogram_bins=100, topk=None):
"""
TODO: move this to the TreePerfAnalyzer class
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

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

This TODO comment indicates technical debt where the function should be moved to the TreePerfAnalyzer class for better code organization.

Copilot uses AI. Check for mistakes.
@ajassani ajassani merged commit e39c289 into main Jul 23, 2025
1 check passed
@ajassani ajassani deleted the fix/openpyxl_dep branch July 23, 2025 03:54
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