def __init__(self, redis_address, redis_password=None):
        """Initialize the reporter object."""
        self.cpu_counts = (psutil.cpu_count(), psutil.cpu_count(logical=False))
        self.ip_addr = determine_ip_address()
        self.hostname = os.uname().nodename

        _ = psutil.cpu_percent()  # For initialization

        self.redis_key = "{}.{}".format(ray.gcs_utils.REPORTER_CHANNEL,
                                        self.hostname)
        self.redis_client = ray.services.create_redis_client(
            redis_address, password=redis_password)

        self.network_stats_hist = [(0, (0.0, 0.0))]
def __init__ ( self , redis_address , redis_password = None ) : self . cpu_counts = ( psutil . cpu_count ( ) , psutil . cpu_count ( logical = False ) ) self . ip_addr = determine_ip_address ( ) self . hostname = os . uname ( ) . nodename _ = psutil . cpu_percent ( ) self . redis_key = "{}.{}" . format ( ray . gcs_utils . REPORTER_CHANNEL , self . hostname ) self . redis_client = ray . services . create_redis_client ( redis_address , password = redis_password ) self . network_stats_hist = [ ( 0 , ( 0.0 , 0.0 ) ) ]
Initialize the reporter object.