Skip to content

Commit

Permalink
Remove singleton abstract metaclass for now, since pipelines can use …
Browse files Browse the repository at this point in the history
…different models
  • Loading branch information
kaancayli committed Feb 21, 2024
1 parent 9d82946 commit 1c2f107
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion app/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from common.singleton import Singleton
from common.singleton_abstract import SingletonABCMeta
1 change: 0 additions & 1 deletion app/pipeline/chat/simple_chat_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
class SimpleChatPipeline(Pipeline):
"""A simple chat pipeline that uses our custom langchain chat model for our own request handler"""

_is_abstract: bool = False
llm: IrisLangchainChatModel
pipeline: Runnable

Expand Down
1 change: 0 additions & 1 deletion app/pipeline/chat/tutor_chat_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
class TutorChatPipeline(Pipeline):
"""Tutor chat pipeline that answers exercises related questions from students."""

_is_abstract: bool = False
llm: IrisLangchainChatModel
pipeline: Runnable

Expand Down
7 changes: 2 additions & 5 deletions app/pipeline/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
from abc import abstractmethod
from abc import abstractmethod, ABCMeta

from common import SingletonABCMeta


class Pipeline(metaclass=SingletonABCMeta):
class Pipeline(metaclass=ABCMeta):
"""Abstract class for all pipelines"""

_is_abstract = True
implementation_id: str

def __init__(self, implementation_id=None):
Expand Down
1 change: 0 additions & 1 deletion app/pipeline/shared/summary_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
class SummaryPipeline(Pipeline):
"""A generic summary pipeline that can be used to summarize any text"""

_is_abstract: bool = False
_cache: Dict = {}
llm: IrisLangchainChatModel
pipeline: Runnable
Expand Down

0 comments on commit 1c2f107

Please sign in to comment.