try few things
This commit is contained in:
parent
1d33ed938b
commit
cf249a522e
3 changed files with 15 additions and 9 deletions
|
|
@ -35,6 +35,7 @@ class Config:
|
||||||
|
|
||||||
|
|
||||||
system_root_directory = get_absolute_path(".cognee_system")
|
system_root_directory = get_absolute_path(".cognee_system")
|
||||||
|
logging.info("system_root_directory: %s", system_root_directory)
|
||||||
data_root_directory = os.getenv("DATA_PATH", get_absolute_path(".data"))
|
data_root_directory = os.getenv("DATA_PATH", get_absolute_path(".data"))
|
||||||
|
|
||||||
vectordb: str = os.getenv("VECTORDB", "weaviate")
|
vectordb: str = os.getenv("VECTORDB", "weaviate")
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
from os import path
|
from os import path
|
||||||
|
import logging
|
||||||
ROOT_DIR = path.dirname(path.abspath(__file__))
|
ROOT_DIR = path.dirname(path.abspath(__file__))
|
||||||
|
|
||||||
|
logging.debug("ROOT_DIR: ", ROOT_DIR)
|
||||||
|
|
||||||
def get_absolute_path(path_from_root: str) -> str:
|
def get_absolute_path(path_from_root: str) -> str:
|
||||||
|
logging.debug("abspath: ", path.abspath(path.join(ROOT_DIR, path_from_root)))
|
||||||
|
|
||||||
|
|
||||||
return path.abspath(path.join(ROOT_DIR, path_from_root))
|
return path.abspath(path.join(ROOT_DIR, path_from_root))
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,14 @@ async def main():
|
||||||
import pathlib
|
import pathlib
|
||||||
import cognee
|
import cognee
|
||||||
|
|
||||||
# print("Working dir: ", str(pathlib.Path(__file__).parent))
|
print("Working dir: ", str(pathlib.Path(__file__).parent))
|
||||||
# data_directory_path = str(pathlib.Path(path.join(pathlib.Path(__file__).parent, "../../.data")).resolve())
|
data_directory_path = str(pathlib.Path(path.join(pathlib.Path(__file__).parent, "../../.data")).resolve())
|
||||||
# print("Data dir: ", data_directory_path)
|
print("Data dir: ", data_directory_path)
|
||||||
# cognee.config.data_root_directory(data_directory_path)
|
cognee.config.data_root_directory(data_directory_path)
|
||||||
#
|
|
||||||
# cognee_directory_path = str(pathlib.Path(path.join(pathlib.Path(__file__).parent, "../../.cognee_system")).resolve())
|
cognee_directory_path = str(pathlib.Path(path.join(pathlib.Path(__file__).parent, "../../.cognee_system")).resolve())
|
||||||
# print("System dir: ", cognee_directory_path)
|
print("System dir: ", cognee_directory_path)
|
||||||
# cognee.config.system_root_directory(cognee_directory_path)
|
cognee.config.system_root_directory(cognee_directory_path)
|
||||||
|
|
||||||
|
|
||||||
dataset_name = "cs_explanations"
|
dataset_name = "cs_explanations"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue