Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to using format string in prim logging #161

Merged
merged 2 commits into from
Sep 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions ema_workbench/analysis/prim.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,9 +1045,7 @@ def __init__(
if np.unique(x[column]).shape == (1,):
x = x.drop(column, axis=1)
_logger.info(
(
"{} dropped from analysis " "because only a single category"
).format(column)
f"{column} dropped from analysis " "because only a single category"
)

x_nominal = x.select_dtypes(exclude=np.number)
Expand Down Expand Up @@ -1162,10 +1160,7 @@ def find_box(self):
else:
# make a dump box
_logger.info(
(
"box does not meet threshold criteria, "
"value is {}, returning dump box"
).format(box.mean)
f"box does not meet threshold criteria, value is {box.mean}, returning dump box"
)
box = PrimBox(self, self.box_init, self.yi_remaining[:])
self._boxes.append(box)
Expand Down Expand Up @@ -1475,7 +1470,7 @@ def _paste(self, box):
for i, u in enumerate(columns):
if u not in res_dim:
continue
_logger.debug("pasting " + u)
_logger.debug(f"pasting {u}")
pastes = self._pastes[dtype](self, box, u, x, restricted_dims)
[possible_pastes.append(entry) for entry in pastes]
if not possible_pastes:
Expand Down