Cannot load specific language in a streaming manner from the dataset

#13
by prateeky2806 - opened

Hi, I am trying to load only the python files from the dataset in a streaming manner. I am running the following command.

ds = datasets.load_dataset("bigcode/the-stack-dedup", data_dir="data/python", streaming=True, split="train", use_auth_token=True, )

When I print next(iter(ds)) I get this

{'content': '\nobj/fs/fs: 文件格式...di3+0x2d>\n', 'avg_line_length': 41.807215939687666, 'max_line_length': 93, 'alphanum_fraction': 0.48108480601782677, 'licenses': ['MIT'], 'repository_name': 'jasha64/OperatingSystems-lab', 'path': 'oslab6/obj/fs/fs.asm', 'size': 310984, 'lang': 'Assembly'}

The language seems to be assembly. I am unsure what I am doing wrong as I am following the command from the image in the dataset card. Can someone please help me?

I figured it out myself. I was using datasets==1.6, and after upgrading to datasets=2.7.1 it worked.

prateeky2806 changed discussion status to closed

Sign up or log in to comment