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

[dataset] fix stream is none #2310

Merged
merged 1 commit into from
Jan 22, 2024
Merged

[dataset] fix stream is none #2310

merged 1 commit into from
Jan 22, 2024

Conversation

Mddct
Copy link
Collaborator

@Mddct Mddct commented Jan 20, 2024

when tarfile open failed, stream will cause "UnboundLocalError: local variable 'stream' referenced before assignment"

@kobenaxie
Copy link
Contributor

建议用

with tarfile.open(fileobj=sample['stream'], mode="r:*") as stream:
    ...

@xingchensong
Copy link
Member

The unit test failure is attributed to the issue documented at microsoft/DeepSpeed#4984

@xingchensong
Copy link
Member

建议用

with tarfile.open(fileobj=sample['stream'], mode="r:*") as stream:
    ...

后面整体改io的时候再一并修改

@xingchensong xingchensong merged commit 4e4c407 into main Jan 22, 2024
5 of 6 checks passed
@xingchensong xingchensong deleted the Mddct-patch-1 branch January 22, 2024 06:13
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

Successfully merging this pull request may close these issues.

None yet

3 participants