-
Notifications
You must be signed in to change notification settings - Fork 64
Major UX improvements for credit-scorer
: simplified workflows, unified visualizations, and user-friendly defaults
#236
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
Conversation
Create models directory before saving model to prevent FileNotFoundError when running training pipeline. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Connect the --auto-approve flag to the actual approval logic by checking DEPLOY_APPROVAL, APPROVER, and APPROVAL_RATIONALE environment variables in the approve_deployment step. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Document the required credit-scoring-secrets Modal secret for deployment pipeline, including Slack credentials needed for EU AI Act compliance incident reporting. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Enable the --all flag to run feature engineering, training, and deployment pipelines sequentially with proper output chaining between steps. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Extract real deployment URLs from deployment_info parameter structure - Handle dictionary return from load_risk_register() by extracting 'Risks' sheet - Fix indentation and structure in risk management section - Resolve "Risk level information not found" issue by properly accessing risk data 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Move --all flag handling to beginning of main() function - Remove direct artifact passing between pipelines to avoid Pydantic validation errors - Let ZenML automatically fetch latest artifacts from artifact store - Enables successful execution of complete workflow: feature → training → deployment 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add --all flag as the primary recommended command for running complete workflow - Show --all with --auto-approve for seamless execution - Reorganize commands to emphasize complete workflow over individual pipelines - Add --all --no-cache example for additional pipeline options 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add generate_risk_visualization() function to create styled HTML report - Update risk_assessment step to return tuple: (risk_scores_dict, risk_visualization_html) - Add RISK_VISUALIZATION constant to annotations - Update training pipeline and run.py to handle new return signature - Visualization includes overall risk score, component risks, and detailed hazard breakdown - Color-coded risk levels (LOW/MEDIUM/HIGH) with severity badges for hazards - Professional styling with gradient header and responsive card layout 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Migrate all HTMLString artifacts to use centralized CSS styling for improved maintainability and visual consistency across EU AI Act compliance reports. Key changes: - Updated eval.py to use shared CSS classes for model evaluation dashboard - Migrated generate_sbom.py SBOM visualization to shared styling - Converted post_run_annex.py Annex IV documentation to use shared CSS - Updated dashboard.py compliance dashboard with unified styling - Enhanced risk_assessment.py with shared CSS components Benefits: - Consistent styling across all compliance visualizations - Reduced CSS duplication from ~500+ lines of inline styles - Improved maintainability with centralized style management - Enhanced visual consistency for EU AI Act reporting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Auto-approve is now the default behavior (use --manual-approve to disable) - Slack notifications are disabled by default (use --enable-slack to enable) - Modal secrets are now optional, only required when --enable-slack is used - Primary workflow is now just `python run.py --all` with no flags needed - Full EU AI Act compliance available via `python run.py --all --enable-slack` This makes the project much easier to test and get started with while keeping all compliance features available when explicitly requested. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
credit-scorer
: simplified workflows, unified visualizations, and user-friendly defaults
There was a problem hiding this 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 introduces major UX improvements to the credit scorer project by simplifying deployment workflows, unifying HTML visualizations with shared CSS, and enhancing risk assessment and SBOM generation. Key changes include removing verbose CLI flags (auto‐approve now defaults), refactoring inline styles into shared templates, and updating return types to support new visualizations.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/utils/visualizations/eval.py | Refactored inline HTML styles and tables to use shared CSS template |
src/utils/visualizations/dashboard.py | Improved risk management sections and added new API documentation elements |
src/steps/training/train.py | Added directory creation before saving model artifacts |
src/steps/training/risk_assessment.py | Updated risk assessment to return a tuple with visualization HTML |
src/steps/deployment/generate_sbom.py | Added HTML generation for SBOM and updated return type |
src/steps/deployment/approve.py | Enhanced auto-approval logic with environment variable support |
src/pipelines/training.py, deployment.py | Adjusted unpacking to match updated return types and naming conventions |
src/constants/annotations.py | Renamed pipeline identifiers for clarity |
run.py | Modified CLI flags and environment setup for auto/manual approval and Slack notifications |
modal_app/modal_deployment.py | Conditional inclusion of secrets for Slack notifications with enhanced logging |
README.md | Updated instructions to reflect new workflow commands and configuration steps |
Comments suppressed due to low confidence (2)
credit-scorer/src/steps/training/risk_assessment.py:386
- The risk_assessment function now returns a tuple (risk_scores, risk_visualization) instead of a single dict. Ensure that all downstream callers and documentation are updated accordingly to handle the new return type.
return result, risk_visualization
credit-scorer/run.py:126
- The auto-approval behavior now relies on the manual_approve flag with auto-approve as default; consider updating inline comments or documentation to clearly explain this inversion and how environment variables are set.
auto_approve = not manual_approve
- Add strict validation to only accept "true" or "false" values for ENABLE_SLACK - In Modal app creation: raise ValueError and abort deployment for invalid values - In incident reporting: log error but gracefully continue with disabled Slack - Prevents silent failures from typos like "True", "1", "yes", or "tru" - Provides clear error messages showing expected vs actual values This improves user experience by catching configuration errors early rather than silently defaulting to disabled Slack notifications. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
This PR introduces significant user experience improvements to the EU AI Act compliance credit scoring project, making it much easier to get started while preserving all compliance features. The changes span workflow simplification, visual consistency improvements, and architectural enhancements.
🎯 Key Improvements
1. Simplified Deployment Workflow with User-Friendly Defaults
--auto-approve
flag needed for testingpython run.py --all
works out of the box--enable-slack
flag when you need complete EU AI Act featuresBefore:
python run.py --all --auto-approve --no-slack
(verbose, confusing)After:
python run.py --all
(clean, simple)2. Unified HTMLString Visualization System
shared_styles.css
file for all visualizations3. Enhanced Risk Assessment Visualization
4. Fixed Pipeline Execution Issues
--all
flag: Now properly executes complete feature → training → deployment workflow📊 Detailed Changes
Pipeline Execution Fixes
--all
flag handling: Moved logic to beginning of main() function to properly enable all pipelinesVisualization Architecture
src/utils/visualizations/shared_styles.css
with comprehensive component libraryshared_styles.py
with CSS loading and HTML template generation functionseval.py
- Model evaluation dashboardgenerate_sbom.py
- Software Bill of Materials visualizationpost_run_annex.py
- Annex IV technical documentationdashboard.py
- Compliance dashboardrisk_assessment.py
- Risk assessment reportsEnhanced Features
credit_scoring_*
prefix)Documentation & UX
--all
workflow🧪 Testing
All changes maintain backward compatibility while improving the user experience:
python run.py --all
works without any setup (new default behavior)python run.py --all --enable-slack
enables full compliance featurespython run.py --all --manual-approve
prompts for human approval🎨 Visual Improvements
The unified CSS system provides:
🚀 Migration Impact
This PR significantly improves the onboarding experience:
python run.py --all
The changes make the project much more approachable for new contributors and users while maintaining full EU AI Act compliance capabilities.
🤖 Generated with Claude Code