aa3fd62cac3a0f759f7d884eae3d202a5c72103b,python/ray/serve/policy.py,RandomEndpointPolicy,flush,#RandomEndpointPolicy#Any#Any#,54
Before Change
// Note(simon): This constructor takes 100+us, maybe cache this?
rstate = np.random.RandomState(seed)
chosen_backend = rstate.choice(
self.backend_names, replace=False,
p=self.backend_weights).squeeze()
assigned_backends.add(chosen_backend)
backend_queues[chosen_backend].add(query)
After Change
assigned_backends.add(chosen_backend)
backend_queues[chosen_backend].add(query)
if len(shadow_backends) > 0:
shadow_query = copy.copy(query)
shadow_query.async_future = None
shadow_query.is_shadow_query = True
for shadow_backend in shadow_backends:
assigned_backends.add(shadow_backend)
backend_queues[shadow_backend].add(shadow_query)
return assigned_backends
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: ray-project/ray
Commit Name: aa3fd62cac3a0f759f7d884eae3d202a5c72103b
Time: 2020-06-25
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/policy.py
Class Name: RandomEndpointPolicy
Method Name: flush
Project Name: deepchem/deepchem
Commit Name: 97d7f88df32ae58875d7534c7c517905a3eb1341
Time: 2020-11-05
Author: mufeili1996@gmail.com
File Name: deepchem/models/torch_models/gat.py
Class Name: GAT
Method Name: forward
Project Name: deepchem/deepchem
Commit Name: f766c92a63fb67a99744dcb82c8c78406fbf905a
Time: 2020-11-04
Author: mufeili1996@gmail.com
File Name: deepchem/models/torch_models/gat.py
Class Name: GAT
Method Name: forward