-
Notifications
You must be signed in to change notification settings - Fork 469
Adds a decorator to profile individual functions and write the results to Weka. #964
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
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 504a8d3.
Code Review: Profiling Decorator ImplementationOverviewThis PR adds a profiling decorator and timing instrumentation to the vLLM processing pipeline. The changes include:
Code Quality & Best Practices✅ Positive Aspects
🔧 Areas for Improvement1. Hard-coded Path Issue (Critical) profile_path = f"/weka/oe-adapt-default/allennlp/deletable_checkpoint_states/finbarrt/{git_commit}_{func.__name__}.pstats"
base_path = os.environ.get("PROFILE_OUTPUT_DIR", "/tmp/profiles")
profile_path = f"{base_path}/{git_commit}_{func.__name__}.pstats"2. Example Code Bug @profile("example.pstats") # ❌ Decorator doesn't accept arguments
def example_function():Should be: @profile # ✅ No arguments needed
def example_function():3. Import Organization Potential Bugs & Issues🚨 High Priority
|
Code Review Feedback📋 SummaryThis PR adds a profiling decorator to measure function performance and writes results to Weka storage. Overall, the implementation is functional but has several areas for improvement. 🎯 Code Quality & Best Practices✅ Strengths:
|
Code ReviewI've reviewed your profiling decorator PR and here are my findings: ✅ Positive Aspects
🐛 Bugs & Issues
🔒 Security Concerns
🚀 Performance Considerations
🧪 Test Coverage
💡 Recommendations
🎯 Minor Improvements
Overall, this is a useful addition for performance profiling, but needs some security hardening and test coverage before merging. |
No description provided.