85197deece837a1f4ffdbbffb72af6028a9b6e32,python/ray/autoscaler/_private/resource_demand_scheduler.py,ResourceDemandScheduler,_infer_legacy_node_resources_if_needed,#ResourceDemandScheduler#Any#,201

Before Change


        if not self.node_types[NODE_TYPE_LEGACY_HEAD]["resources"]:
            assert len(max_resources_by_ip) == 1  // Only the head node.
            self.node_types[NODE_TYPE_LEGACY_HEAD]["resources"] = next(
                iter(max_resources_by_ip.values()))
        // We fill the worker node resources only once.
        if not self.node_types[NODE_TYPE_LEGACY_WORKER]["resources"]:
            if len(max_resources_by_ip) > 1:

After Change


        if not self.node_types[NODE_TYPE_LEGACY_HEAD]["resources"]:
            try:
                head_ip = self.provider.internal_ip(
                    self.provider.non_terminated_nodes({
                        TAG_RAY_NODE_KIND: NODE_KIND_HEAD
                    })[0])
                self.node_types[NODE_TYPE_LEGACY_HEAD]["resources"] = \
                    copy.deepcopy(max_resources_by_ip[head_ip])
            except (IndexError, KeyError):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: ray-project/ray
Commit Name: 85197deece837a1f4ffdbbffb72af6028a9b6e32
Time: 2020-11-11
Author: ameerh@berkeley.edu
File Name: python/ray/autoscaler/_private/resource_demand_scheduler.py
Class Name: ResourceDemandScheduler
Method Name: _infer_legacy_node_resources_if_needed


Project Name: pyannote/pyannote-audio
Commit Name: c2481d699dcaeb93421f87a747d74781bd5edbda
Time: 2020-01-08
Author: bredin@limsi.fr
File Name: pyannote/audio/embedding/extraction.py
Class Name: SequenceEmbedding
Method Name: apply


Project Name: facebookresearch/ParlAI
Commit Name: c228fc1c648602f93c078298f9e363f6e02694d2
Time: 2017-12-15
Author: ahm@fb.com
File Name: tests/test_threadutils.py
Class Name: TestSharedTable
Method Name: test_get_set_del


Project Name: codelucas/newspaper
Commit Name: 5d6cdbd53544d057a1cf344526ec70e0995b77d1
Time: 2014-12-17
Author: lucasyangpersonal@gmail.com
File Name: newspaper/nlp.py
Class Name:
Method Name: keywords