Skip to content

Commit f2407da

Browse files
Merge pull request #66 from upb-lea/new_femmt
fix mypy issues, update pylintrc to latest pylint version
2 parents 499e03c + b61146b commit f2407da

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.pylintrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ recursive=no
104104
# source root.
105105
source-roots=
106106

107-
# When enabled, pylint would attempt to guess common misconfiguration and emit
108-
# user-friendly hints instead of false-positive error messages.
109-
suggestion-mode=yes
110-
111107
# Allow loading of arbitrary C extensions. Extensions are imported into the
112108
# active Python interpreter and may run arbitrary code.
113109
unsafe-load-any-extension=no

dct/circuit_optimization.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -797,9 +797,10 @@ def df_to_dab_dto_list(self, df: pd.DataFrame) -> list[d_dtos.CircuitDabDTO]:
797797

798798
logger.info(f"The study '{self._dab_config.circuit_study_name}' contains {len(df)} trials.")
799799

800-
for index, _ in df.iterrows():
801-
transistor_dto_1 = d_sets.HandleTransistorDto.tdb_to_transistor_dto(df["params_transistor_1_name_suggest"][index])
802-
transistor_dto_2 = d_sets.HandleTransistorDto.tdb_to_transistor_dto(df["params_transistor_2_name_suggest"][index])
800+
for idx, _ in df.iterrows():
801+
index = int(str(idx))
802+
transistor_dto_1 = d_sets.HandleTransistorDto.tdb_to_transistor_dto(str(df.at[index, "params_transistor_1_name_suggest"]))
803+
transistor_dto_2 = d_sets.HandleTransistorDto.tdb_to_transistor_dto(str(df.at[index, "params_transistor_2_name_suggest"]))
803804

804805
dab_dto = d_sets.HandleDabDto.init_config(
805806
name=str(df["number"][index].item()),
@@ -963,7 +964,7 @@ def pareto_front_from_df(df: pd.DataFrame, x: str = "values_0", y: str = "values
963964
y_vec = df[y][~np.isnan(df[x])]
964965
numpy_zip = np.column_stack((x_vec, y_vec))
965966
pareto_tuple_mask_vec = CircuitOptimization.is_pareto_efficient(numpy_zip)
966-
pareto_df = df[~np.isnan(df[x])][pareto_tuple_mask_vec]
967+
pareto_df: pd.DataFrame = df[~np.isnan(df[x])][pareto_tuple_mask_vec]
967968
return pareto_df
968969

969970
@staticmethod
@@ -1007,7 +1008,7 @@ def filter_df(df: pd.DataFrame, x: str = "values_0", y: str = "values_1", factor
10071008
# clip losses to a maximum of the minimum losses
10081009
ref_loss_max = np.clip(ref_loss_max, a_min=-1, a_max=factor_max_dc_losses * min_total_dc_losses)
10091010

1010-
pareto_df_offset = df[df[y] < ref_loss_max]
1011+
pareto_df_offset: pd.DataFrame = df[df[y] < ref_loss_max]
10111012

10121013
return pareto_df_offset
10131014

0 commit comments

Comments
 (0)