scheme_adapters/polyfit_adapter/polyfit_adapter.py [66:87]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self.metrics = json_parsed["metrics"]
        self.validate_json_list(self.metrics)

        self.workload = json_parsed["workload"]
        self.validate_json_string(self.workload)

        self.score_func_path = json_parsed["score_function"]
        self.validate_json_string(self.score_func_path)

        self.ranges = json_parsed["range"]
        if not isinstance(self.ranges, dict):
            raise Exception("Dictionary expected.")

        count = 0
        for key, value in self.ranges.items():
            if isinstance(value, list):
                if key == "action":
                    raise Exception("Action is a non-tunable parameter. Please specify only one action.")
                else:
                    count += 1
                    if count > self.num_dim:
                        raise Exception("Number of dimensions and number of ranges given does not match.")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



scheme_adapters/pso_adapter/pso_adapter.py [63:84]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self.metrics = json_parsed["metrics"]
        self.validate_json_list(self.metrics)

        self.workload = json_parsed["workload"]
        self.validate_json_string(self.workload)

        self.score_func_path = json_parsed["score_function"]
        self.validate_json_string(self.score_func_path)

        self.ranges = json_parsed["range"]
        if not isinstance(self.ranges, dict):
            raise Exception("Dictionary expected.")

        count = 0
        for key, value in self.ranges.items():
            if isinstance(value, list):
                if key == "action":
                    raise Exception("Action is a non-tunable parameter. Please specify only one action.")
                else:
                    count += 1
                    if count > self.num_dim:
                        raise Exception("Number of dimensions and number of ranges given does not match.")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



