Skip to content

Commit

Permalink
DH-5337/updating the golden sqls collection name (#452)
Browse files Browse the repository at this point in the history
* DH-5337/updating the golden sqls colleciton name

* DH-5337/reformat with balck
  • Loading branch information
MohammadrezaPourreza authored Apr 4, 2024
1 parent 39bef01 commit c8c6a28
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
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

0 comments on commit c8c6a28

Please sign in to comment.