Fix comet_for_mlflow SSL certificate issue.
I get the following error when calling comet_for_mlflow
after and while performing hyperopt.
comet_for_mlflow --force-reupload -y
__ __ ___ ___ ___ __ __ ___ __
/ ` / \ |\/| |__ | __ |__ / \ |__) __ |\/| | |__ | / \ | |
\__, \__/ | | |___ | | \__/ | \ | | |___ | |___ \__/ |/\|
Starting Comet Extension for MLFlow
Preparing data locally from: '/storage/gdrive/Coding/ideas_deep_rl2/mlruns'
You will have an opportunity to review.
# Preparing experiment 1/2: sac_her_FetchReach
## Preparing run 1/8 [de33c2c5731b4b9096f2276f4320aa65]
## Preparing run 2/8 [16e21b88b1b440ff8b9d3e886aa32c8e]
## Preparing run 3/8 [274ae52e18b043e8a6c277da836306e9]
## Preparing run 4/8 [bedc0b3032394b16a3a78a0ac970d85e]
## Preparing run 5/8 [256d09884fcd46a28537800e86bc7f46]
## Preparing run 6/8 [6ed313688cb04e178fd5c3bb08c25280]
## Preparing run 7/8 [fb9b1726dc324ac69627caf5172f2647]
## Preparing run 8/8 [c27fa55b78664b4bb28ccc741bebc419]
# Preparing experiment 2/2: Default
MLFlow name: | Comet.ml name: | Prepared count:
----------------+------------------+-------------------
Experiments | Projects | 2
Runs | Experiments | 8
Tags | Others | 56
Parameters | Parameters | 72
Metrics | Metrics | 1810
Artifacts | Assets | 16
All prepared data has been saved to: /tmp/tmpgo8uad2f
# Start uploading data to Comet.ml
0%| | 0/8 [00:00<?, ?it/s]COMET ERROR: There's seem to be an issue with your system's SSL certificate bundle.This is likely a system-wide issue that is not related to Comet.Please see more information here:https://www.comet.ml/docs/python-sdk/warnings-errors/
Traceback (most recent call last):
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/websocket/_app.py", line 312, in run_forever
self.sock.connect(
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/websocket/_core.py", line 249, in connect
self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options),
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/websocket/_http.py", line 136, in connect
sock = _ssl_socket(sock, options.sslopt, hostname)
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/websocket/_http.py", line 267, in _ssl_socket
sock = _wrap_sni_socket(sock, sslopt, hostname, check_hostname)
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/websocket/_http.py", line 242, in _wrap_sni_socket
return context.wrap_socket(
File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)
0%| | 0/8 [00:10<?, ?it/s]
Traceback (most recent call last):
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/bin/comet_for_mlflow", line 8, in <module>
sys.exit(main())
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/comet_for_mlflow/cli.py", line 100, in main
converter.prepare()
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/comet_for_mlflow/comet_for_mlflow.py", line 236, in prepare
self.upload(prepared_data)
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/comet_for_mlflow/comet_for_mlflow.py", line 458, in upload
upload_single_offline_experiment(
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/comet_ml/offline.py", line 919, in upload_single_offline_experiment
sender.send()
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/comet_ml/offline.py", line 521, in send
self._handshake()
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/comet_ml/offline.py", line 592, in _handshake
self.ws_connection.wait_for_connection()
File "/storage/gdrive/Coding/ideas_deep_rl2/venv38/lib/python3.8/site-packages/comet_ml/connection.py", line 1135, in wait_for_connection
raise ValueError("Could not connect to server after multiple tries.")
ValueError: Could not connect to server after multiple tries.```
I have no idea why. It occurs with both python 3.6 and python 3.8. This happens when calling ```comet_for_mlflow``` from my office computer.
Edited by Manfred Eppe