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

DH-5337/updating the golden sqls collection name #452

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 1 addition & 3 deletions dataherald/context_store/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ class ContextStore(Component, ABC):
def __init__(self, system: System):
self.system = system
self.db = self.system.instance(DB)
self.golden_sql_collection = os.environ.get(
"GOLDEN_SQL_COLLECTION", "dataherald-staging"
)
self.golden_sql_collection = os.environ.get("GOLDEN_SQL_COLLECTION", "ai-stage")
self.vector_store = self.system.instance(VectorStore)

@abstractmethod
Expand Down
4 changes: 1 addition & 3 deletions dataherald/scripts/delete_and_populate_golden_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
system = System(settings)
system.start()
storage = system.instance(DB)
golden_sql_collection = os.environ.get(
"GOLDEN_SQL_COLLECTION", "dataherald-staging"
)
golden_sql_collection = os.environ.get("GOLDEN_SQL_COLLECTION", "ai-stage")

golden_sqls = storage.find_all("golden_sqls")
vector_store = system.instance(VectorStore)
Expand Down
4 changes: 1 addition & 3 deletions dataherald/scripts/migrate_v001_to_v002.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ def add_db_connection_id(collection_name: str, storage) -> None:
add_db_connection_id("golden_records", storage)
add_db_connection_id("nl_question", storage)
# Refresh vector stores
golden_record_collection = os.environ.get(
"GOLDEN_SQL_COLLECTION", "dataherald-staging"
)
golden_record_collection = os.environ.get("GOLDEN_SQL_COLLECTION", "ai-stage")
vector_store = system.instance(VectorStore)
try:
vector_store.delete_collection(golden_record_collection)
Expand Down
4 changes: 1 addition & 3 deletions dataherald/scripts/migrate_v006_to_v100.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ def update_object_id_fields(field_name: str, collection_name: str):
system.start()
storage = system.instance(DB)
# Refresh vector stores
golden_sql_collection = os.environ.get(
"GOLDEN_RECORD_COLLECTION", "dataherald-staging"
)
golden_sql_collection = os.environ.get("GOLDEN_RECORD_COLLECTION", "ai-stage")
vector_store = system.instance(VectorStore)

golden_records = storage.find_all("golden_records")
Expand Down
Loading