I hit this error when just trying to access the sweeps under a project.
api = wandb.Api()
project = api.project(project_name)
The project name and login are not the problem, since I can iterate over the runs in a project without issue:
project_name = "robin-radar/IrisFastAI_new_arch"
runs = api.runs(project_name)
This is the stack trace of the error. It mentions “Whoa, you found a bug” in the stacktrace.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
File ~/mambaforge-pypy3/envs/fastai_env/lib/python3.10/site-packages/wandb/apis/normalize.py:41, in normalize_exceptions.<locals>.wrapper(*args, **kwargs)
40 try:
---> 41 return func(*args, **kwargs)
42 except requests.HTTPError as error:
File ~/mambaforge-pypy3/envs/fastai_env/lib/python3.10/site-packages/wandb/apis/public.py:1687, in Project.sweeps(self)
1686 ret = self.client.execute(query, variable_values)
-> 1687 if ret["project"]["totalSweeps"] < 1:
1688 return []
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
CommError Traceback (most recent call last)
/home/tim.kuipers/dev/deeplearning/projects/iris_drone_classification/pipeline_2023_fastai2/analyze_sweep.ipynb Cell 13 line 7
4 project = api.project(project_name)
5 log_uniform_params = set()
----> 7 for sweep in project.sweeps():
8 config = sweep.config
9 hyperparameter_ranges = config.get('parameters', {})
File ~/mambaforge-pypy3/envs/fastai_env/lib/python3.10/site-packages/wandb/apis/normalize.py:87, in normalize_exceptions.<locals>.wrapper(*args, **kwargs)
85 raise
86 else:
---> 87 raise CommError(message, err).with_traceback(sys.exc_info()[2])
File ~/mambaforge-pypy3/envs/fastai_env/lib/python3.10/site-packages/wandb/apis/normalize.py:41, in normalize_exceptions.<locals>.wrapper(*args, **kwargs)
39 message = "Whoa, you found a bug."
40 try:
---> 41 return func(*args, **kwargs)
42 except requests.HTTPError as error:
43 errors = parse_backend_error_messages(error.response)
File ~/mambaforge-pypy3/envs/fastai_env/lib/python3.10/site-packages/wandb/apis/public.py:1687, in Project.sweeps(self)
1685 variable_values = {"project": self.name, "entity": self.entity}
1686 ret = self.client.execute(query, variable_values)
-> 1687 if ret["project"]["totalSweeps"] < 1:
1688 return []
1690 return [
1691 # match format of existing public sweep apis
1692 Sweep(
(...)
1704 for e in ret["project"]["sweeps"]["edges"]
1705 ]
CommError: 'NoneType' object is not subscriptable