Try to access sys.stdin.fileno() only at runtime and not during import (#553)
Summary: Accessing sys.stdin.fileno() raises an error in multiple contexts (pytest, joblib, jupyter...). Thus accessing it at the top level of the file can cause other scripts to crash when they import fairseq. This is why it is moved inside the method of MultiprocessingPdb to only be accessed at runtime if needed. See Issue #517 Pull Request resolved: https://github.com/pytorch/fairseq/pull/553 Differential Revision: D14309284 Pulled By: myleott fbshipit-source-id: 6ca36f2053a86ebc02e2d6f025459c6a78c592e7
Loading
Please register or sign in to comment