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

comm - modules transfer #825

Merged
merged 6 commits into from
Nov 20, 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
2 changes: 1 addition & 1 deletion pkgs/community/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pygithub = "*"
python-dotenv = "*"
qrcode = "*"
redis = "^4.0"
scikit-learn="^1.4.2"
#scikit-learn="^1.4.2"
swarmauri = "==0.5.2"
textstat = "*"
transformers = ">=4.45.0"
Expand Down
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import List, Union, Literal
from pydantic import PrivateAttr

from swarmauri.documents.concrete.Document import Document
from swarmauri.embeddings.concrete.Doc2VecEmbedding import Doc2VecEmbedding
from swarmauri_community.embeddings.concrete.Doc2VecEmbedding import Doc2VecEmbedding
from swarmauri.distances.concrete.CosineDistance import CosineDistance
from swarmauri.vector_stores.base.VectorStoreBase import VectorStoreBase
from swarmauri.vector_stores.base.VectorStoreRetrieveMixin import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import List, Union, Literal
from swarmauri.documents.concrete.Document import Document
from swarmauri.embeddings.concrete.MlmEmbedding import MlmEmbedding
from swarmauri_community.embeddings.concrete.MlmEmbedding import MlmEmbedding
from swarmauri.distances.concrete.CosineDistance import CosineDistance

from swarmauri.vector_stores.base.VectorStoreBase import VectorStoreBase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from swarmauri.embeddings.concrete.Doc2VecEmbedding import Doc2VecEmbedding
from swarmauri_community.embeddings.concrete.Doc2VecEmbedding import Doc2VecEmbedding

@pytest.mark.unit
def test_ubc_resource():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from swarmauri.embeddings.concrete.MlmEmbedding import MlmEmbedding
from swarmauri_community.embeddings.concrete.MlmEmbedding import MlmEmbedding

@pytest.mark.unit
def test_ubc_resource():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from swarmauri.parsers.concrete.TextBlobNounParser import TextBlobNounParser as Parser
from swarmauri_community.parsers.concrete.TextBlobNounParser import TextBlobNounParser as Parser


def setup_module(module):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from swarmauri.parsers.concrete.TextBlobSentenceParser import TextBlobSentenceParser as Parser
from swarmauri_community.parsers.concrete.TextBlobSentenceParser import TextBlobSentenceParser as Parser

@pytest.mark.unit
def test_ubc_resource():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from swarmauri.tools.concrete import TextLengthTool as Tool
from swarmauri_community.tools.concrete import TextLengthTool as Tool

@pytest.mark.unit
def test_ubc_resource():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from swarmauri.documents.concrete.Document import Document
from swarmauri.vector_stores.concrete.Doc2VecVectorStore import Doc2VecVectorStore
from swarmauri_community.vector_stores.Doc2VecVectorStore import Doc2VecVectorStore


@pytest.mark.unit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from swarmauri.documents.concrete.Document import Document
from swarmauri.vector_stores.concrete.MlmVectorStore import MlmVectorStore
from swarmauri_community.vector_stores.MlmVectorStore import MlmVectorStore


@pytest.mark.unit
Expand Down
41 changes: 21 additions & 20 deletions pkgs/swarmauri/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ aiohttp = { version = "^3.10.10", optional = true }
#fal-client = { version = ">=0.5.0", optional = true }
#google-generativeai = { version = "^0.8.3", optional = true }
#openai = { version = "^1.52.0", optional = true }
nltk = { version = "^3.9.1", optional = true }
textblob = { version = "^0.18.0", optional = true }
#nltk = { version = "^3.9.1", optional = true }
#textblob = { version = "^0.18.0", optional = true }
yake = { version = "==0.4.8", optional = true }
beautifulsoup4 = { version = "04.12.3", optional = true }
gensim = { version = "==4.3.3", optional = true }
#gensim = { version = "==4.3.3", optional = true }
scipy = { version = ">=1.7.0,<1.14.0", optional = true }
scikit-learn = { version = "^1.4.2", optional = true }
spacy = { version = ">=3.0.0,<=3.8.2", optional = true }
transformers = { version = "^4.45.0", optional = true }
torch = { version = "^2.5.0", optional = true }
keras = { version = ">=3.2.0", optional = true }
tf-keras = { version = ">=2.16.0", optional = true }
#scikit-learn = { version = "^1.4.2", optional = true }
#spacy = { version = ">=3.0.0,<=3.8.2", optional = true }
#transformers = { version = "^4.45.0", optional = true }
#torch = { version = "^2.5.0", optional = true }
#keras = { version = ">=3.2.0", optional = true }
#tf-keras = { version = ">=2.16.0", optional = true }
matplotlib = { version = ">=3.9.2", optional = true }

