diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ecb79ce..0274763 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.10", "3.11"] services: # Label used to access the service container redis: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 861b305..8648b07 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-merge-conflict - id: check-added-large-files - repo: https://github.com/timothycrosley/isort - rev: 5.9.3 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black diff --git a/Makefile b/Makefile index 41d1887..5fc797f 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,16 @@ dev: pip install -e .[all] - pip install -e git+https://github.com/microsoft/DeepSpeed.git#egg=deepspeed pre-commit install test: dev check pytest tests -deepspeed: - pip install -e git+https://github.com/microsoft/DeepSpeed.git#egg=deepspeed - format: isort --atomic manifest/ tests/ web_app/ black manifest/ tests/ web_app/ check: - isort -c manifest/ tests/ web_app/ + isort -c -v manifest/ tests/ web_app/ black manifest/ tests/ web_app/ --check flake8 manifest/ tests/ web_app/ mypy manifest/ tests/ web_app/ diff --git a/manifest/api/models/huggingface.py b/manifest/api/models/huggingface.py index 7792b1d..81d3b6f 100644 --- a/manifest/api/models/huggingface.py +++ b/manifest/api/models/huggingface.py @@ -3,6 +3,7 @@ from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Union, cast +import deepspeed import numpy as np import PIL import torch @@ -26,7 +27,6 @@ PreTrainedTokenizer, ) -import deepspeed from manifest.api.models.model import Model MODEL_REGISTRY = { diff --git a/pyproject.toml b/pyproject.toml index 51416b7..2a33be2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,23 @@ combine_as_imports = true force_grid_wrap = 0 include_trailing_comma = true known_first_party = ["manifest"] +known_third_party = [ + "accelerate", + "accelerate.utils.modeling", + "deepspeed", + "diffusers", + "dill", + "flask", + "numpy", + "pyChatGPT", + "torch", + "transformers", + "tqdm", + "tqdm.asyncio", + "sentence_transformers", + "sqlalchemy", + "sqlitedict", +] line_length = 88 multi_line_output = 3 diff --git a/setup.py b/setup.py index 993ed3d..ebefb41 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ URL = "https://github.com/HazyResearch/manifest" EMAIL = "laurel.orr@numbersstation.ai" AUTHOR = "Laurel Orr" -REQUIRES_PYTHON = ">=3.8.0" +REQUIRES_PYTHON = ">=3.10.0" VERSION = main_ns["__version__"] # What packages are required for this module to be executed? @@ -43,12 +43,12 @@ EXTRAS = { "api": [ "accelerate>=0.10.0", - "deepspeed>=0.7.0", + "deepspeed>=0.10.0", "diffusers>=0.6.0", "Flask>=2.1.2", "sentence_transformers>=2.2.0", "torch>=1.8.0", - "transformers>=4.29.0,<4.31.0", + "transformers>=4.29.0", "tokenizers>=0.13.3", ], "app": [ @@ -66,7 +66,7 @@ "dev": [ "autopep8>=1.6.0", "black>=22.3.0", - "isort>=5.9.3", + "isort>=5.13.2", "flake8>=4.0.0", "flake8-docstrings>=1.6.0", "mypy>=0.950",