I recently installed Weights and Biases (wandb) for recording the metrics of my machine learning projects. Everything worked fine when connected to wandb cloud instance or when I used a local docker image. Now, when I tried to access my local wandb instance from over the network, I started to get API error messages. However, I also noticed that wandb was trying to access my server using port 80, instead of 8080. I installed wandb client on a new cloud server and tried to access my server from there. Still, same error message shown below.
This error happens when I use the command: wandb login host=https://api.wandb.ai
I have tried to delete the .netrc file where the api settings are stored and re-installed wandb. Still same error. Using wandb version 0.10.2 on Ubuntu 18.04; Also, tried downgrading to version 0.8.36, no change.
If I try the command: wandb login --relogin
, I get the same error.
Is there some way to reset wandb so it forgets all these settings, or to resolve this issue directly?
Many thanks
Best Regards,
Adeel
Retry attempt failed:
Traceback (most recent call last):
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
chunked=chunked,
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/connectionpool.py", line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/http/client.py", line 1277, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/http/client.py", line 1323, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/http/client.py", line 1272, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/http/client.py", line 1032, in _send_output
self.send(msg)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/http/client.py", line 972, in send
self.connect()
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/connection.py", line 187, in connect
conn = self._new_conn()
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/connection.py", line 172, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f0a26b54c50>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='34.71.47.117', port=80): Max retries exceeded with url: /graphql (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0a26b54c50>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/old/retry.py", line 96, in __call__
result = self._call_fn(*args, **kwargs)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/internal/internal_api.py", line 128, in execute
return self.client.execute(*args, **kwargs)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/vendor/gql-0.2.0/gql/client.py", line 52, in execute
result = self._get_result(document, *args, **kwargs)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/vendor/gql-0.2.0/gql/client.py", line 60, in _get_result
return self.transport.execute(document, *args, **kwargs)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/vendor/gql-0.2.0/gql/transport/requests.py", line 38, in execute
request = requests.post(self.url, **post_args)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/requests/api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='34.71.47.117', port=80): Max retries exceeded with url: /graphql (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0a26b54c50>: Failed to establish a new connection: [Errno 111] Connection refused'))
wandb: Network error (ConnectionError), entering retry loop. See wandb/debug-internal.log for full traceback.
Traceback (most recent call last):
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/bin/wandb", line 8, in <module>
sys.exit(cli())
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/cli/cli.py", line 72, in wrapper
return func(*args, **kwargs)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/cli/cli.py", line 212, in login
wandb.login(relogin=relogin, key=key, anonymous=anon_mode, host=host, force=True)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/sdk/wandb_login.py", line 29, in login
anonymous=anonymous, key=key, relogin=relogin, host=host, force=force
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/sdk/wandb_login.py", line 128, in _login
apikey.write_key(settings, key)
File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/lib/apikey.py", line 223, in write_key
raise ValueError("API key must be 40 characters long, yours was %s" % len(key))
ValueError: API key must be 40 characters long, yours was 26
first make sure you have the package installed with
pip install wandb
then use it to log in with
wandb.login(APIKEY)