diff --git a/src/rai_bench/rai_bench/manipulation_o3de/benchmark.py b/src/rai_bench/rai_bench/manipulation_o3de/benchmark.py index ed53cad85..be0e86408 100644 --- a/src/rai_bench/rai_bench/manipulation_o3de/benchmark.py +++ b/src/rai_bench/rai_bench/manipulation_o3de/benchmark.py @@ -308,8 +308,7 @@ def run_next(self, agent: CompiledStateGraph, experiment_id: uuid.UUID) -> None: self.logger.error(msg=f"Task timeout: {e}") except GraphRecursionError as e: self.logger.error(msg=f"Reached recursion limit {e}") - except Exception as e: - self.logger.error(msg=f"Unexpected errot occured: {e}") + te = time.perf_counter() try: score = scenario.task.calculate_score(self.simulation_bridge) diff --git a/src/rai_bench/rai_bench/test_models.py b/src/rai_bench/rai_bench/test_models.py index 0501d811c..2528596e9 100644 --- a/src/rai_bench/rai_bench/test_models.py +++ b/src/rai_bench/rai_bench/test_models.py @@ -250,7 +250,12 @@ def test_models( bench_logger=bench_logger, ) except Exception as e: - bench_logger.critical(f"BENCHMARK RUN FAILED: {e}") + import traceback + bench_logger.critical( - f"{bench_conf.name} benchmark for {model_name}, vendor: {vendors[i]}, execution number: {u + 1}" + f"{bench_conf.name} benchmark for {model_name}, vendor: {vendors[i]}, repeat number: {u + 1}" ) + bench_logger.critical(f"BENCHMARK RUN FAILED: {e}") + error_msg = traceback.format_exc() + bench_logger.critical(error_msg) + print(error_msg) diff --git a/src/rai_bench/rai_bench/tool_calling_agent/benchmark.py b/src/rai_bench/rai_bench/tool_calling_agent/benchmark.py index aeb059d6b..44923c860 100644 --- a/src/rai_bench/rai_bench/tool_calling_agent/benchmark.py +++ b/src/rai_bench/rai_bench/tool_calling_agent/benchmark.py @@ -148,8 +148,7 @@ def run_next(self, agent: CompiledStateGraph, experiment_id: uuid.UUID) -> None: self.logger.error(msg=f"Task timeout: {e}") except GraphRecursionError as e: self.logger.error(msg=f"Reached recursion limit {e}") - except Exception as e: - self.logger.error(msg=f"Unexpected error occured: {e}") + tool_calls = task.get_tool_calls_from_messages(messages=messages) score = task.validate(tool_calls=tool_calls) te = time.perf_counter() diff --git a/src/rai_core/rai/tools/ros2/manipulation/custom.py b/src/rai_core/rai/tools/ros2/manipulation/custom.py index 1e7a38606..6e0d9655c 100644 --- a/src/rai_core/rai/tools/ros2/manipulation/custom.py +++ b/src/rai_core/rai/tools/ros2/manipulation/custom.py @@ -245,12 +245,12 @@ def _run( response = get_future_result(future, timeout_sec=20.0) if response is None: - return f"Service call failed for point ({x:.2f}, {y:.2f}, {z:.2f})." + return f"Service call failed for point ({x1:.2f}, {y1:.2f}, {z1:.2f})." if response.success: - return f"End effector successfully positioned at coordinates ({x:.2f}, {y:.2f}, {z:.2f}). Note: The status of object interaction (grab/drop) is not confirmed by this movement." + return f"End effector successfully positioned at coordinates ({x1:.2f}, {y1:.2f}, {z1:.2f}). Note: The status of object interaction (grab/drop) is not confirmed by this movement." else: - return f"Failed to position end effector at coordinates ({x:.2f}, {y:.2f}, {z:.2f})." + return f"Failed to position end effector at coordinates ({x1:.2f}, {y1:.2f}, {z1:.2f})." class GetObjectPositionsToolInput(BaseModel):