aa51e79cdbcbedbedeef68bcef646b2d43993753,src/sdk/pynni/nni/ppo_tuner/ppo_tuner.py,PPOTuner,_actions_to_config,#PPOTuner#Any#,492

Before Change


            (block_name, layer_name, key) = self.actions_to_config[cnt]
            if key == "chosen_inputs":
                if act_name == "None":
                    chosen_arch[block_name][layer_name][key] = []
                else:
                    chosen_arch[block_name][layer_name][key] = [act_name]
            elif key == "chosen_layer":

After Change


        for cnt, act in enumerate(actions):
            act_name = self.full_act_space[act]
            (_key, _type) = self.actions_to_config[cnt]
            if _type == "input_choice":
                if act_name == "None":
                    chosen_arch[_key] = {"_value": [], "_idx": []}
                else:
                    candidates = self.search_space[_key]["_value"]["candidates"]
                    idx = candidates.index(act_name)
                    chosen_arch[_key] = {"_value": [act_name], "_idx": [idx]}
            elif _type == "layer_choice":
                idx = self.search_space[_key]["_value"].index(act_name)
                chosen_arch[_key] = {"_value": act_name, "_idx": idx}
            else:
                raise ValueError("unrecognized key: {0}".format(_type))
        return chosen_arch

    def generate_multiple_parameters(self, parameter_id_list, **kwargs):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: Microsoft/nni
Commit Name: aa51e79cdbcbedbedeef68bcef646b2d43993753
Time: 2019-11-25
Author: Quanlu.Zhang@microsoft.com
File Name: src/sdk/pynni/nni/ppo_tuner/ppo_tuner.py
Class Name: PPOTuner
Method Name: _actions_to_config


Project Name: mlflow/mlflow
Commit Name: 657370491536cbb32662292089769c8e5c04468d
Time: 2019-09-04
Author: 47035943+ahutterTA@users.noreply.github.com
File Name: mlflow/store/hdfs_artifact_repo.py
Class Name: HdfsArtifactRepository
Method Name: list_artifacts


Project Name: lingpy/lingpy
Commit Name: 6b91fed62fe1e4c5696cf085c0a3db97411e8829
Time: 2013-10-24
Author: mattis.list@posteo.de
File Name: lingpy/read/csv.py
Class Name:
Method Name: read_asjp


Project Name: stanfordnlp/stanza
Commit Name: f25d9afd2572b98c56c3f597ad8da2648cd7b663
Time: 2020-12-01
Author: horatio@gmail.com
File Name: stanza/utils/training/common.py
Class Name:
Method Name: main