open-compass / open-compass/opencompass
[Bug] The conflict between `datasets>=2.20.0` and `pandas<2.0.0`
Open
@MaiziXiao is already working on this.
Since Aug 9, 2024.
- Dominant language
- Python
- Stars
- 7.5k
- Forks
- 869
- Avg merge
- 17h 52m
- Merged PRs (30d)
- 13
Description
Prerequisite
- I have searched Issues and Discussions but cannot get the expected help.
- The bug has not been fixed in the latest version.
Type
I'm evaluating with the officially supported tasks/models/datasets.
Environment
Refer to following code snippet:
Consider of the function datasets.packaged_modules.json.json.Json._generate_tables in datasets :
# for datasets v2.20.0
try:
with open(
file, encoding=self.config.encoding, errors=self.config.encoding_errors
) as f:
df = pd.read_json(f, dtype_backend="pyarrow")
except ValueError:
logger.error(f"Failed to load JSON from file '{file}' with error {type(e)}: {e}")
raise e
# =================================================================================
for datasets v2.18.0
try:
with open(
file, encoding=self.config.encoding, errors=self.config.encoding_errors
) as f:
dataset = json.load(f)
except json.JSONDecodeError:
logger.error(f"Failed to read file '{file}' with error {type(e)}: {e}")
raise e
More specific, consider of this usage for datasets==2.20.0:
The pandas<2.0.0 does not support the usage: pd.read_json(f, dtype_backend="pyarrow"),
Can you remove the restriction for pandas<2.0.0 in the runtime requirements ? or set datasets < 2.20.0
Reproduces the problem - code/configuration sample
none
Reproduces the problem - command or script
none
Reproduces the problem - error message
none
Other information
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.