Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #40 from 4N3MONE/main
Browse files Browse the repository at this point in the history
fix readme.md & evaluator.py
  • Loading branch information
StableFluffy authored Jul 1, 2024
2 parents 016eaa3 + 331b8fd commit d639380
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pr 적극 환영합니다.
EEVE 템플릿, GPU 0,1 사용, model_len 4096
```
python generator.py --model yanolja/EEVE-Korean-Instruct-10.8B-v1.0 --gpu_devices 0,1 --model_len 4096
python judgement.py -o yanolja_EEVE-Korean-Instruct-10.8B-v1.0.jsonl -k sk-somethingsomething -t 30
python evaluator.py -o yanolja_EEVE-Korean-Instruct-10.8B-v1.0.jsonl -k sk-somethingsomething -t 30
python score.py -p ./results/judge_HyperClovaX.jsonl
```

Expand Down
6 changes: 4 additions & 2 deletions evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_args():
return parser.parse_args()


def create_azure_client(api_key: str):
def create_openai_client(api_key: str):
return OpenAI(api_key=api_key)


Expand Down Expand Up @@ -145,13 +145,15 @@ def is_hidden(filepath: Path) -> bool:

def main():
args = get_args()
client = create_azure_client(args.openai_api_key)
client = create_openai_client(args.openai_api_key)

input_dir = Path(args.model_output_dir)
output_dir = Path("./evaluated")

# Filter out hidden files
json_files = [file for file in input_dir.rglob("*.jsonl") if not is_hidden(file)]
print(f"Found {len(json_files)} JSON files to process")


for file_path in json_files:
output_file_path = output_dir / file_path.relative_to(input_dir)
Expand Down

0 comments on commit d639380

Please sign in to comment.