Skip to content

Commit

Permalink
Merge pull request #119 from sbintuitions/smart_open
Browse files Browse the repository at this point in the history
Use `smart_open` for jsonl loading
  • Loading branch information
ryokan0123 authored Jan 9, 2025
2 parents f9b260a + 8661c70 commit 77d6a07
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 1 deletion.
1 change: 1 addition & 0 deletions flexeval/core/chat_dataset/template_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import datasets
from jinja2 import Template
from smart_open import open

from flexeval.core.utils.jinja2_utils import JINJA2_ENV

Expand Down
1 change: 1 addition & 0 deletions flexeval/core/generation_dataset/template_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import datasets
from jinja2 import Template
from smart_open import open

from flexeval.core.utils.jinja2_utils import JINJA2_ENV

Expand Down
1 change: 1 addition & 0 deletions flexeval/core/reward_bench_dataset/template_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import datasets
from jinja2 import Template
from smart_open import open

from flexeval.core.utils.jinja2_utils import JINJA2_ENV

Expand Down
2 changes: 2 additions & 0 deletions flexeval/core/text_dataset/jsonl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import json
from os import PathLike

from smart_open import open

from .base import TextDataset, TextInstance


Expand Down
101 changes: 100 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ loguru = "^0.7.2"
wandb = {version = "^0.17.2", optional = true}
pyarrow = "16.1.0" # set the version because we get "Unable to find installation candidates" with 17.0.0
scipy = "1.13.0"
smart-open = "^7.1.0"

[tool.poetry.extras]
vllm = ["vllm"]
Expand Down

0 comments on commit 77d6a07

Please sign in to comment.