Skip to content

Commit

Permalink
fix for incorrect logging message format/args (#330)
Browse files Browse the repository at this point in the history
Fix for incorrect message format/args

[ committed by @ankona ]
[ reviewed by @mellis13 ]
  • Loading branch information
ankona authored Jul 26, 2023
1 parent a164b82 commit 4c741be
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
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

0 comments on commit 4c741be

Please sign in to comment.