fix: pinned nanobind, disabled benchmark for docker, and isolated state endpoint
Browse files- hf auditor/CMakeLists.txt +3 -1
- server/app.py +4 -4
hf auditor/CMakeLists.txt
CHANGED
|
@@ -53,7 +53,7 @@ include(FetchContent)
|
|
| 53 |
FetchContent_Declare(
|
| 54 |
nanobind
|
| 55 |
GIT_REPOSITORY https://github.com/wjakob/nanobind.git
|
| 56 |
-
GIT_TAG
|
| 57 |
)
|
| 58 |
FetchContent_MakeAvailable(nanobind)
|
| 59 |
|
|
@@ -76,6 +76,7 @@ target_link_libraries(hft_auditor PRIVATE Threads::Threads)
|
|
| 76 |
|
| 77 |
# ββ Google Benchmark Integration ββββββββββββββββββββββββββββββββββββββββββ
|
| 78 |
#
|
|
|
|
| 79 |
# Prevents benchmark from pulling GTest as a transitive dependency
|
| 80 |
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
|
| 81 |
# Disables -Werror to prevent unhandled enum warnings in sysinfo.cc from breaking the build
|
|
@@ -99,6 +100,7 @@ target_include_directories(hft_benchmarks PRIVATE
|
|
| 99 |
${nanobind_SOURCE_DIR}/include
|
| 100 |
${Python_INCLUDE_DIRS}
|
| 101 |
)
|
|
|
|
| 102 |
|
| 103 |
# Link against benchmark_main to avoid writing a main() function
|
| 104 |
target_link_libraries(hft_benchmarks PRIVATE
|
|
|
|
| 53 |
FetchContent_Declare(
|
| 54 |
nanobind
|
| 55 |
GIT_REPOSITORY https://github.com/wjakob/nanobind.git
|
| 56 |
+
GIT_TAG v2.2.0
|
| 57 |
)
|
| 58 |
FetchContent_MakeAvailable(nanobind)
|
| 59 |
|
|
|
|
| 76 |
|
| 77 |
# ββ Google Benchmark Integration ββββββββββββββββββββββββββββββββββββββββββ
|
| 78 |
#
|
| 79 |
+
if(NOT DOCKER_SAFE_BUILD)
|
| 80 |
# Prevents benchmark from pulling GTest as a transitive dependency
|
| 81 |
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
|
| 82 |
# Disables -Werror to prevent unhandled enum warnings in sysinfo.cc from breaking the build
|
|
|
|
| 100 |
${nanobind_SOURCE_DIR}/include
|
| 101 |
${Python_INCLUDE_DIRS}
|
| 102 |
)
|
| 103 |
+
endif()
|
| 104 |
|
| 105 |
# Link against benchmark_main to avoid writing a main() function
|
| 106 |
target_link_libraries(hft_benchmarks PRIVATE
|
server/app.py
CHANGED
|
@@ -168,7 +168,7 @@ async def execute_llm_step(api_key: str, base_url: str, model_name: str, batch_s
|
|
| 168 |
# ==============================================================================
|
| 169 |
# PHASE 3: API ENDPOINTS (The Data Pipeline)
|
| 170 |
# ==============================================================================
|
| 171 |
-
@app.get("/state")
|
| 172 |
async def get_state():
|
| 173 |
# FIX: Check the dynamically tracked instance instead of the old static one
|
| 174 |
if not active_env_instance:
|
|
@@ -560,7 +560,7 @@ async def root_dashboard():
|
|
| 560 |
|
| 561 |
async function updateState() {
|
| 562 |
try {
|
| 563 |
-
const res = await fetch('/state');
|
| 564 |
const data = await res.json();
|
| 565 |
|
| 566 |
const h = data.health;
|
|
@@ -741,10 +741,10 @@ async def root_dashboard():
|
|
| 741 |
const reward = data.reward ?? data.observation?.reward ?? data.info?.reward ?? 0.0;
|
| 742 |
const done = data.done ?? data.observation?.done ?? data.info?.done ?? false;
|
| 743 |
|
| 744 |
-
// Fetch the authoritative step count from /state
|
| 745 |
let step = 'N/A';
|
| 746 |
try {
|
| 747 |
-
const stateRes = await fetch('/state');
|
| 748 |
const stateData = await stateRes.json();
|
| 749 |
step = stateData.step_count ?? 'N/A';
|
| 750 |
} catch(se) {} // Swallow β non-critical
|
|
|
|
| 168 |
# ==============================================================================
|
| 169 |
# PHASE 3: API ENDPOINTS (The Data Pipeline)
|
| 170 |
# ==============================================================================
|
| 171 |
+
@app.get("/dashboard/state")
|
| 172 |
async def get_state():
|
| 173 |
# FIX: Check the dynamically tracked instance instead of the old static one
|
| 174 |
if not active_env_instance:
|
|
|
|
| 560 |
|
| 561 |
async function updateState() {
|
| 562 |
try {
|
| 563 |
+
const res = await fetch('/dashboard/state');
|
| 564 |
const data = await res.json();
|
| 565 |
|
| 566 |
const h = data.health;
|
|
|
|
| 741 |
const reward = data.reward ?? data.observation?.reward ?? data.info?.reward ?? 0.0;
|
| 742 |
const done = data.done ?? data.observation?.done ?? data.info?.done ?? false;
|
| 743 |
|
| 744 |
+
// Fetch the authoritative step count from /dashboard/state
|
| 745 |
let step = 'N/A';
|
| 746 |
try {
|
| 747 |
+
const stateRes = await fetch('/dashboard/state');
|
| 748 |
const stateData = await stateRes.json();
|
| 749 |
step = stateData.step_count ?? 'N/A';
|
| 750 |
} catch(se) {} // Swallow β non-critical
|