Skip to content

Commit 5e7b92c

Browse files
committed
Various improvements to linting
1 parent f4edf3a commit 5e7b92c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/autotuning_methodology/runner.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
import time as python_time
99
import warnings
1010
from pathlib import Path
11-
import pickle, gzip # compression libraries if necessary for collecting results
11+
12+
# compression libraries if necessary for collecting results
13+
import pickle
14+
import gzip
1215

1316
import numpy as np
1417
import progressbar
@@ -227,13 +230,15 @@ def collect_results(
227230
results_description: the ``ResultsDescription`` object to write the results to.
228231
searchspace_stats: the ``SearchspaceStatistics`` object, used for conversion of imported runs.
229232
profiling: whether profiling statistics must be collected.
233+
compress: whether the results should be compressed.
230234
231235
Returns:
232236
The ``ResultsDescription`` object with the results.
233237
"""
234238
if profiling:
235-
import psutil, os
236-
process = psutil.Process(os.getpid())
239+
import psutil
240+
from os import getpid
241+
process = psutil.Process(getpid())
237242
warnings.warn(f"Memory usage at start of collect_results: {process.memory_info().rss / 1e6:.1f} MB")
238243

239244
# calculate the minimum number of function evaluations that must be valid

0 commit comments

Comments
 (0)