Skip to content

Commit

Permalink
model_store to redis_model_store
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerhutcherson committed Jan 22, 2025
1 parent 90c9962 commit 6128171
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/redis_model_store.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"import os\n",
"import redis\n",
"\n",
"from model_store import ModelStore\n",
"from redis_model_store import ModelStore\n",
"\n",
"# Replace values below with your own if using Redis Cloud instance\n",
"REDIS_HOST = os.getenv(\"REDIS_HOST\", \"localhost\") # ex: \"redis-18374.c253.us-central1-1.gce.cloud.redislabs.com\"\n",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
]
packages = [{ include = "model_store", from = "." }]
packages = [{ include = "redis_model_store", from = "." }]

[tool.poetry.dependencies]
python = ">=3.9,<3.13"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any, Iterator, List

from model_store.serialize import PickleSerializer, SerializationError, Serializer
from redis_model_store.serialize import PickleSerializer, SerializationError, Serializer


class ModelShardManager:
Expand Down
4 changes: 2 additions & 2 deletions model_store/store.py → redis_model_store/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from redisvl.query import FilterQuery
from redisvl.query.filter import FilterExpression, Tag

from model_store.shard_manager import ModelShardManager
from model_store.utils import (
from redis_model_store.shard_manager import ModelShardManager
from redis_model_store.utils import (
PIPELINE_BATCH_SIZE,
current_timestamp,
new_model_version,
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@


def format():
subprocess.run(["isort", "./model_store", "./tests", "--profile", "black"], check=True)
subprocess.run(["black", "./model_store", "./tests"], check=True)
subprocess.run(["isort", "./redis_model_store", "./tests", "--profile", "black"], check=True)
subprocess.run(["black", "./redis_model_store", "./tests"], check=True)


def check_format():
subprocess.run(["black", "--check", "./model_store"], check=True)
subprocess.run(["black", "--check", "./redis_model_store"], check=True)


def sort_imports():
subprocess.run(["isort", "./model_store", "./tests/", "--profile", "black"], check=True)
subprocess.run(["isort", "./redis_model_store", "./tests/", "--profile", "black"], check=True)


def check_sort_imports():
subprocess.run(
["isort", "./model_store", "--check-only", "--profile", "black"], check=True
["isort", "./redis_model_store", "--check-only", "--profile", "black"], check=True
)


def check_lint():
subprocess.run(["pylint", "--rcfile=.pylintrc", "./model_store"], check=True)
subprocess.run(["pylint", "--rcfile=.pylintrc", "./redis_model_store"], check=True)


def check_mypy():
subprocess.run(["python", "-m", "mypy", "./model_store"], check=True)
subprocess.run(["python", "-m", "mypy", "./redis_model_store"], check=True)


def test():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_serialize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from model_store.serialize import PickleSerializer
from redis_model_store.serialize import PickleSerializer


@pytest.fixture
Expand Down
4 changes: 2 additions & 2 deletions tests/test_shard_manager.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

from model_store.serialize import PickleSerializer
from model_store.shard_manager import ModelShardManager, SerializationError
from redis_model_store.serialize import PickleSerializer
from redis_model_store.shard_manager import ModelShardManager, SerializationError


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest
from redis import Redis

from model_store.store import ModelStore, ModelStoreError, ModelVersion
from redis_model_store.store import ModelStore, ModelStoreError, ModelVersion


@pytest.fixture
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import uuid
from datetime import datetime, timezone

from model_store.utils import current_timestamp, new_model_version, setup_logger
from redis_model_store.utils import current_timestamp, new_model_version, setup_logger


def test_setup_logger():
Expand Down Expand Up @@ -41,7 +41,7 @@ def test_new_model_version():


def test_pipeline_batch_size_constant():
from model_store.utils import PIPELINE_BATCH_SIZE
from redis_model_store.utils import PIPELINE_BATCH_SIZE

assert isinstance(PIPELINE_BATCH_SIZE, int)
assert PIPELINE_BATCH_SIZE > 0

0 comments on commit 6128171

Please sign in to comment.