Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Conversation

@seemethere
Copy link
Member

Fixes #1951

Copy link
Member

@osalpekar osalpekar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'm wondering how this escaped smoke tests?

Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but can we please get an ack from torchtext team that it is indeed the case. Also, why isn't there a torchdata dependency?

@joecummings
Copy link
Member

joecummings commented Oct 19, 2022

The dependency on regex is relatively recent, but yes I'm also confused as to how this escaped smoke tests. Looking into this now.

Also, it looks like you might need to add regex as a dependency here, as well:

CC @Nayef211 for question about Torchdata.

@seemethere
Copy link
Member Author

The dependency on regex is relatively recent, but yes I'm also confused as to how this escaped smoke tests. Looking into this now.

Also, it looks like you might need to add regex as a dependency here, as well:

CC @Nayef211 for question about Torchdata.

I'm pretty sure regex gets installed as a transitive dependency for the unittest workflows which might explain the discrepancy. Also the binary builds don't run smoke tests (like importing torchtext) so it's understandable how this wasn't caught.

@seemethere
Copy link
Member Author

seemethere commented Oct 19, 2022

As well, why do we even need this dependency in the first place? Is the built-in re module not good enough for the usecase of findall?

cc @rshraga

@Nayef211
Copy link
Contributor

As well, why do we even need this dependency in the first place? Is the built-in re module not good enough for the usecase of findall?

cc @rshraga

I'm not 100% sure why we didn't use re but you can find some relevant discussions around adding using regex in the internal diff thread . IIUC this is a temporary addition and will be removed as soon as @rshraga migrates the regex pattern matching logic to a C++ operator.

Also, why isn't there a torchdata dependency?

@malfet see #1702 where we tagged you guys in asking what the process would be to make torchdata a required dep. I believe there was also an internal chat thread about this but I'm not sure there was a resolution.

@seemethere
Copy link
Member Author

As well, why do we even need this dependency in the first place? Is the built-in re module not good enough for the usecase of findall?
cc @rshraga

I'm not 100% sure why we didn't use re but you can find some relevant discussions around adding using regex in the internal diff thread . IIUC this is a temporary addition and will be removed as soon as @rshraga migrates the regex pattern matching logic to a C++ operator.

Also, why isn't there a torchdata dependency?

@malfet see #1702 where we tagged you guys in asking what the process would be to make torchdata a required dep. I believe there was also an internal chat thread about this but I'm not sure there was a resolution.

Actually switching it to re provides no negative results so I'm just going to submit a new PR to do that instead

@seemethere
Copy link
Member Author

Closing in favor of #1953

@seemethere seemethere closed this Oct 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when importing torchtext: "No module named 'regex'"

7 participants