7c0200c93b88898507dbafcb2d92314d0dbcd451,python/ray/serve/master.py,ServeMaster,create_endpoint,#ServeMaster#Any#Any#Any#,254
Before Change
err_prefix = "Cannot create endpoint. "
assert route not in self.get_all_routes(), \
"{} Route "{}" is already registered.".format(err_prefix, route)
assert endpoint_name not in self.get_all_endpoints(), \
"{} Endpoint "{}" is already registered.".format(err_prefix,
endpoint_name)
self.route_table.register_service(
route, endpoint_name, methods=methods)
[http_proxy] = self.get_http_proxy()
After Change
// TODO(edoakes): move this to client side.
err_prefix = "Cannot create endpoint."
if route in self.routes:
if self.routes[route] == (endpoint, methods):
return
else:
raise ValueError(
"{} Route "{}" is already registered.".format(
err_prefix, route))
if endpoint in self.get_all_endpoints():
raise ValueError(
"{} Endpoint "{}" is already registered.".format(
err_prefix, endpoint))
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: ray-project/ray
Commit Name: 7c0200c93b88898507dbafcb2d92314d0dbcd451
Time: 2020-04-28
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/master.py
Class Name: ServeMaster
Method Name: create_endpoint
Project Name: NervanaSystems/nlp-architect
Commit Name: 117c2ddb13d4ac975eb77a5ecf826012a7008516
Time: 2018-08-14
Author: jonathan.mamou@intel.com
File Name: solutions/set_expansion/set_expand.py
Class Name: SetExpand
Method Name: __id2term
Project Name: microsoft/nni
Commit Name: 52b93d0cabc11423428ea748972841c27bc068ee
Time: 2019-11-04
Author: 38930155+chicm-ms@users.noreply.github.com
File Name: test/config_test.py
Class Name:
Method Name: run_test
Project Name: OpenMined/PySyft
Commit Name: f1d55314dacb8300e2bd6d3c595883c0cb5336f6
Time: 2020-10-20
Author: kevivthapion@gmail.com
File Name: syft/generic/frameworks/remote.py
Class Name: Remote
Method Name: register_framework