wandb TypeError
Closed this issue · 1 comments
braceal commented
The following type hint causes a bug for later wandb version 0.12.11
Python 3.6.13 |Anaconda, Inc.| (default, Feb 23 2021, 21:40:20)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wandb
>>> from typing import Optional
>>> def func() -> Optional[wandb.config]:
... return wandb.config
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/p/gpfs1/brace3/envs/test-env/lib/python3.6/typing.py", line 682, in inner
return func(*args, **kwds)
File "/p/gpfs1/brace3/envs/test-env/lib/python3.6/typing.py", line 845, in __getitem__
arg = _type_check(arg, "Optional[t] requires a single type.")
File "/p/gpfs1/brace3/envs/test-env/lib/python3.6/typing.py", line 374, in _type_check
raise TypeError(msg + " Got %.100r." % (arg,))
TypeError: Optional[t] requires a single type. Got <wandb.sdk.lib.preinit.PreInitObject object at 0x20000067a588>.
>>> wandb.__version__
'0.12.11'
To fix, please run pip install wandb==0.11.0
This issue will be addressed in the next release.