-
Notifications
You must be signed in to change notification settings - Fork 0
π§Ή Rename auto-extracted methods in evaluate_baseline_metrics.py #112
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: staging
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -261,9 +261,9 @@ def main(): | |||||
| evaluator = BaselineMetricsEvaluator() | ||||||
|
|
||||||
| if args.dry_run: | ||||||
| return _extracted_from_main_25(evaluator) | ||||||
| return _run_dry_run_evaluation(evaluator) | ||||||
| if args.scan_all: | ||||||
| return _extracted_from_main_68(evaluator) | ||||||
| return _scan_all_datasets(evaluator) | ||||||
| if args.scan_all_s3: | ||||||
| return _scan_s3_datasets(evaluator, args.scan_all_s3) | ||||||
| if args.input_file: | ||||||
|
|
@@ -410,8 +410,7 @@ def _scan_s3_datasets(evaluator, s3_prefix: str) -> int: | |||||
| return 0 | ||||||
|
|
||||||
|
|
||||||
| # TODO Rename this here and in `main` | ||||||
| def _extracted_from_main_68(evaluator): | ||||||
| def _scan_all_datasets(evaluator): | ||||||
| logger.info("Scanning all dataset directories...") | ||||||
| all_results: dict[str, Any] = {} | ||||||
|
|
||||||
|
|
@@ -441,8 +440,7 @@ def _extracted_from_main_68(evaluator): | |||||
| return 0 | ||||||
|
|
||||||
|
|
||||||
| # TODO Rename this here and in `main` | ||||||
| def _extracted_from_main_25(evaluator): | ||||||
| def _run_dry_run_evaluation(evaluator): | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion | π Major Add type hints to function signature. The function signature lacks explicit type annotations for the parameter and return type. As per coding guidelines, prefer explicit types. π Proposed fix to add type hints-def _run_dry_run_evaluation(evaluator):
+def _run_dry_run_evaluation(evaluator: BaselineMetricsEvaluator) -> int:π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||
| logger.info("Running DRY RUN evaluation...") | ||||||
| mock_data = [ | ||||||
| { | ||||||
|
|
||||||
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.
π οΈ Refactor suggestion | π Major
Add type hints to function signature.
The function signature lacks explicit type annotations for the parameter and return type. As per coding guidelines, prefer explicit types.
π Proposed fix to add type hints
π Committable suggestion
π€ Prompt for AI Agents