diff --git a/Makefile b/Makefile index 50467817..28635fe1 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ all: pkgs pkgs: pip3 wheel --no-deps --wheel-dir dist trustgraph-core/ + pip3 wheel --no-deps --wheel-dir dist trustgraph-embeddings-hf/ # container diff --git a/trustgraph-core/scripts/embeddings-hf b/trustgraph-core/scripts/embeddings-hf deleted file mode 100755 index 734803de..00000000 --- a/trustgraph-core/scripts/embeddings-hf +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.core.embeddings.hf import run - -run() - diff --git a/trustgraph-core/setup.py b/trustgraph-core/setup.py index ea22b9f0..a31bfcbd 100644 --- a/trustgraph-core/setup.py +++ b/trustgraph-core/setup.py @@ -27,18 +27,13 @@ setuptools.setup( python_requires='>=3.8', download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz", install_requires=[ - "torch", "urllib3", - "transformers", - "sentence-transformers", "rdflib", "pymilvus", "langchain", "langchain-core", - "langchain-huggingface", "langchain-text-splitters", "langchain-community", - "huggingface-hub", "requests", "cassandra-driver", "pulsar-client", @@ -66,7 +61,6 @@ setuptools.setup( "scripts/de-write-qdrant", "scripts/document-rag", "scripts/dump-parquet", - "scripts/embeddings-hf", "scripts/embeddings-ollama", "scripts/embeddings-vectorize", "scripts/ge-dump-parquet", diff --git a/trustgraph-embeddings-hf/scripts/embeddings-hf b/trustgraph-embeddings-hf/scripts/embeddings-hf new file mode 100644 index 00000000..09bb5d2f --- /dev/null +++ b/trustgraph-embeddings-hf/scripts/embeddings-hf @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +from trustgraph.embeddings_hf.embeddings.hf import run + +run() + diff --git a/trustgraph-embeddings-hf/setup.py b/trustgraph-embeddings-hf/setup.py new file mode 100644 index 00000000..2202b934 --- /dev/null +++ b/trustgraph-embeddings-hf/setup.py @@ -0,0 +1,47 @@ +import setuptools +import os + +with open("../README.md", "r") as fh: + long_description = fh.read() + +version = "0.11.0" + +setuptools.setup( + name="trustgraph-embeddings-hf", + version=version, + author="trustgraph.ai", + author_email="security@trustgraph.ai", + description="HuggingFace embeddings support for TrustGraph.", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/trustgraph-ai/trustgraph", + packages=setuptools.find_namespace_packages( + where='./', +# include=['trustgraph.core'] + ), + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Operating System :: OS Independent", + ], + python_requires='>=3.8', + download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz", + install_requires=[ + "trustgraph-core", + "torch", + "urllib3", + "transformers", + "sentence-transformers", + "langchain", + "langchain-core", + "langchain-huggingface", + "langchain-community", + "huggingface-hub", + "pulsar-client", + "pyyaml", + "prometheus-client", + ], + scripts=[ + "scripts/embeddings-hf", + ] +) diff --git a/trustgraph-embeddings-hf/trustgraph/embeddings_hf/__init__.py b/trustgraph-embeddings-hf/trustgraph/embeddings_hf/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/trustgraph-embeddings-hf/trustgraph/embeddings_hf/embeddings/__init__.py b/trustgraph-embeddings-hf/trustgraph/embeddings_hf/embeddings/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/trustgraph-core/trustgraph/core/embeddings/hf/__init__.py b/trustgraph-embeddings-hf/trustgraph/embeddings_hf/embeddings/hf/__init__.py similarity index 100% rename from trustgraph-core/trustgraph/core/embeddings/hf/__init__.py rename to trustgraph-embeddings-hf/trustgraph/embeddings_hf/embeddings/hf/__init__.py diff --git a/trustgraph-core/trustgraph/core/embeddings/hf/__main__.py b/trustgraph-embeddings-hf/trustgraph/embeddings_hf/embeddings/hf/__main__.py similarity index 100% rename from trustgraph-core/trustgraph/core/embeddings/hf/__main__.py rename to trustgraph-embeddings-hf/trustgraph/embeddings_hf/embeddings/hf/__main__.py diff --git a/trustgraph-core/trustgraph/core/embeddings/hf/hf.py b/trustgraph-embeddings-hf/trustgraph/embeddings_hf/embeddings/hf/hf.py similarity index 100% rename from trustgraph-core/trustgraph/core/embeddings/hf/hf.py rename to trustgraph-embeddings-hf/trustgraph/embeddings_hf/embeddings/hf/hf.py