Yelp / MOE

A global, black box optimization engine for real world metric optimization.
Other
1.3k stars 139 forks source link

urllib2.URLError: <urlopen error [Errno 111] Connection refused> #478

Open JadBatmobile opened 5 years ago

JadBatmobile commented 5 years ago

After building from source in a virutal environment i get the following error when running the following example code:

# Sample 20 points
for i in range(20):
    # Use MOE to determine what is the point with highest Expected Improvement to use next
    next_point_to_sample = gp_next_points(exp)[0]  # By default we only ask for one point
    # Sample the point from our objective function, we can replace this with any function
    value_of_next_point = function_to_minimize(next_point_to_sample)

    print "Sampled f({0:s}) = {1:.18E}".format(str(next_point_to_sample), value_of_next_point)

    # Add the information about the point to the experiment historical data to inform the GP
    exp.historical_data.append_sample_points([SamplePoint(next_point_to_sample, value_of_next_point, 0.01)])  # We can add some noise

ERROR: File "sd.py", line 24, in next_point_to_sample = gp_next_points(exp)[0] # By default we only ask for one point File "/home/hallab/moe_e/MOE/moe/easy_interface/simple_endpoint.py", line 54, in gp_next_points json_response = call_endpoint_with_payload(rest_host, rest_port, endpoint, json_payload, testapp) File "/home/hallab/moe_e/MOE/moe/easy_interface/simple_endpoint.py", line 24, in call_endpoint_with_payload with contextlib.closing(urllib2.urlopen(request)) as f: File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 447, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 111] Connection refused>

JadBatmobile commented 5 years ago

I dont understand why it is trying to connect to anything since i built it from source... im not running through docker..