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

fix for incorrect logging message format/args #330

Merged
merged 3 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ To be released at some future point in time

Description

- Fix malformed logging format strings
- Update linting support and apply to existing errors

Detailed Notes

- Fix incorrectly formatted positional arguments in log format strings (PR330_)
- Update pylint dependency, update .pylintrc, mitigate non-breaking issues, suppress api breaks (PR311_)

.. _PR330: https://github.com/CrayLabs/SmartSim/pull/330
.. _PR311: https://github.com/CrayLabs/SmartSim/pull/311

0.5.0
Expand Down
13 changes: 4 additions & 9 deletions smartsim/_core/entrypoints/colocated.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,10 @@ def main(

try:
logger.debug(
(
"\n\nColocated database information\n"
"\n\tIP Address(es): {}"
"\n\tCommand: {}\n\n"
"\n\t# of Database CPUs: {}"
),
' '.join(ip_addresses + [lo_address]),
' '.join(cmd),
db_cpus
"\n\nColocated database information\n"
f"\n\tIP Address(es): {' '.join(ip_addresses + [lo_address])}"
f"\n\tCommand: {' '.join(cmd)}\n\n"
f"\n\t# of Database CPUs: {db_cpus}"
)
except Exception as e:
cleanup()
Expand Down
4 changes: 2 additions & 2 deletions smartsim/_core/launcher/step/alpsStep.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def _set_alloc(self) -> None:
elif "COBALT_JOBID" in os.environ:
self.alloc = os.environ["COBALT_JOBID"]
logger.debug(
"Running on Cobalt allocation {} gleaned from user environment",
self.alloc,
f"Running on Cobalt allocation {self.alloc} gleaned "
"from user environment"
)
else:
raise AllocationError(
Expand Down
Loading