Skip to content

Failing to store models in container #107

@wibox

Description

@wibox

Hi everyone, i'm testing redisAI within a simple test environmenet and i'm just trying to do very basic stuff for now.

scripted_network = torch.jit.script(network)
scripted_network.save("my_model.pt")
binary_model = open("./my_model.pt", "rb").read()

client = redisai.Client(host="0.0.0.0", port=6379)
client.modelstore(
    key="new_model",
    backend="torch",
    device="cpu",
    data=binary_model,
    tag="1.0:latest"
)
print(client.modelscan())

But, whenever i run this simple script, i get:

Traceback (most recent call last):
File "/home/webbelle/test/redis_test.py", line 15, in
client.modelstore(
File "/home/webbelle/test/testenv/lib/python3.10/site-packages/redisai/client.py", line 247, in modelstore
chunk_size = self.config('MODEL_CHUNK_SIZE')
File "/home/webbelle/test/testenv/lib/python3.10/site-packages/redisai/client.py", line 183, in config
res = self.execute_command(args)
File "/home/webbelle/test/testenv/lib/python3.10/site-packages/redis/client.py", line 1269, in execute_command
return conn.retry.call_with_retry(
File "/home/webbelle/test/testenv/lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
File "/home/webbelle/test/testenv/lib/python3.10/site-packages/redis/client.py", line 1270, in
lambda: self._send_command_parse_response(
File "/home/webbelle/test/testenv/lib/python3.10/site-packages/redis/client.py", line 1246, in _send_command_parse_response
return self.parse_response(conn, command_name, **options)
File "/home/webbelle/test/testenv/lib/python3.10/site-packages/redis/client.py", line 1286, in parse_response
response = connection.read_response()
File "/home/webbelle/test/testenv/lib/python3.10/site-packages/redis/connection.py", line 905, in read_response
raise response
redis.exceptions.ResponseError: unsupported subcommand

and, the facto, the model is not there when i query the keys from the container's cli.
I'm using python 3.10.12 and running redisAI latest image through docker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions