7c0200c93b88898507dbafcb2d92314d0dbcd451,python/ray/serve/master.py,ServeMaster,set_traffic,#ServeMaster#Any#Any#,228

Before Change


        assert isinstance(traffic_policy_dictionary,
                          dict), "Traffic policy must be dictionary"
        prob = 0
        existing_backends = set(self.get_all_backends())
        for backend, weight in traffic_policy_dictionary.items():
            prob += weight
            assert backend in existing_backends, \
                "Attempted to assign traffic to a backend "{}" that " \

After Change


                prob, 1, atol=0.02
            ), "weights must sum to 1, currently they sum to {}".format(prob)

            self.traffic_policies[endpoint_name] = traffic_policy_dictionary

            // NOTE(edoakes): we must write a checkpoint before pushing the
            // update to avoid inconsistent state if we crash after pushing the
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

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: set_traffic


Project Name: dmlc/gluon-nlp
Commit Name: 03b0e7061cf477fbeccb9c128ee76603df582d86
Time: 2018-09-04
Author: leonard@lausen.nl
File Name: scripts/word_embeddings/evaluate_pretrained.py
Class Name:
Method Name: load_embedding_from_path


Project Name: microsoft/nni
Commit Name: c7d58033db0e25736d33406ed262cb5232d366e8
Time: 2020-02-09
Author: 38930155+chicm-ms@users.noreply.github.com
File Name: src/sdk/pynni/nni/compression/torch/weight_rank_filter_pruners.py
Class Name: FPGMPruner
Method Name: update_epoch


Project Name: ClimbsRocks/auto_ml
Commit Name: 33851dea0f6c75ca1e685037393ea7160506b53a
Time: 2016-10-08
Author: climbsbytes@gmail.com
File Name: auto_ml/predictor.py
Class Name: Predictor
Method Name: _prepare_for_training


Project Name: dmlc/gluon-nlp
Commit Name: f4275c0b80197e0f1bbd3a2a1a31cf07d85013b1
Time: 2019-01-09
Author: leonard@lausen.nl
File Name: scripts/word_embeddings/evaluate_pretrained.py
Class Name:
Method Name: load_embedding_from_path