[Bug fix] Fix issue of missing user directory (#975)

This commit is contained in:
Deshraj Yadav
2023-11-24 09:26:59 -08:00
committed by GitHub
parent 58f72e1ffe
commit 1df46b2bb3
6 changed files with 14 additions and 19 deletions

View File

@@ -24,6 +24,10 @@ from embedchain.vectordb.base import BaseVectorDB
from embedchain.vectordb.chroma import ChromaDB
# Setup the user directory if doesn't exist already
Client.setup_dir()
@register_deserializable
class Pipeline(EmbedChain):
"""
@@ -64,9 +68,6 @@ class Pipeline(EmbedChain):
:type auto_deploy: bool, optional
:raises Exception: If an error occurs while creating the pipeline
"""
# Setup user directory if it doesn't exist already
Client.setup_dir()
if id and yaml_path:
raise Exception("Cannot provide both id and config. Please provide only one of them.")
@@ -357,9 +358,6 @@ class Pipeline(EmbedChain):
:return: An instance of the Pipeline class.
:rtype: Pipeline
"""
# Setup user directory if it doesn't exist already
Client.setup_dir()
with open(yaml_path, "r") as file:
config_data = yaml.safe_load(file)