Spaces:
Running
Running
inoki-giskard
commited on
Commit
•
d2ff920
1
Parent(s):
1464827
Polish task execution
Browse files- app_debug.py +3 -3
- io_utils.py +3 -1
app_debug.py
CHANGED
@@ -50,9 +50,9 @@ def get_demo(demo):
|
|
50 |
with gr.Row():
|
51 |
# check if jobs is an attribute of pipe
|
52 |
gr.Markdown(
|
53 |
-
lambda: f"Current job: {pipe.current} Jobs in queue: {len(pipe.jobs)}"
|
54 |
-
if
|
55 |
-
else "No jobs in queue, please submit an evaluation task.",
|
56 |
every=5,
|
57 |
)
|
58 |
with gr.Accordion(label="Log Files", open=False):
|
|
|
50 |
with gr.Row():
|
51 |
# check if jobs is an attribute of pipe
|
52 |
gr.Markdown(
|
53 |
+
lambda: f"Current job: {pipe.current}, Jobs in queue: {len(pipe.jobs)}"
|
54 |
+
if len(pipe.jobs) > 0 or pipe.current is not None
|
55 |
+
else "No jobs in queue, please submit an evaluation task from another tab.",
|
56 |
every=5,
|
57 |
)
|
58 |
with gr.Accordion(label="Log Files", open=False):
|
io_utils.py
CHANGED
@@ -139,8 +139,10 @@ def pop_job_from_pipe():
|
|
139 |
command = job_info[1]
|
140 |
|
141 |
log_file = open(f"./tmp/temp_log", "a")
|
142 |
-
subprocess.Popen(
|
143 |
command,
|
144 |
stdout=log_file,
|
145 |
stderr=log_file,
|
146 |
)
|
|
|
|
|
|
139 |
command = job_info[1]
|
140 |
|
141 |
log_file = open(f"./tmp/temp_log", "a")
|
142 |
+
p = subprocess.Popen(
|
143 |
command,
|
144 |
stdout=log_file,
|
145 |
stderr=log_file,
|
146 |
)
|
147 |
+
p.wait()
|
148 |
+
pipe.current = None
|