Skip to content

Commit

Permalink
updating results to be out of 100
Browse files Browse the repository at this point in the history
  • Loading branch information
jluey1 committed Sep 16, 2024
1 parent 21a7232 commit b55a5e1
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 127 deletions.
11 changes: 5 additions & 6 deletions utils/eval_report_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import re

# Usage instructions (internal use only):
# TODO: Should this be checked into somewhere else?
# 1. Download the "reports" folder from blob storage and extract it to a local directory
# 2. Point release_directory_path to the release directory inside of the extracted "reports" folder
# 1. Download the "release" folder from blob storage and extract it to a local directory
# 2. Point release_directory_path to the release directory
# 3. Run 'python utils/eval_report_parsing.py'
# 4. The compiled results will be written to 'website/static/compiled_results.json'

Expand Down Expand Up @@ -50,7 +49,7 @@ def coallate_results(release_directory_path, config):
with open(file_path, 'r') as f:
file_contents = f.read()
scores = json.loads(file_contents)
if(name == "Object Detection"):
if(name == 'Object Detection (AP50)'):
scores = scores[0]
for metric in capability["metric"]:
scores = scores[metric]
Expand All @@ -69,7 +68,7 @@ def coallate_results(release_directory_path, config):
model = "GPT-4-1106-Preview"
model_scores.append({
"name": model,
"score": sum / num
"score": sum * 100.0 / num
})
data[modality]["capabilities"].append({
"name": name,
Expand All @@ -82,7 +81,7 @@ def coallate_results(release_directory_path, config):
json.dump(data, f, indent=2)

# Example usage
release_directory_path = 'C:\\Users\\jluey\\Downloads\\reports\\release'
release_directory_path = 'C:\\Users\\jluey\\Downloads\\release'
config_path = 'website\\static\\config.json'

coallate_results(release_directory_path, json.load(open(config_path)))
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const OverallVisualization = ({config}: {config: EurekaConfig}) => {
gridLineInterpolation: 'polygon',
lineWidth: 0,
min: 0,
max: 1,
max: 100,
},
legend: {
align: 'center',
Expand Down Expand Up @@ -136,7 +136,7 @@ const OverallVisualization = ({config}: {config: EurekaConfig}) => {
gridLineInterpolation: 'polygon',
lineWidth: 0,
min: 0,
max: 1,
max: 100,
},
legend: {
align: 'center',
Expand Down
Loading

0 comments on commit b55a5e1

Please sign in to comment.