Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for config command #98

Merged
merged 6 commits into from
Jun 14, 2022
Merged

Conversation

alonre24
Copy link
Collaborator

@alonre24 alonre24 commented Jun 1, 2022

Wrap AI.CONFIG with client.config API

redisai/client.py Outdated Show resolved Hide resolved
redisai/client.py Outdated Show resolved Hide resolved
redisai/client.py Outdated Show resolved Hide resolved
redisai/command_builder.py Outdated Show resolved Hide resolved
redisai/command_builder.py Outdated Show resolved Hide resolved
redisai/command_builder.py Outdated Show resolved Hide resolved
redisai/command_builder.py Outdated Show resolved Hide resolved
con = self.get_client()
model_path = os.path.join(MODEL_DIR, torch_graph)
pt_model = load_model(model_path)
self.assertEqual(con.modelstore("pt_model", "torch", "cpu", pt_model), 'OK')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to move to py+ asserts?
assert con.modeulstore("pt_model", "torch", "cpu", pt_model") == OK"

redisai/client.py Outdated Show resolved Hide resolved
redisai/command_builder.py Outdated Show resolved Hide resolved
test/test.py Outdated
@@ -648,6 +649,41 @@ def test_debug(self):
con.tensorset("x", (2, 3, 4, 5), dtype="float")
self.assertEqual(["AI.TENSORSET x FLOAT 4 VALUES 2 3 4 5"], output)

def test_config(self):
con = self.get_client()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasn't it changed to static methid?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right... I fixed a warning. Will change self to the name of the class

@sonarcloud
Copy link

sonarcloud bot commented Jun 13, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@alonre24 alonre24 merged commit 6a394f5 into master Jun 14, 2022
@alonre24 alonre24 deleted the add_support_for_config_command branch June 14, 2022 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants