Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs598mp-fall2021-proj
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
chsieh16
cs598mp-fall2021-proj
Commits
ca0c82a1
Commit
ca0c82a1
authored
2 years ago
by
chsieh16
Browse files
Options
Downloads
Patches
Plain Diff
Handle KeyboardInterupt to terminate
parent
b6795d1f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dtree_synth.py
+3
-0
3 additions, 0 deletions
dtree_synth.py
dtree_teacher_gem_stanley.py
+2
-1
2 additions, 1 deletion
dtree_teacher_gem_stanley.py
with
5 additions
and
1 deletion
dtree_synth.py
+
3
−
0
View file @
ca0c82a1
...
...
@@ -177,6 +177,9 @@ def main():
result
.
append
({
"
part
"
:
part
,
"
status
"
:
"
not found
"
,
"
result
"
:
ret
})
except
KeyboardInterrupt
:
print
(
"
User pressed Ctrl+C. Skip all remaining partition.
"
)
break
# NOTE finally block is executed before break
except
Exception
as
e
:
result
.
append
({
"
part
"
:
part
,
"
status
"
:
"
exception
"
,
...
...
This diff is collapsed.
Click to expand it.
dtree_teacher_gem_stanley.py
+
2
−
1
View file @
ca0c82a1
...
...
@@ -140,9 +140,10 @@ class DTreeGEMStanleyGurobiTeacher(GEMStanleyGurobiTeacher):
else
:
# raise RuntimeError(f"Only found spurious cexs {cex_list} for the conjunct {conjunct}.")
pass
elif
self
.
_gp_model
.
status
==
gp
.
GRB
.
INFEASIBLE
:
continue
elif
self
.
_gp_model
.
status
==
gp
.
GRB
.
INTERRUPTED
:
raise
KeyboardInterrupt
else
:
return
z3
.
unknown
print
(
"
Done
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment