From d576d20f026c8021eaf4ca7c881124d69962aa0b Mon Sep 17 00:00:00 2001 From: endomorphosis Date: Mon, 2 Sep 2024 02:58:52 -0700 Subject: [PATCH] chore: Update package names and dependencies --- example.py | 2 +- {ipfs_transformers => ipfs_transformers_py}/__init__.py | 0 {ipfs_transformers => ipfs_transformers_py}/ipfs_kit.py | 0 .../ipfs_transformers.py | 0 .../ipfs_transformers_generator.py | 0 .../ipfs_transformers_template.py | 2 +- {ipfs_transformers => ipfs_transformers_py}/test/test_fio.py | 0 .../test/test_hf_ipfs.py | 2 +- requirements.txt | 3 ++- 9 files changed, 5 insertions(+), 4 deletions(-) rename {ipfs_transformers => ipfs_transformers_py}/__init__.py (100%) rename {ipfs_transformers => ipfs_transformers_py}/ipfs_kit.py (100%) rename {ipfs_transformers => ipfs_transformers_py}/ipfs_transformers.py (100%) rename {ipfs_transformers => ipfs_transformers_py}/ipfs_transformers_generator.py (100%) rename {ipfs_transformers => ipfs_transformers_py}/ipfs_transformers_template.py (97%) rename {ipfs_transformers => ipfs_transformers_py}/test/test_fio.py (100%) rename {ipfs_transformers => ipfs_transformers_py}/test/test_hf_ipfs.py (97%) diff --git a/example.py b/example.py index d105374..253fb6d 100644 --- a/example.py +++ b/example.py @@ -1,5 +1,5 @@ from transformers import AutoModel -from ipfs_transformers import AutoModel +from ipfs_transformers_py import AutoModel model = AutoModel.from_auto_download("bge-small-en-v1.5") print(dir(model)) diff --git a/ipfs_transformers/__init__.py b/ipfs_transformers_py/__init__.py similarity index 100% rename from ipfs_transformers/__init__.py rename to ipfs_transformers_py/__init__.py diff --git a/ipfs_transformers/ipfs_kit.py b/ipfs_transformers_py/ipfs_kit.py similarity index 100% rename from ipfs_transformers/ipfs_kit.py rename to ipfs_transformers_py/ipfs_kit.py diff --git a/ipfs_transformers/ipfs_transformers.py b/ipfs_transformers_py/ipfs_transformers.py similarity index 100% rename from ipfs_transformers/ipfs_transformers.py rename to ipfs_transformers_py/ipfs_transformers.py diff --git a/ipfs_transformers/ipfs_transformers_generator.py b/ipfs_transformers_py/ipfs_transformers_generator.py similarity index 100% rename from ipfs_transformers/ipfs_transformers_generator.py rename to ipfs_transformers_py/ipfs_transformers_generator.py diff --git a/ipfs_transformers/ipfs_transformers_template.py b/ipfs_transformers_py/ipfs_transformers_template.py similarity index 97% rename from ipfs_transformers/ipfs_transformers_template.py rename to ipfs_transformers_py/ipfs_transformers_template.py index 4164e59..9f2421c 100644 --- a/ipfs_transformers/ipfs_transformers_template.py +++ b/ipfs_transformers_py/ipfs_transformers_template.py @@ -60,7 +60,7 @@ def __init__(self, collection=None, meta=None): "s3_cfg": self.s3cfg, "role": self.role } - from ipfs_transformers.model_manager_bak import model_manager as model_manager + from ipfs_transformers_py.model_manager_bak import model_manager as model_manager self.model_manager = model_manager(collection, meta) self.model_manager.load_collection_cache() self.model_manager.state() diff --git a/ipfs_transformers/test/test_fio.py b/ipfs_transformers_py/test/test_fio.py similarity index 100% rename from ipfs_transformers/test/test_fio.py rename to ipfs_transformers_py/test/test_fio.py diff --git a/ipfs_transformers/test/test_hf_ipfs.py b/ipfs_transformers_py/test/test_hf_ipfs.py similarity index 97% rename from ipfs_transformers/test/test_hf_ipfs.py rename to ipfs_transformers_py/test/test_hf_ipfs.py index 999be64..de416bc 100644 --- a/ipfs_transformers/test/test_hf_ipfs.py +++ b/ipfs_transformers_py/test/test_hf_ipfs.py @@ -16,7 +16,7 @@ def test(self, **kwargs): from transformers import AutoModel #model = AutoModel.from_pretrained("google-bert/bert-base-cased") #what do we want to call the library? - from ipfs_transformers import AutoModel + from ipfs_transformers_py import AutoModel #do we want to use the ipfs hash or the model name? This requires IPNS to be enabled #model = T5Model.from_ipfs("QmWJr4M1VN5KpJjqCsJsJg7PDmFoqQYs1BKpYxcdMY1qkh") #model = AutoModelForSeq2SeqLM.from_auto_download("t0") # 40GB test this afterwards diff --git a/requirements.txt b/requirements.txt index 807a3c0..6078227 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ -ipfs_kit@git+https://github.com/endomorphosis/ipfs_kit.git +ipfs_kit_py +ipfs_model_manager_py transformers torch torchvision