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

fix readme.md & evaluator.py #40

Merged
merged 4 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading