Allow uncompiled strings as input to `checkScriptRaisesRegex` (#63901)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63901
cc gmagogsfm
Test Plan: Imported from OSS
Reviewed By: gmagogsfm
Differential Revision: D30579472
Pulled By: ansley
fbshipit-source-id: 59ee09c1f25278d4f6e51f626588251bd095c6ea