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

Mono/dev #829

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
824f584
swarm - feat: add image generation interface and base implementation
MichaelDecent Nov 19, 2024
ad2049f
swarm - implemented hyperbolic model
3rd-Son Nov 19, 2024
a3058b6
swarm - implemented hyperbolicImgGen
3rd-Son Nov 20, 2024
c342182
comm - modules transfer
MichaelDecent Nov 20, 2024
9977308
swarm - implemented hyperbolicaudio
3rd-Son Nov 20, 2024
f2583ff
Merge pull request #824 from 3rd-Son/hyperbolic
cobycloud Nov 20, 2024
e200564
comm - changed test files path
MichaelDecent Nov 20, 2024
5655f07
Merge branch 'mono/dev' into image_gen
cobycloud Nov 20, 2024
9e851a3
Merge branch 'mono/dev' into dependencies_fix
cobycloud Nov 20, 2024
22cfec3
comm - dependencies fix
MichaelDecent Nov 20, 2024
f1cd5e2
comm - minor fix
MichaelDecent Nov 20, 2024
719710a
swarm - reverted unfinished work
MichaelDecent Nov 20, 2024
ab4aca2
swarm - implemented hyperbolicvision
3rd-Son Nov 20, 2024
a170058
swarm - hyperbolic
3rd-Son Nov 20, 2024
4421b1a
comm - refactor: update dependencies and add optional extras in pypro…
MichaelDecent Nov 20, 2024
2b05d47
comm - minor fix
MichaelDecent Nov 20, 2024
feecdc1
Update ImageGenBase.py
cobycloud Nov 20, 2024
b2278f7
Merge pull request #825 from MichaelDecent/dependencies_fix
cobycloud Nov 20, 2024
5b48fcb
Merge branch 'mono/dev' into hyperbolic
cobycloud Nov 20, 2024
7b91934
Merge branch 'mono/dev' into comm_pyproject
cobycloud Nov 20, 2024
81903e7
Merge branch 'mono/dev' into image_gen
cobycloud Nov 20, 2024
547032c
Merge pull request #827 from 3rd-Son/hyperbolic
cobycloud Nov 20, 2024
1dd0d85
Merge branch 'mono/dev' into comm_pyproject
cobycloud Nov 20, 2024
0596174
Merge pull request #828 from MichaelDecent/comm_pyproject
cobycloud Nov 20, 2024
e5fa531
Merge branch 'mono/dev' into image_gen
cobycloud Nov 20, 2024
2147e92
swarm - moved image gen models
MichaelDecent Nov 21, 2024
6eabe4f
swarm - minor fix
MichaelDecent Nov 21, 2024
2f85274
comm - Refactor imports in vector store unit tests and add lazy loadi…
MichaelDecent Nov 21, 2024
a1041f1
Merge pull request #832 from MichaelDecent/comm_dependencies
cobycloud Nov 21, 2024
58b6ad1
swarm - Update pyproject.toml
cobycloud Nov 21, 2024
9e5376a
swarm - changed the init files
3rd-Son Nov 21, 2024
9576123
changed the init structure
3rd-Son Nov 21, 2024
4823f07
comm - Update pyproject.toml
cobycloud Nov 21, 2024
57e4e1f
Merge branch 'mono/dev' into init-updates
cobycloud Nov 21, 2024
d775493
swarm - Update pyproject.toml
cobycloud Nov 21, 2024
b2da524
cicd - Update test_changed_files.yaml
cobycloud Nov 21, 2024
80821d3
Create increment_version_dev.yaml
cobycloud Nov 21, 2024
d5eb734
Merge branch 'mono/dev' into init-updates
cobycloud Nov 21, 2024
32af6d3
comm - Update pyproject.toml
cobycloud Nov 21, 2024
31558d1
comm - Update pyproject.toml
cobycloud Nov 21, 2024
66e42b8
comm - Update pyproject.toml
cobycloud Nov 21, 2024
4ddac14
Update increment_version_dev.yaml
cobycloud Nov 21, 2024
13e76b3
Merge branch 'mono/dev' into init-updates
cobycloud Nov 21, 2024
9e871f0
Merge pull request #833 from 3rd-Son/init-updates
cobycloud Nov 21, 2024
28c388c
comm - Update dependencies in pyproject.toml
MichaelDecent Nov 21, 2024
38ef30a
Merge pull request #834 from MichaelDecent/comm_dependencies
cobycloud Nov 21, 2024
c9616eb
Merge branch 'mono/dev' into image_gen
cobycloud Nov 21, 2024
2476206
Merge branch 'master' into mono/dev
cobycloud Nov 21, 2024
8cb4349
Merge branch 'mono/dev' into image_gen
cobycloud Nov 21, 2024
f9ce2e4
Merge pull request #823 from MichaelDecent/image_gen
cobycloud Nov 21, 2024
fb2bb4f
swarm - Update pyproject.toml
cobycloud Nov 21, 2024
940b74f
core - Update pyproject.toml
cobycloud Nov 21, 2024
7c486db
core - Update pyproject.toml
cobycloud Nov 21, 2024
4a6d9d6
swarm - Update pyproject.toml
cobycloud Nov 21, 2024
a1e0967
comm - Update pyproject.toml
cobycloud Nov 21, 2024
b015b32
Update pyproject.toml
cobycloud Nov 21, 2024
b57270f
swarm - Update pyproject.toml
cobycloud Nov 21, 2024
9aaa12d
comm - Update pyproject.toml
cobycloud Nov 21, 2024
6820a6f
Update pyproject.toml
cobycloud Nov 21, 2024
c70f09f
swarm - Update pyproject.toml
cobycloud Nov 21, 2024
1257f30
swarm - Update pyproject.toml
cobycloud Nov 21, 2024
d7bc92a
exp - Update pyproject.toml
cobycloud Nov 21, 2024
d44a15d
cicd - Update sequence_publish.yaml
cobycloud Nov 21, 2024
51c1a44
exp - [Update pyproject.toml
cobycloud Nov 21, 2024
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
19 changes: 9 additions & 10 deletions .github/workflows/increment_version_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- name: Increment versions in pyproject.toml
run: |
set -x

echo "Incrementing versions..."
find . -name "pyproject.toml" | while read -r pyproject; do
echo "Processing $pyproject"

# Extract current version
CURRENT_VERSION=$(python -c "
import tomlkit
Expand All @@ -43,31 +43,30 @@ jobs:
print(f'Error reading version from {pyproject}: {e}', end='')
exit(1)
")

echo "Extracted CURRENT_VERSION: $CURRENT_VERSION"

if [ -z "$CURRENT_VERSION" ]; then
echo "Error: Could not extract the current version from $pyproject"
cat "$pyproject"
continue
fi

# Increment version
BASE_VERSION=$(echo "$CURRENT_VERSION" | sed -E 's/(.*)-dev.*/\1/')
DEV_PART=$(echo "$CURRENT_VERSION" | grep -oE 'dev[0-9]+$' | grep -oE '[0-9]+')


# Fallback if no DEV_PART is found
if [ -z "$DEV_PART" ]; then
DEV_PART=0
fi

NEW_DEV_PART=$((DEV_PART + 1))
NEW_VERSION="${BASE_VERSION}-dev${NEW_DEV_PART}"

echo "Updating version from $CURRENT_VERSION to $NEW_VERSION"
done



- name: Commit changes
run: |
git config user.name "github-actions[bot]"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sequence_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- uses: actions/checkout@v4

- name: Wait for swarmauri
run: sleep 60
run: sleep 120

- name: Set up Python 3.12
uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_changed_files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
- name: Install package dependencies
run: |
cd pkgs/${{ matrix.package_tests.package }}
poetry install --no-cache -vv
poetry install --no-cache --all-extras -vv

- name: Run all tests for the package
run: |
Expand Down
97 changes: 56 additions & 41 deletions pkgs/community/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "swarmauri-community"
version = "0.5.2.dev20"
version = "0.5.3.dev5"
description = "This repository includes Swarmauri community components."
authors = ["Jacob Stewart <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -15,48 +15,65 @@ classifiers = [

[tool.poetry.dependencies]
python = ">=3.10,<3.13"
captcha = "*"
chromadb = "*"
duckdb = "*"
folium = "*"
gensim = "*"
#google-generativeai = "*"
gradio = "*"
leptonai = "0.22.0"
neo4j = "*"
nltk = "*"
#openai = "^1.52.0"
pandas = "*"
psutil = "*"
pygithub = "*"
python-dotenv = "*"
qrcode = "*"
redis = "^4.0"
scikit-learn="^1.4.2"
swarmauri = "==0.5.2"
textstat = "*"
transformers = ">=4.45.0"
typing_extensions = "*"
tiktoken = "*"
pymupdf = "*"
annoy = "*"
qdrant_client = "*"
weaviate = "*"
pinecone-client = { version = "*", extras = ["grpc"] }
PyPDF2 = "*"
pypdftk = "*"
weaviate-client = "*"
protobuf = "^3.20.0"
# Pacmap requires specific version of numba
#numba = ">=0.59.0"
#pacmap = "==0.7.3"
captcha = "^0.6.0"
chromadb = { version = "^0.5.17", optional = true }
duckdb = { version = "^1.1.1", optional = true }
folium = { version = "^0.18.0", optional = true }
gensim = { version = "^4.3.3", optional = true }
gradio = { version = "^5.4.0", optional = true }
leptonai = { version = "^0.22.0", optional = true }
neo4j = { version = "^5.25.0", optional = true }
nltk = { version = "^3.9.1", optional = true }
pandas = "^2.2.3"
psutil = { version = "^6.1.0", optional = true }
pygithub = { version = "^2.4.0", optional = true }
qrcode = { version = "^8.0", optional = true }
redis = { version = "^4.0", optional = true }
swarmauri = "==0.5.3.dev5"
textstat = { version = "^0.7.4", optional = true }
transformers = { version = ">=4.45.0", optional = true }
typing_extensions = "^4.12.2"
tiktoken = { version = "^0.8.0", optional = true }
PyMuPDF = { version = "^1.24.12", optional = true }
annoy = { version = "^1.17.3", optional = true }
qdrant-client = { version = "^1.12.0", optional = true }
pinecone-client = { version = "^5.0.1", optional = true, extras = ["grpc"] }
pypdf = { version = "^5.0.1", optional = true }
pypdftk = { version = "^0.5", optional = true }
weaviate-client = { version = "^4.9.2", optional = true }
#protobuf = { version = "^3.20.0", optional = true }

[tool.poetry.extras]
# Grouped optional dependencies
nlp = ["nltk", "gensim", "textstat"]
ml_toolkits = ["transformers", "annoy"]
visualization = ["folium"]
storage = ["redis", "duckdb", "neo4j", "chromadb", "qdrant-client", "weaviate", "pinecone-client"]
document_processing = ["pypdf", "PyMuPDF", "pypdftk"]
cloud_integration = ["psutil", "qrcode", "pygithub"]
gradio = ["gradio"]
model_clients = ["leptonai"]
tiktoken = ["tiktoken"]

# Full installation
full = [
"nltk", "gensim", "textstat",
"transformers", "annoy",
"folium",
"redis", "duckdb", "neo4j", "chromadb", "qdrant_client", "weaviate", "pinecone-client",
"pypdf", "PyMuPDF", "pypdftk",
"psutil", "qrcode", "pygithub",
"gradio",
"leptonai",
"tiktoken"
]

[tool.poetry.dev-dependencies]
flake8 = "^7.0" # Add flake8 as a development dependency
pytest = "^8.0" # Ensure pytest is also added if you run tests
flake8 = "^7.0"
pytest = "^8.0"
pytest-asyncio = ">=0.24.0"
pytest-xdist = "^3.6.1"
python-dotenv = "*"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand All @@ -70,12 +87,10 @@ markers = [
"unit: Unit tests",
"integration: Integration tests",
"acceptance: Acceptance tests",
"experimental: Experimental tests",
"experimental: Experimental tests"
]

log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)s] %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"

asyncio_default_fixture_loop_scope = "function"
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
from swarmauri_community.document_stores.concrete.RedisDocumentStore import (
RedisDocumentStore,
)
from swarmauri.utils._lazy_import import _lazy_import

documents_stores_files = [
("swarmauri_community.documents_stores.concrete.RedisDocumentStore", "RedisDocumentStore"),
]

for module_name, class_name in documents_stores_files:
globals()[class_name] = _lazy_import(module_name, class_name)

__all__ = [class_name for _, class_name in documents_stores_files]
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from swarmauri.utils._lazy_import import _lazy_import


embeddings_files = [
("swarmauri_community.embeddings.concrete.Doc2VecEmbedding", "Doc2VecEmbedding"),
("swarmauri_community.embeddings.concrete.MlmEmbedding", "MlmEmbedding"),
]

for module_name, class_name in embeddings_files:
globals()[class_name] = _lazy_import(module_name, class_name)

__all__ = [class_name for _, class_name in embeddings_files]
14 changes: 11 additions & 3 deletions pkgs/community/swarmauri_community/llms/concrete/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
from swarmauri_community.llms.concrete.LeptonAIImgGenModel import LeptonAIImgGenModel
from swarmauri_community.llms.concrete.LeptonAIModel import LeptonAIModel
from swarmauri.utils._lazy_import import _lazy_import

__all__ = ["LeptonAIImgGenModel", "LeptonAIModel"]
llms_files = [
("swarmauri_community.llms.concrete.LeptonAIImgGenModel", "LeptonAIImgGenModel"),
("swarmauri_community.llms.concrete.LeptonAIModel", "LeptonAIModel"),
("swarmauri_community.llms.concrete.PytesseractImg2TextModel", "PytesseractImg2TextModel"),
]

for module_name, class_name in llms_files:
globals()[class_name] = _lazy_import(module_name, class_name)

__all__ = [class_name for _, class_name in llms_files]
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
from swarmauri_community.measurements.concrete.MutualInformationMeasurement import (
MutualInformationMeasurement,
)
from swarmauri_community.measurements.concrete.TokenCountEstimatorMeasurement import (
TokenCountEstimatorMeasurement,
)
from swarmauri.utils._lazy_import import _lazy_import

measurement_files = [
("swarmauri_community.measurements.concrete.MutualInformationMeasurement", "MutualInformationMeasurement"),
("swarmauri_community.measurements.concrete.TokenCountEstimatorMeasurement", "TokenCountEstimatorMeasurement"),
]

for module_name, class_name in measurement_files:
globals()[class_name] = _lazy_import(module_name, class_name)

__all__ = [class_name for _, class_name in measurement_files]
19 changes: 16 additions & 3 deletions pkgs/community/swarmauri_community/parsers/concrete/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
from swarmauri_community.parsers.concrete.FitzPdfParser import PDFtoTextParser
from swarmauri_community.parsers.concrete.PyPDF2Parser import PyPDF2Parser
from swarmauri_community.parsers.concrete.PyPDFTKParser import PyPDFTKParser
from swarmauri.utils._lazy_import import _lazy_import

parsers_files = [
("swarmauri_community.parsers.concrete.BERTEmbeddingParser", "BERTEmbeddingParser"),
("swarmauri_community.parsers.concrete.EntityRecognitionParser", "EntityRecognitionParser"),
("swarmauri_community.parsers.concrete.FitzPdfParser", "FitzPdfParser"),
("swarmauri_community.parsers.concrete.PyPDF2Parser", "PyPDF2Parser"),
("swarmauri_community.parsers.concrete.PyPDFTKParser", "PyPDFTKParser"),
("swarmauri_community.parsers.concrete.TextBlobNounParser", "TextBlobNounParser"),
("swarmauri_community.parsers.concrete.TextBlobSentenceParser", "TextBlobSentenceParser"),
]

for module_name, class_name in parsers_files:
globals()[class_name] = _lazy_import(module_name, class_name)

__all__ = [class_name for _, class_name in parsers_files]
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# -*- coding: utf-8 -*-
from swarmauri.utils._lazy_import import _lazy_import

from swarmauri_community.retrievers.concrete.RedisDocumentRetriever import (
RedisDocumentRetriever,
)
retriever_files = [
("swarmauri_community.retrievers.concrete.RedisDocumentRetriever", "RedisDocumentRetriever"),
]

for module_name, class_name in retriever_files:
globals()[class_name] = _lazy_import(module_name, class_name)

__all__ = [class_name for _, class_name in retriever_files]
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
from swarmauri_community.toolkits.concrete.GithubToolkit import *
from swarmauri.utils._lazy_import import _lazy_import

toolkits_files = [
("swarmauri_community.toolkits.concrete.GithubToolkit", "GithubToolkit"),
]

for module_name, class_name in toolkits_files:
globals()[class_name] = _lazy_import(module_name, class_name)

__all__ = [class_name for _, class_name in toolkits_files]
62 changes: 32 additions & 30 deletions pkgs/community/swarmauri_community/tools/concrete/__init__.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
from swarmauri_community.tools.concrete.CaptchaGeneratorTool import CaptchaGeneratorTool
from swarmauri_community.tools.concrete.DaleChallReadabilityTool import (
DaleChallReadabilityTool,
)
from swarmauri_community.tools.concrete.DownloadPdfTool import DownloadPDFTool
from swarmauri_community.tools.concrete.EntityRecognitionTool import (
EntityRecognitionTool,
)
from swarmauri_community.tools.concrete.FoliumTool import FoliumTool
from swarmauri_community.tools.concrete.GithubBranchTool import GithubBranchTool
from swarmauri_community.tools.concrete.GithubCommitTool import GithubCommitTool
from swarmauri_community.tools.concrete.GithubIssueTool import GithubIssueTool
from swarmauri_community.tools.concrete.GithubPRTool import GithubPRTool
from swarmauri_community.tools.concrete.GithubRepoTool import GithubRepoTool
from swarmauri_community.tools.concrete.GithubTool import GithubTool
from swarmauri_community.tools.concrete.GmailReadTool import GmailReadTool
from swarmauri_community.tools.concrete.GmailSendTool import GmailSendTool
from swarmauri_community.tools.concrete.LexicalDensityTool import LexicalDensityTool
from swarmauri_community.tools.concrete.PsutilTool import PsutilTool
from swarmauri_community.tools.concrete.QrCodeGeneratorTool import QrCodeGeneratorTool
from swarmauri_community.tools.concrete.SentenceComplexityTool import (
SentenceComplexityTool,
)
from swarmauri_community.tools.concrete.SentimentAnalysisTool import (
SentimentAnalysisTool,
)
from swarmauri_community.tools.concrete.SMOGIndexTool import SMOGIndexTool
from swarmauri_community.tools.concrete.WebScrapingTool import WebScrapingTool
from swarmauri_community.tools.concrete.ZapierHookTool import ZapierHookTool
from swarmauri.utils._lazy_import import _lazy_import

# from swarmauri_community.tools.concrete.PaCMAPTool import PaCMAPTool
tool_files = [
("swarmauri_community.tools.concrete.CaptchaGeneratorTool", "CaptchaGeneratorTool"),
("swarmauri_community.tools.concrete.DaleChallReadabilityTool", "DaleChallReadabilityTool"),
("swarmauri_community.tools.concrete.DownloadPdfTool", "DownloadPDFTool"),
("swarmauri_community.tools.concrete.EntityRecognitionTool", "EntityRecognitionTool"),
("swarmauri_community.tools.concrete.FoliumTool", "FoliumTool"),
("swarmauri_community.tools.concrete.GithubBranchTool", "GithubBranchTool"),
("swarmauri_community.tools.concrete.GithubCommitTool", "GithubCommitTool"),
("swarmauri_community.tools.concrete.GithubIssueTool", "GithubIssueTool"),
("swarmauri_community.tools.concrete.GithubPRTool", "GithubPRTool"),
("swarmauri_community.tools.concrete.GithubRepoTool", "GithubRepoTool"),
("swarmauri_community.tools.concrete.GithubTool", "GithubTool"),
("swarmauri_community.tools.concrete.GmailReadTool", "GmailReadTool"),
("swarmauri_community.tools.concrete.GmailSendTool", "GmailSendTool"),
("swarmauri_community.tools.concrete.LexicalDensityTool", "LexicalDensityTool"),
("swarmauri_community.tools.concrete.PsutilTool", "PsutilTool"),
("swarmauri_community.tools.concrete.QrCodeGeneratorTool", "QrCodeGeneratorTool"),
("swarmauri_community.tools.concrete.SentenceComplexityTool", "SentenceComplexityTool"),
("swarmauri_community.tools.concrete.SentimentAnalysisTool", "SentimentAnalysisTool"),
("swarmauri_community.tools.concrete.SMOGIndexTool", "SMOGIndexTool"),
("swarmauri_community.tools.concrete.WebScrapingTool", "WebScrapingTool"),
("swarmauri_community.tools.concrete.ZapierHookTool", "ZapierHookTool"),
# ("swarmauri_community.tools.concrete.PaCMAPTool", "PaCMAPTool"),
]

# Lazy loading of tools, storing them in variables
for module_name, class_name in tool_files:
globals()[class_name] = _lazy_import(module_name, class_name)

# Adding the lazy-loaded tools to __all__
__all__ = [class_name for _, class_name in tool_files]
Empty file.
Loading
Loading