Skip to content

Commit 95dbcbb

Browse files
committedFeb 5, 2024
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 51685eb commit 95dbcbb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+102
-26
lines changed
 

‎benchmarks/cluster_start.py

+20-12
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@ def start_cluster(depth, number_of_engines, path='', log_output_to_file=False):
1919
ps = [
2020
Popen(
2121
ipcontroller_cmd.split(),
22-
stdout=open('ipcontroller_output.log', 'a+')
23-
if log_output_to_file
24-
else sys.stdout,
25-
stderr=open('ipcontroller_error_output.log', 'a+')
26-
if log_output_to_file
27-
else sys.stdout,
22+
stdout=(
23+
open('ipcontroller_output.log', 'a+')
24+
if log_output_to_file
25+
else sys.stdout
26+
),
27+
stderr=(
28+
open('ipcontroller_error_output.log', 'a+')
29+
if log_output_to_file
30+
else sys.stdout
31+
),
2832
stdin=sys.stdin,
2933
)
3034
]
@@ -35,12 +39,16 @@ def start_cluster(depth, number_of_engines, path='', log_output_to_file=False):
3539
ps.append(
3640
Popen(
3741
ipengine_cmd.split(),
38-
stdout=open('ipengine_output.log', 'a+')
39-
if log_output_to_file
40-
else sys.stdout,
41-
stderr=open('ipengine_error_output.log', 'a+')
42-
if log_output_to_file
43-
else sys.stdout,
42+
stdout=(
43+
open('ipengine_output.log', 'a+')
44+
if log_output_to_file
45+
else sys.stdout
46+
),
47+
stderr=(
48+
open('ipengine_error_output.log', 'a+')
49+
if log_output_to_file
50+
else sys.stdout
51+
),
4452
stdin=sys.stdin,
4553
)
4654
)

‎benchmarks/gcloud_setup.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,15 @@ def delete_all_instances():
5050
def gcloud_run(*args, block=True):
5151
cmd = ["gcloud", "compute"] + list(args)
5252
print(f'$ {" ".join(cmd)}')
53-
check_call(
54-
cmd
55-
# stdout=open(get_gcloud_log_file_name(instance_name) + ".log", "a+"),
56-
# stderr=open(f"{get_gcloud_log_file_name(instance_name)}_error.out", "a+"),
57-
) if block else Popen(cmd)
53+
(
54+
check_call(
55+
cmd
56+
# stdout=open(get_gcloud_log_file_name(instance_name) + ".log", "a+"),
57+
# stderr=open(f"{get_gcloud_log_file_name(instance_name)}_error.out", "a+"),
58+
)
59+
if block
60+
else Popen(cmd)
61+
)
5862

5963

6064
def copy_files_to_instance(instance_name, *file_names, directory="~"):

0 commit comments

Comments
 (0)