Skip to content

Commit

Permalink
FIx lint
Browse files Browse the repository at this point in the history
  • Loading branch information
al-rigazzi committed Dec 1, 2023
1 parent 05f96dd commit 7743d47
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions smartsim/_core/_cli/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

import argparse
import io
import multiprocessing as mp
import os
import socket
import tempfile
Expand Down Expand Up @@ -84,12 +83,13 @@ def execute(args: argparse.Namespace, /) -> int:
"""
from importlib.util import find_spec

torch_available = find_spec("torch")
tensorflow_available = find_spec("tensorflow")
onnx_available = find_spec("skl2onnx") and find_spec("sklearn")
torch_available = find_spec("torch") is not None
tensorflow_available = find_spec("tensorflow") is not None
onnx_available = (
find_spec("skl2onnx") is not None and find_spec("sklearn") is not None
)

backends = installed_redisai_backends()
has_tf = False
try:
with _VerificationTempDir(dir=os.getcwd()) as temp_dir:
test_install(
Expand Down Expand Up @@ -230,7 +230,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
forward_input = torch.rand(1, 1, 3, 3)
traced = torch.jit.trace(net, forward_input) # type: ignore[no-untyped-call]
buffer = io.BytesIO()
torch.jit.save(traced, buffer) # type: ignore[no-untyped-call]
torch.jit.save(traced, buffer) # type: ignore[no-untyped-call]
model = buffer.getvalue()

client.set_model("torch-nn", model, backend="TORCH", device=device)
Expand Down

0 comments on commit 7743d47

Please sign in to comment.