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
cb772cc2
Commit
cb772cc2
authored
2 years ago
by
chsieh16
Browse files
Options
Downloads
Patches
Plain Diff
Remove spurious cex validation
parent
52c8e4ec
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
+1
-1
1 addition, 1 deletion
dtree_synth.py
dtree_teacher_gem_stanley.py
+3
-2
3 additions, 2 deletions
dtree_teacher_gem_stanley.py
with
4 additions
and
3 deletions
dtree_synth.py
+
1
−
1
View file @
cb772cc2
...
...
@@ -91,7 +91,7 @@ def synth_dtree(learner: Learner, teacher: Teacher, num_max_iterations: int = 10
assert
len
(
negative_examples
)
>
0
print
(
f
"
negative examples:
{
negative_examples
}
"
)
assert
validate_cexs
(
teacher
.
state_dim
,
teacher
.
perc_dim
,
candidate
,
negative_examples
)
#
assert validate_cexs(teacher.state_dim, teacher.perc_dim, candidate, negative_examples)
learner
.
add_negative_examples
(
*
negative_examples
)
continue
...
...
This diff is collapsed.
Click to expand it.
dtree_teacher_gem_stanley.py
+
3
−
2
View file @
cb772cc2
...
...
@@ -72,7 +72,7 @@ class DTreeGEMStanleyGurobiTeacher(GEMStanleyGurobiTeacher):
else
:
# !(lhs <= rhs) <=> (lhs > rhs) => lhs >= rhs + ð
cons
=
(
lhs
>=
rhs
+
self
.
PRECISION
)
else
:
raise
RuntimeError
(
f
"
Unsupprted atomic predicate expression
{
pred
}
"
)
raise
RuntimeError
(
f
"
Unsupp
o
rted atomic predicate expression
{
pred
}
"
)
gp_cons
=
self
.
_gp_model
.
addConstr
(
cons
)
self
.
_prev_candidate_constr
.
append
(
gp_cons
)
...
...
@@ -138,7 +138,8 @@ class DTreeGEMStanleyGurobiTeacher(GEMStanleyGurobiTeacher):
if
filtered_cex_list
:
self
.
_cexs
.
extend
(
filtered_cex_list
)
else
:
raise
RuntimeError
(
f
"
Only found spurious cexs
{
cex_list
}
for the conjuct
{
conjunct
}
.
"
)
# raise RuntimeError(f"Only found spurious cexs {cex_list} for the conjuct {conjunct}.")
pass
elif
self
.
_gp_model
.
status
==
gp
.
GRB
.
INFEASIBLE
:
continue
...
...
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