Weights and Biases: Login and network errors

2024/10/18 14:56:31

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_kwFile "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connectionraise errFile "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connectionsock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refusedDuring 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 urlopenchunked=chunked,File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/connectionpool.py", line 392, in _make_requestconn.request(method, url, **httplib_request_kw)File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/http/client.py", line 1277, in requestself._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_requestself.endheaders(body, encode_chunked=encode_chunked)File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/http/client.py", line 1272, in endheadersself._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_outputself.send(msg)File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/http/client.py", line 972, in sendself.connect()File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/connection.py", line 187, in connectconn = self._new_conn()File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/connection.py", line 172, in _new_connself, "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 refusedDuring 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 sendtimeout=timeoutFile "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopenmethod, 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 incrementraise 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 executereturn 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 executeresult = 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_resultreturn 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 executerequest = 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 postreturn 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 requestreturn 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 requestresp = 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 sendr = adapter.send(request, **kwargs)File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/requests/adapters.py", line 516, in sendraise 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 mainrv = self.invoke(ctx)File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/click/core.py", line 1259, in invokereturn _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 invokereturn 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 invokereturn callback(*args, **kwargs)File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/cli/cli.py", line 72, in wrapperreturn func(*args, **kwargs)File "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/cli/cli.py", line 212, in loginwandb.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 loginanonymous=anonymous, key=key, relogin=relogin, host=host, force=forceFile "/media/adeel/Space/AI/anaconda3/envs/tf2_gpu/lib/python3.7/site-packages/wandb/sdk/wandb_login.py", line 128, in _loginapikey.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_keyraise ValueError("API key must be 40 characters long, yours was %s" % len(key))
ValueError: API key must be 40 characters long, yours was 26
Answer

I'm an engineer at Weights & Biases-- would love to help get this issue resolved.

If you want to reset your settings, you can do the following:

  1. Delete the appropriate entry from your .netrc file as you have already done.
  2. Delete the wandb/settings file from where you are launching your scripts.

You can then visit this link: https://wandb.ai/authorize and copy your API key.

Then, run the following:

wandb login <API_KEY>

Once you've done this, you should be good to go. Please let me know if you still run into issues after running the steps above.

https://en.xdnf.cn/q/73302.html

Related Q&A

Python: Opening a file without creating a lock

Im trying to create a script in Python to back up some files. But, these files could be renamed or deleted at any time. I dont want my script to prevent that by locking the file; the file should be abl…

Tensorflow dataset questions about .shuffle, .batch and .repeat

I had a question about the use of batch, repeat and shuffle with tf.Dataset.It is not clear to me exactly how repeat and shuffle are used. I understand that .batch will dictate how many training exampl…

How to sort in python with multiple conditions?

I have a list with sublists as follows:result = [ [helo, 10], [bye, 50], [yeah, 5], [candy,30] ]I want to sort this with three conditions: first, by highrest integer in index 2 of sublist, then by leng…

Not able to convert Numpy array to OpenCV Mat in Cython when trying to write c++ wrapper function

I am trying to implement cv::cuda::warpPerspective in python2, there is a very sweet post about how to do that here: link. I followed the instruction as described in that post, however, I got Segmentat…

Installing python tables on mac with m1 chip

I am trying to use tables in python3 on a new mac mini with the M1 chip. I am getting multiple errors when running HDF5_DIR=/opt/homebrew/Cellar/hdf5/1.12.0_1 pip3 install tablesERROR: Command errored …

Write unbuffered on python 3

Im trying to create a file on python without buffer, so its written at the same time I use write(). But for some reason I got an error. This is the line Im using: my_file = open("test.txt", &…

which should I use (for python-based sites)? sass, compass, switchcss...alternatives? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic…

Invalid tag name error when creating element with lxml in python

I am using lxml to make an xml file and my sample program is :from lxml import etree import datetime dt=datetime.datetime(2013,11,30,4,5,6) dt=dt.strftime(%Y-%m-%d) page=etree.Element(html) doc=etree.E…

Method replacement at runtime not updating Private attributes

I understood how to replace methods at run time in Python by going through these links.[ Link1 , Link2 , & Link3].When I replaced a "update_private_variable" method of class A, its gettin…

sys.path and sys.executable is incorrect in jupyter, but no applied fix is working

Ive configured jupyter to be used from a remote computer and set a password to it while initial anaconda setup. Then after fixing this issue, I am trapped in another one. sys.path and sys.executable is…