Hi there.
I got a api key for AlphaGenome. However, in Linux, when executing “dna_model = dna_client.create(MyKey)”, with MyKey substituted by the created string, it didn’t respond. Could it be a connection timeout?
Hello! By default dna_client.create() doesn’t set a timeout, so if you see a hang it’s most probably a connection issue. Can you try setting timeout=10 and see if it fails? E.g.
model = dna_client.create("my_key", timeout=10)
You can also try pinging gdmscience.googleapis.com, which is where the API connects to.
If you can see 404 page when visiting via web browser, it’s likely not a connection issue (this is to be expected, if you couldn’t see the 404 page it’d likely be a firewall/connection issue). Can you paste the exception error you get when running dna_client.create('key', timeout=10)? You could also try running with these env variables:
GRPC_VERBOSITY=debug
GRPC_TRACE=all
which might give some more clues (see here for debugging gRPC).
Here is the error information when running dna_client.create(‘key’, timeout=10):
Traceback (most recent call last):
File “”, line 1, in
File “/public/home/lm2022/alphagenome/src/alphagenome/models/dna_client.py”, line 1176, in create
grpc.channel_ready_future(channel).result(timeout)
File “/public/home/lm2022/anaconda3/envs/alphagenome-env/lib/python3.11/site-packages/grpc/_utilities.py”, line 162, in result
self._block(timeout)
File “/public/home/lm2022/anaconda3/envs/alphagenome-env/lib/python3.11/site-packages/grpc/_utilities.py”, line 106, in _block
raise grpc.FutureTimeoutError()
grpc.FutureTimeoutError
Thanks for the traceback! Unfortunately this would indicate something todo with your internet connection. Have you tried setting the environment variables above and seeing if there’s anything more helpful in the logs? Otherwise there’s some suggestions on Debugging | gRPC.