From 895503f3bb32d8ce12d4cd1f815be267dd4ca071 Mon Sep 17 00:00:00 2001 From: Praveen Kulkarni <2289914+pbk0@users.noreply.github.com> Date: Sat, 25 Nov 2023 22:00:12 +0100 Subject: [PATCH] Update oracle_client.py to enable_http_proxy Line 35 anyway makes an insecure channel and expects that users are on a safe network. But it still uses https proxies and some corporate environments try to block it (as in my case). So adding the second line instead of the first worked in my case. ``` python channel = grpc.insecure_channel(f"{ip_addr}:{port}") channel = grpc.insecure_channel(f"{ip_addr}:{port}", options=(('grpc.enable_http_proxy', 0),)) ``` --- keras_tuner/distribute/oracle_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keras_tuner/distribute/oracle_client.py b/keras_tuner/distribute/oracle_client.py index 892cda69d..cc6b69462 100644 --- a/keras_tuner/distribute/oracle_client.py +++ b/keras_tuner/distribute/oracle_client.py @@ -32,7 +32,7 @@ def __init__(self, oracle): ip_addr = os.environ["KERASTUNER_ORACLE_IP"] port = os.environ["KERASTUNER_ORACLE_PORT"] - channel = grpc.insecure_channel(f"{ip_addr}:{port}") + channel = grpc.insecure_channel(f"{ip_addr}:{port}", options=(('grpc.enable_http_proxy', 0),)) self.stub = protos.get_service_grpc().OracleStub(channel) self.tuner_id = os.environ["KERASTUNER_TUNER_ID"]