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

write_parquet filesystem error #298

Open
Eliseliuaphp opened this issue May 28, 2024 · 0 comments
Open

write_parquet filesystem error #298

Eliseliuaphp opened this issue May 28, 2024 · 0 comments

Comments

@Eliseliuaphp
Copy link

Eliseliuaphp commented May 28, 2024

Description

Write_parquet connexion to hdfs impossible due to filesystem error
The problem was solved when adding file_system arg in the write_parquet function

How to reproduce the bug

import edsnlp

df=pd.DataFrame(data=[('a',1,'test'),
                     ('a',1,'test'),
                     ('a',1,'test'),
                     ('a',1,'test'),
                     ('a',1,'test'),
                     ('a',1,'test'),
                     ('a',1,'test')],
                     columns=['name','id','test'])



docs=edsnlp.data.from_pandas(df)
edsnlp.data.write_parquet(docs, 'hdfs://bbsedsi/user/<PATH_TO_PARQUET>')

Solved the problem

import fsspec

hdfs = fsspec.get_filesystem_class("hdfs")()

docs=edsnlp.data.from_pandas(df)
edsnlp.data.write_parquet(docs, 'hdfs://user/<PATH_TO_PARQUET>', filesystem=hdfs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant