Skip to content

Commit 47a6bb7

Browse files
committed
update error codes
1 parent 592558c commit 47a6bb7

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

hydra_plugins/hyper_analysis/ablation_path_sweeper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(
4747
if not np.isnan(target_config[k]):
4848
self.target_config[k] = target_config[k]
4949
else:
50-
df = load_data(data_path, performance_key, config_key, variation_key) # noqa: PD901
50+
df = load_data(data_path, performance_key, config_key, variation_key)
5151
self.source_config = df_to_config(configspace, get_overall_best_config(df))
5252
self.target_config = df_to_config(configspace, get_best_config_per_variation(df, variation))
5353

hydra_plugins/hyper_analysis/lpi_sweeper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(
3838
if config:
3939
self.config = dict_to_config(configspace, config)
4040
else:
41-
df = load_data(data_path, performance_key, config_key, variation_key) # noqa: PD901
41+
df = load_data(data_path, performance_key, config_key, variation_key)
4242
self.config = df_to_config(configspace, get_overall_best_config(df))
4343

4444
neighbors = self._get_neighborhood()
@@ -68,7 +68,7 @@ def tell(self, info, value):
6868

6969
def finish_run(self, output_path):
7070
"""Finish the run and calculate LPI scores."""
71-
df = pd.read_csv(pathlib.PurePath(output_path, "runhistory.csv")) # noqa: PD901
71+
df = pd.read_csv(pathlib.PurePath(output_path, "runhistory.csv"))
7272
if "seed" not in df.columns:
7373
df["seed"] = 0
7474
seeds = df["seed"].unique()

hydra_plugins/hyper_analysis/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_overall_best_config(df):
3737

3838
def get_best_config_per_variation(df, var, variation_key="env"):
3939
"""Get the best config for a specific variation."""
40-
df = df[df[variation_key] == var] # noqa: PD901
40+
df = df[df[variation_key] == var]
4141
return df.loc[df["mean_performance"].idxmax()]
4242

4343

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ lint.ignore = [
191191
"B023",
192192
"B904",
193193
"PLC1802",
194+
"PD901"
194195
]
195196

196197
exclude = [

0 commit comments

Comments
 (0)