Skip to content
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

Switch from pyzstd to zstandard #1514

Merged
merged 1 commit into from
Apr 2, 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
8 changes: 4 additions & 4 deletions evals/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
from collections.abc import Iterator
from functools import partial
from pathlib import Path
from typing import Any, List, Optional, Sequence, Text, Union
from typing import Any, BinaryIO, List, Optional, Sequence, Text, Union

import blobfile as bf
import lz4.frame
import pydantic
import pyzstd
import zstandard

logger = logging.getLogger(__name__)

Expand All @@ -37,11 +37,11 @@ def lz4_open(filename: str, mode: str = "rb", openhook: Any = open) -> lz4.frame
return lz4.frame.LZ4FrameFile(openhook(filename, mode), mode=mode)


def zstd_open(filename: str, mode: str = "rb", openhook: Any = open) -> pyzstd.ZstdFile:
def zstd_open(filename: str, mode: str = "rb", openhook: Any = open) -> BinaryIO:
if mode and "b" not in mode:
mode += "b"

return pyzstd.ZstdFile(openhook(filename, mode), mode=mode)
return zstandard.open(openhook(filename, mode), mode=mode, closefd=True)


def open_by_file_pattern(filename: Union[str, Path], mode: str = "r", **kwargs: Any) -> Any:
Expand Down
68 changes: 34 additions & 34 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,50 @@ version = "2.0.0.post1"
requires-python = ">=3.9"
readme = "README.md"
dependencies = [
"mypy",
"openai>=1.0.0",
"tiktoken",
"blobfile",
"aiolimiter",
"anthropic",
"backoff",
"numpy",
"snowflake-connector-python[pandas]",
"pandas",
"beartype==0.12.0",
"blobfile",
"chess",
"dacite",
"datasets",
"fire",
"pydantic",
"tqdm",
"types-tqdm",
"nltk",
"docker",
"evaluate",
"filelock",
"mock",
"fire",
"flask",
"google-generativeai",
"gymnasium",
"jiwer",
"langchain",
"langdetect",
'termcolor',
"lz4",
"pyzstd",
"pyyaml",
"sacrebleu",
"matplotlib",
"pytest",
"langchain",
"mock",
"mypy",
"networkx",
"nltk",
"numexpr",
"types-PyYAML",
"spacy-universal-sentence-encoder",
"jiwer",
"numpy",
"openai>=1.0.0",
"pandas",
"playwright==1.32.1",
"pydantic",
"pytest",
"pyyaml",
"sacrebleu",
"seaborn",
"snowflake-connector-python[pandas]",
"spacy-universal-sentence-encoder",
"statsmodels",
"termcolor",
"tiktoken",
"torch",
"dacite",
"playwright==1.32.1",
"evaluate",
"aiolimiter",
"beartype==0.12.0",
"flask",
"docker",
"gymnasium",
"networkx",
"chess",
"anthropic",
"google-generativeai",
"tqdm",
"types-PyYAML",
"types-tqdm",
"zstandard",
]

[project.urls]
Expand Down
Loading