Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NL Interface] Query interpretation fine tuning (disable clustering for multi SV detection; defaulting to Earth place under some circumstances) #1988

Merged
merged 8 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions server/routes/nl_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,9 @@ def _detection(orig_query, cleaned_query, embeddings_build) -> Detection:
if contained_in_classification is not None:
classifications.append(contained_in_classification)

if svs_scores_dict:
# Clustering-based different SV detection is only enabled in LOCAL.
correlation_classification = None
if os.environ.get('FLASK_ENV') == 'local' and svs_scores_dict:
# Embeddings Indices.
sv_index_sorted = []
if 'EmbeddingIndex' in svs_scores_dict:
Expand All @@ -517,8 +519,9 @@ def _detection(orig_query, cleaned_query, embeddings_build) -> Detection:
svs_scores_dict['CosineScore'], sv_index_sorted,
COSINE_SIMILARITY_CUTOFF)
logging.info(f'Correlation classification: {correlation_classification}')
if correlation_classification is not None:
classifications.append(correlation_classification)
logging.info(f'Correlation Classification is currently disabled.')
# if correlation_classification is not None:
# classifications.append(correlation_classification)

if not classifications:
# Simple Classification simply means:
Expand Down
2 changes: 1 addition & 1 deletion static/js/apps/nl_interface/debug_info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { Col, Row } from "reactstrap";
import { DebugInfo, SVScores } from "../../types/app/nl_interface_types";

export const BUILD_OPTIONS = [
{ value: "us_filtered", text: "Filtered US SVs (PaLM)" },
{ value: "us_filtered", text: "Filtered US SVs" },
{
value: "curatedJan2022",
text: "Curated 3.5k+ SVs PaLM(Jan2022) - Default",
Expand Down