File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 1+ import warnings
2+
3+ import pkg_resources
4+
15import gobbli .augment as augment
26import gobbli .dataset as dataset
37import gobbli .experiment as experiment
48import gobbli .io as io
59import gobbli .model as model
610from gobbli .util import TokenizeMethod
711
12+ # Warn the user of potential conflicts using the old third-party typing/dataclasses
13+ # modules
14+ for conflicting_pkg in ("typing" , "dataclasses" ):
15+ req = pkg_resources .Requirement .parse (conflicting_pkg )
16+ if pkg_resources .working_set .find (req ) is not None :
17+ warnings .warn (
18+ f"You've installed a third-party module named '{ conflicting_pkg } ' which "
19+ "conflicts with a standard library module of the same name. This can cause "
20+ "errors when unpickling code, e.g. when running experiments using Ray. Consider "
21+ f"uninstalling the module:\n \n pip uninstall { conflicting_pkg } "
22+ )
23+
824__all__ = [
925 # Modules
1026 "augment" ,
You can’t perform that action at this time.
0 commit comments