-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
Evaluation Schema + a necessary revamp #118
Conversation
@Rohan-G you can start having a look in the main files. Starting with the schema. I'll push working changes soon. |
8632f70
to
df4462b
Compare
0bee168
to
603a4d3
Compare
fix: refactor; add sample evaluation.json fix: update gitignore and rename ignored folder fix: setup skeleton; refactor
…; wip pass instance
fix: refactor; connect evaluation schema fix: checked validation using evaluation schema
…ther; move constants/configs to better places; fix: refactor; move instance ops to core; minor changes refactor: extract tuning config from instance fix: add screeninfo for simple window info
fix: evaluation schema fixes
603a4d3
to
16c3c5c
Compare
The changes include(wip list):
|
16c3c5c
to
4070878
Compare
4070878
to
8169a81
Compare
6558b86
to
278d482
Compare
fix: compress images
278d482
to
3692500
Compare
FORMAT = "%(message)s" | ||
|
||
# TODO: set logging level from config.json dynamically |
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.
Env variable would be better.
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.
will add in a later PR
src/evaluation.py
Outdated
import ast | ||
import os | ||
import re | ||
from copy import deepcopy | ||
from fractions import Fraction | ||
|
||
import cv2 | ||
import pandas as pd | ||
from rich.table import Table | ||
|
||
from src.logger import console, logger | ||
from src.schemas.evaluation_schema import ( | ||
BONUS_SECTION_PREFIX, | ||
DEFAULT_SECTION_KEY, | ||
MARKING_VERDICT_TYPES, | ||
QUESTION_STRING_REGEX_GROUPS, | ||
) | ||
from src.utils.parsing import get_concatenated_response, open_evaluation_with_validation |
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.
Re-org imports
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.
It seems like isort hook and black standards is keeping the same order as earlier.
It should sort it alphabetically, but oddly it's not.
Moving import cv2
to line 2 again moves it back to line 7
src/evaluation.py
Outdated
def parse_float_or_fraction(result): | ||
if type(result) == str and "/" in result: | ||
result = float(Fraction(result)) | ||
else: | ||
result = float(result) | ||
return result |
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.
move to appropriate place (maybe utils?)
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.
addressing this in PR#3 now
@@ -0,0 +1,598 @@ | |||
import ast |
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.
A couple of articles that might be useful for refactoring this file:
https://dzone.com/articles/the-stepdown-rule
https://dzone.com/articles/slap-your-methods-and-dont-make-me-think
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.
Will do via PR#3
* fix: load answer key from image with working samples * fix: pytests set up with snapshots for all samples * fix: run sample1 on pre-commit; run all tests on pre-push fix: add default_install_hook_types fix: add explicit stages * fix: update snapshots * fix: bug fixes * [Feature] Simplify template jsons (#127) * fix: update snapshots feat: simplify template schema and block logic; consume it; use fields terminology; update all samples fix: bug fixes * fix: refactor template.py; minor template json cleanup * fix: changes after updating wiki * feat: setup tests for template validations; fixed few bugs fix: renaming fix: test * fix: refactor fix: refactor tests structure and add utils * fix: minor fixes * fix: reorder imports; rename question -> field * fix: review changes * fix: remove streak logic
Fixes #89
This PR attempts to provide a generic solution for evaluation.
This is PR#1 of a chained PR.
Next