Skip to content

Commit

Permalink
remove strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
yilinxia committed Feb 9, 2025
1 parent 06d73d9 commit 4306a97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
app.layout = layout

if __name__ == "__main__":
app.run(host="0.0.0.0", port=8050, debug=False)
app.run(host="0.0.0.0", port=8050, debug=True)

7 changes: 3 additions & 4 deletions src/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,10 @@ def download_generated_abstract_argumentation_framework(
State("abstract-attacks", "value"),
Input("abstract-evaluation-accordion", "active_item"),
Input("abstract-evaluation-semantics", "value"),
Input("abstract-evaluation-strategy", "value"),
prevent_initial_call=True,
)
def evaluate_abstract_argumentation_framework(
arguments: str, attacks: str, active_item: str, semantics: str, strategy: str
arguments: str, attacks: str, active_item: str, semantics: str
):
if active_item != "Evaluation":
raise PreventUpdate
Expand Down Expand Up @@ -467,6 +466,7 @@ def evaluate_abstract_argumentation_framework(
)
)
# Compute accepted arguments
strategy = "Skeptical" #or Credulous
acceptance_strategy = get_acceptance_strategy(strategy)
accepted_arguments = get_accepted_arguments(frozen_extensions, acceptance_strategy)
gr_status_by_arg, number_by_argument = get_numbered_grounded_extension(arg_framework)
Expand Down Expand Up @@ -561,7 +561,6 @@ def setting_choice(choice: str):
State("abstract-evaluation-semantics", "value"),
Input("abstract-explanation-function", "value"),
Input("abstract-explanation-type", "value"),
State("abstract-evaluation-strategy", "value"),
prevent_initial_call=True,
)
def derive_explanations_abstract_argumentation_framework(
Expand All @@ -571,14 +570,14 @@ def derive_explanations_abstract_argumentation_framework(
semantics: str,
explanation_function: str,
explanation_type: str,
explanation_strategy: str,
):
if active_item != "Explanation":
raise PreventUpdate

arg_framework = read_argumentation_framework(arguments, attacks)
frozen_extensions = get_argumentation_framework_extensions(arg_framework, semantics)
extensions = [set(frozen_extension) for frozen_extension in frozen_extensions]
explanation_strategy = "Skeptical" # or Credulous
acceptance_strategy = get_acceptance_strategy(explanation_strategy)
accepted_arguments = get_accepted_arguments(frozen_extensions, acceptance_strategy)

Expand Down
16 changes: 0 additions & 16 deletions src/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,6 @@ def get_abstract_evaluation_div():
),
]
),

dbc.Row(
[
dbc.Col(html.B("Evaluation strategy")),
dbc.Col(
dbc.Select(
options=[
{"label": "Credulous", "value": "Credulous"},
{"label": "Skeptical", "value": "Skeptical"},
],
value="Credulous",
id="abstract-evaluation-strategy",
)
),
]
),
dbc.Row(id="21-abstract-evaluation-semantics"),
dbc.Row(id="21-abstract-evaluation-all-args"),
]
Expand Down

0 comments on commit 4306a97

Please sign in to comment.