Do you want the "python 3.7" program to accept incoming network connections?

Hi everyone!
I recently started using ray on my MacBook Pro running macOS BigSur 11.1. But if I run the simple script shown below, i every time receive the authorization message also shown below. The German
authorization message translated to English means: “Do you want the “python 3.7” program to accept incoming network connections?”.

So even if I accept the authorization or change the firewall settings by my own, to accept python incoming network connections, the Message occures over and over again.

Is someone familiar with his problem? Or is there a parameter for ray.init() so that python doesn’t even want to accept incoming network connections? Because actually I just want to use RlLib locally.

I will be thankful for any suggestions.
Simon

import ray
import ray.rllib.agents as agents

ray.init(ignore_reinit_error=True,dashboard_port=8080)

1 Like

Hmm, usually this only occurs upon the first instantiation (though perhaps a couple times in that first instantiation).

Does it occur always when you run RLlib?

1 Like

Hi rliaw, thanks for your fast answer!

The message always occurs when I run the ray.init() command to initialize Ray.
I also just ran the script shown below, to check if I also can use ray without initializing it, and somehow it works. Which is very confusing, because I always thought that first of all I always have to init ray?

Also, I just found out that when I run this script:

import ray 
ray.init()

, so without import any other ray APIs, the message doesn’t occurs ^^

import ray
import ray.rllib.agents.dqn as dqn
import ray.rllib.agents.ppo as ppo

ray.shutdown()

SELECT_ENV = “CartPole-v1”
config = dqn.DEFAULT_CONFIG.copy()
config[“log_level”] = “WARN”

agent = dqn.DQNTrainer(config, env=SELECT_ENV)
N_ITER = 20000
s = “{:3d} reward min:{:6.2f} mean:{:6.2f} max:{:6.2f} len {:6.2f} saved {}”
for n in range(N_ITER):
___result = agent.train()
___file_name = agent.save()
___print(result)

I’ve never seen this before. cc @sven1977 Do you have any guess why this only occurs when rllib is used?

1 Like

What is about the other question that occurs, is ray.init() not longer necessary? :slight_smile:

I recently switched to Python 3.8 from Python 3.6, and now I also get 12-16 of these messages every time I call ray.init(). I’m also on Big Sur, and I’m building Ray from source using these instructions: Building Ray from Source — Ray v2.0.0.dev0

I’ll update this if I find a workaround or a solution.

1 Like