6373c706615bc94c0a1e7fc564b3d18c3d342d91,python/ray/serve/api.py,,create_backend,#Any#Any#,208
Before Change
" of instance BackendConfig")
// Validate that func_or_class is a function or class.
if inspect.isfunction(func_or_class):
if len(actor_init_args) != 0:
raise ValueError(
"actor_init_args not supported for function backend.")
elif not inspect.isclass(func_or_class):
raise ValueError(
"Backend must be a function or class, it is {}.".format(
type(func_or_class)))
// Make sure the batch size is correct.
should_accept_batch = backend_config.max_batch_size is not None
if should_accept_batch and not _backend_accept_batch(func_or_class):
raise batch_annotation_not_found
if _backend_accept_batch(func_or_class):
After Change
if config is None:
config = {}
if not isinstance(config, dict):
raise TypeError("config must be a dictionary.")
replica_config = ReplicaConfig(
func_or_class, *actor_init_args, ray_actor_options=ray_actor_options)
backend_config = BackendConfig(config, replica_config.accepts_batches)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 15
Instances
Project Name: ray-project/ray
Commit Name: 6373c706615bc94c0a1e7fc564b3d18c3d342d91
Time: 2020-04-30
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/api.py
Class Name:
Method Name: create_backend
Project Name: arraiy/torchgeometry
Commit Name: 0234315776751221ef9da5d2073e32f9f54c01bb
Time: 2020-11-01
Author: edgar.riba@gmail.com
File Name: kornia/color/yuv.py
Class Name:
Method Name: yuv_to_rgb
Project Name: arraiy/torchgeometry
Commit Name: 0234315776751221ef9da5d2073e32f9f54c01bb
Time: 2020-11-01
Author: edgar.riba@gmail.com
File Name: kornia/color/yuv.py
Class Name:
Method Name: rgb_to_yuv