Skip to content

Commit

Permalink
reset report validation with reset of report
Browse files Browse the repository at this point in the history
  • Loading branch information
dayesouza committed Apr 17, 2024
1 parent b2f4e9f commit aef8e2e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/workflows/attribute_patterns/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def create():
sv.attribute_selected_pattern.value = selected_pattern
sv.attribute_selected_pattern_period.value = selected_pattern_period
sv.attribute_report.value = ''
sv.attribute_report_validation.value = {}
st.rerun()

st.markdown('**Selected pattern: ' + selected_pattern + ' (' + selected_pattern_period + ')**')
Expand Down
1 change: 1 addition & 0 deletions app/workflows/question_answering/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def create():
sv.answering_next_q_id.value = 1
sv.answering_surface_questions.value = {}
sv.answering_deeper_questions.value = {}
sv.answering_report_validation.value = {}
sv.answering_target_matches.value = answering_target_matches
sv.answering_source_diversity.value = answering_source_diversity
sv.answering_last_lazy_question.value = question
Expand Down
1 change: 1 addition & 0 deletions app/workflows/record_matching/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def att_ui(i):

if st.button('Detect record groups', use_container_width=True):
sv.matching_evaluations.value = pl.DataFrame()
sv.matching_report_validation.value = {}
if record_distance != sv.matching_sentence_pair_embedding_threshold.value:
sv.matching_sentence_pair_embedding_threshold.value = record_distance
if name_similarity != sv.matching_sentence_pair_jaccard_threshold.value:
Expand Down
3 changes: 2 additions & 1 deletion app/workflows/risk_networks/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ def create():
sv.network_selected_entity.value = selected_entity
sv.network_selected_community.value = selected_network
sv.network_report.value = ''
sv.network_report_validation.value = {}
c_nodes = sv.network_community_nodes.value[selected_network]
N = functions.build_network_from_entities(sv, sv.network_overall_graph.value, c_nodes)
if selected_entity != '':
Expand Down Expand Up @@ -602,7 +603,7 @@ def create():

util.ui_components.report_download_ui(sv.network_report, 'network_report')

if sv.network_report_validation.value != {} and len(sv.network_report.value) > 0:
if sv.network_report_validation.value != {}:
if generated:
validation_status.update(label=f"LLM faithfulness score: {sv.network_report_validation.value['score']}/5", state='complete')
else:
Expand Down

0 comments on commit aef8e2e

Please sign in to comment.