[Serving] Update the details of the inference service (#70)
* Update the details of the inference service startup * add functions to compute and update robot-specific action/state normalization stats * Update for pre-commit * Union compute_action_statistics code into update_action_statistics * Update for pre-commit * Add default value for dof_config and agent_pos_config --------- Co-authored-by: farmer <farmer@x2robot.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import http
|
||||
import logging
|
||||
import time
|
||||
import traceback
|
||||
from typing import Dict, Any
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
try:
|
||||
import msgpack
|
||||
@@ -54,7 +54,7 @@ class WebsocketPolicyServer:
|
||||
policy: BasePolicy,
|
||||
host: str = "0.0.0.0",
|
||||
port: int = 8000,
|
||||
metadata: Dict | None = None,
|
||||
metadata: Optional[Dict] = None,
|
||||
) -> None:
|
||||
self._policy = policy
|
||||
self._host = host
|
||||
@@ -126,7 +126,7 @@ class WebsocketPolicyServer:
|
||||
|
||||
def _health_check(
|
||||
connection: _server.ServerConnection, request: _server.Request
|
||||
) -> _server.Response | None:
|
||||
) -> Optional[_server.Response]:
|
||||
if request.path == "/healthz":
|
||||
return connection.respond(http.HTTPStatus.OK, "OK\n")
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user