Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Arief Rahmansyah committed Jan 5, 2024
1 parent ef176a0 commit 6a0847e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion python/pyfunc-server/test/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _get_free_port():
sock.close()


def _wait_server_ready(proc, url, timeout_second=300, tick_second=5):
def _wait_server_ready(proc, url, timeout_second=600, tick_second=10):
time.sleep(5)

ellapsed_second = 0
Expand Down
23 changes: 13 additions & 10 deletions python/sdk/merlin/pyfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,18 +562,21 @@ def _run_container(
for started_container in started_containers:
started_container.remove(force=True)

try:
env_vars["CARAML_HTTP_PORT"] = "8080"
env_vars["CARAML_GRPC_PORT"] = "9000"
env_vars["CARAML_MODEL_NAME"] = model_name
env_vars["CARAML_MODEL_VERSION"] = model_version
env_vars["CARAML_MODEL_FULL_NAME"] = model_full_name
env_vars["WORKERS"] = "1"
if env_vars is None:
env_vars = {}

env_vars["CARAML_HTTP_PORT"] = "8080"
env_vars["CARAML_GRPC_PORT"] = "9000"
env_vars["CARAML_MODEL_NAME"] = model_name
env_vars["CARAML_MODEL_VERSION"] = model_version
env_vars["CARAML_MODEL_FULL_NAME"] = model_full_name
env_vars["WORKERS"] = "1"

ports = {"8080/tcp": port}
if "CARAML_PROTOCOL" in env_vars and env_vars["CARAML_PROTOCOL"] == "UPI_V1":
ports = {"9000/tcp": port}
ports = {"8080/tcp": port}
if "CARAML_PROTOCOL" in env_vars and env_vars["CARAML_PROTOCOL"] == "UPI_V1":
ports = {"9000/tcp": port}

try:
container = docker_client.containers.run(
image=image_tag,
name=model_name,
Expand Down

0 comments on commit 6a0847e

Please sign in to comment.