[tool.poetry.extras]
Expand All @@ -54,24 +54,25 @@ io = ["aiofiles", "aiohttp"]
#llms = ["cohere", "mistralai", "fal-client", "google-generativeai", "openai"]
nlp = ["nltk", "textblob", "yake"]
nlp_tools = ["beautifulsoup4"]
ml_toolkits = ["gensim", "scipy", "scikit-learn"]
spacy = ["spacy"]
transformers = ["transformers"]
torch = ["torch"]
tensorflow = ["keras", "tf-keras"]
#ml_toolkits = ["gensim", "scipy", "scikit-learn"]
#spacy = ["spacy"]
#transformers = ["transformers"]
#torch = ["torch"]
#tensorflow = ["keras", "tf-keras"]
visualization = ["matplotlib"]

# Full option to install all extras
full = [
"aiofiles", "aiohttp",
#"cohere", "mistralai", "fal-client", "google-generativeai", "openai",
"nltk", "textblob", "yake",
#"nltk", "textblob",
"yake",
"beautifulsoup4",
"gensim", "scipy", "scikit-learn",
"spacy",
"transformers",
"torch",
"keras", "tf-keras",
#"gensim", "scipy", "scikit-learn",
#"spacy",
#"transformers",
#"torch",
#"keras", "tf-keras",
"matplotlib"
]

Expand Down
8 changes: 4 additions & 4 deletions pkgs/swarmauri/swarmauri/embeddings/concrete/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ def _lazy_import(module_name, module_description=None):
return None

# Lazy loading of embeddings with descriptive names
Doc2VecEmbedding = _lazy_import("swarmauri.embeddings.concrete.Doc2VecEmbedding", "Doc2VecEmbedding")
# Doc2VecEmbedding = _lazy_import("swarmauri.embeddings.concrete.Doc2VecEmbedding", "Doc2VecEmbedding")
GeminiEmbedding = _lazy_import("swarmauri.embeddings.concrete.GeminiEmbedding", "GeminiEmbedding")
MistralEmbedding = _lazy_import("swarmauri.embeddings.concrete.MistralEmbedding", "MistralEmbedding")
MlmEmbedding = _lazy_import("swarmauri.embeddings.concrete.MlmEmbedding", "MlmEmbedding")
# MlmEmbedding = _lazy_import("swarmauri.embeddings.concrete.MlmEmbedding", "MlmEmbedding")
NmfEmbedding = _lazy_import("swarmauri.embeddings.concrete.NmfEmbedding", "NmfEmbedding")
OpenAIEmbedding = _lazy_import("swarmauri.embeddings.concrete.OpenAIEmbedding", "OpenAIEmbedding")
TfidfEmbedding = _lazy_import("swarmauri.embeddings.concrete.TfidfEmbedding", "TfidfEmbedding")

# Adding lazy-loaded modules to __all__
__all__ = [
"Doc2VecEmbedding",
# "Doc2VecEmbedding",
"GeminiEmbedding",
"MistralEmbedding",
"MlmEmbedding",
# "MlmEmbedding",
"NmfEmbedding",
"OpenAIEmbedding",
"TfidfEmbedding",
Expand Down
6 changes: 3 additions & 3 deletions pkgs/swarmauri/swarmauri/parsers/concrete/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def _lazy_import(module_name, module_description=None):
# List of parser names (file names without the ".py" extension)
parser_files = [
"BeautifulSoupElementParser",
"BERTEmbeddingParser",
# "BERTEmbeddingParser",
"CSVParser",
"EntityRecognitionParser",
"HTMLTagStripParser",
Expand All @@ -23,8 +23,8 @@ def _lazy_import(module_name, module_description=None):
"PhoneNumberExtractorParser",
"PythonParser",
"RegExParser",
"TextBlobNounParser",
"TextBlobSentenceParser",
# "TextBlobNounParser",
# "TextBlobSentenceParser",
"URLExtractorParser",
"XMLParser",
]
Expand Down
113 changes: 0 additions & 113 deletions pkgs/swarmauri/swarmauri/tools/concrete/SMOGIndexTool.py

This file was deleted.

4 changes: 2 additions & 2 deletions pkgs/swarmauri/swarmauri/vector_stores/concrete/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def _lazy_import(module_name, module_description=None):

# List of vector store names (file names without the ".py" extension)
vector_store_files = [
"Doc2VecVectorStore",
"MlmVectorStore",
# "Doc2VecVectorStore",
# "MlmVectorStore",
"SqliteVectorStore",
"TfidfVectorStore",
]
Expand Down
Loading