From b934dba314851c6293a538f3a03f118b03b95a06 Mon Sep 17 00:00:00 2001 From: Bagaev Dmitry Date: Mon, 21 Jul 2025 09:38:44 +0200 Subject: [PATCH 1/6] add 1.12 to CI --- .github/workflows/CI.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ce94751f..2c27577c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -27,6 +27,7 @@ jobs: matrix: version: - '1.11' + - '1.12' os: - ubuntu-latest arch: @@ -42,7 +43,7 @@ jobs: - name: Run tests env: RXINFER_SERVER_ENABLE_DEBUG_LOGGING: ${{ github.event_name == 'workflow_dispatch' }} - TRACE_COMPILE_PATH: ${{ github.workspace }}/server-compilation-trace.jl + TRACE_COMPILE_PATH: ${{ github.workspace }}/julia-${{ matrix.version }}-compilation-trace.jl run: | # Start the docker compose environment make docker-start @@ -64,11 +65,20 @@ jobs: # Exit with the test exit code exit $TEST_EXIT_CODE - - name: Upload trace compilation artifact + - name: Upload Julia-specific trace compilation artifact + uses: actions/upload-artifact@v4 + with: + name: julia-${{ matrix.version }}-compilation-trace + path: julia-${{ matrix.version }}-compilation-trace.jl + retention-days: 30 + if-no-files-found: warn + + - name: Upload backward-compatible trace compilation artifact + if: matrix.version == '1.11' uses: actions/upload-artifact@v4 with: name: server-compilation-trace - path: server-compilation-trace.jl + path: julia-1.11-compilation-trace.jl retention-days: 30 if-no-files-found: warn From 5d6b4bf6c2872bfeee69bd9f7110d92f60ed4283 Mon Sep 17 00:00:00 2001 From: Bagaev Dmitry Date: Mon, 21 Jul 2025 09:50:46 +0200 Subject: [PATCH 2/6] 2prev --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2c27577c..86772267 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -36,6 +36,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: + include-all-prereleases: true version: ${{ matrix.version }} arch: ${{ matrix.arch }} - uses: julia-actions/cache@v2 From 1fedd2121bdb12ca16e26aaa741fb33b6e477814 Mon Sep 17 00:00:00 2001 From: Bagaev Dmitry Date: Mon, 25 Aug 2025 13:21:54 +0200 Subject: [PATCH 3/6] try fix 1.12 --- src/hotreload.jl | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/hotreload.jl b/src/hotreload.jl index 2407e355..867e9773 100644 --- a/src/hotreload.jl +++ b/src/hotreload.jl @@ -120,10 +120,20 @@ function hot_reload_task_models(server::ServerState) locations = vcat(locations, [Models.RXINFER_SERVER_TEST_MODELS_LOCATION()]) end - hot_reload_models_locations = [ - joinpath(root, file) for location in locations for (root, _, files) in walkdir(location) if isdir(location) for - file in files - ] + # Double check that the specified locations are valid + hot_reload_models_locations = String[] + for location in locations + if isdir(location) + for (root, _, files) in walkdir(location) + for file in files + if isdir(joinpath(root, file)) + push!(hot_reload_models_locations, string(joinpath(root, file))) + end + end + end + end + end + return hot_reload_task(:models, server, hot_reload_models_locations, []; all = false) do Models.reload!(Models.get_models_dispatcher()) @warn "[HOT-RELOAD] Models have been reloaded" _id = :hot_reload From f581fecfccad2cc7f461f4046e35b1f261502d4e Mon Sep 17 00:00:00 2001 From: Bagaev Dmitry Date: Mon, 25 Aug 2025 13:35:44 +0200 Subject: [PATCH 4/6] 2prev --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 5145c1c8..91bf8dcd 100644 --- a/Project.toml +++ b/Project.toml @@ -42,7 +42,7 @@ LinearAlgebra = "1.11.0" Logging = "1.11.0" LoggingExtras = "1.1.0" MiniLoggers = "0.5.3" -Mongoc = "0.9.2" +Mongoc = "0.9.2, 0.10" Pkg = "1.11.0" Random = "1.11.0" Revise = "3.7.2" From d89d8be707c8fcd1dc54e2f329f18cf32d6a81a9 Mon Sep 17 00:00:00 2001 From: Bagaev Dmitry Date: Mon, 25 Aug 2025 13:48:12 +0200 Subject: [PATCH 5/6] try to use as_dict --- src/tags/Models.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tags/Models.jl b/src/tags/Models.jl index f65eabf6..c1bfc226 100644 --- a/src/tags/Models.jl +++ b/src/tags/Models.jl @@ -487,7 +487,7 @@ function __database_op_get_model_instance(; token, instance_id) end if !isnothing(result) - result = Dict(result) + result = Mongoc.as_dict(result) # Deserialize the state if it exists and in binary format if haskey(result, "state") && isa(result["state"], Vector{UInt8}) result["state"] = Models.deserialize_state(result["state"]) From 5bd8b7732053e8c09c6fb9853e2b8c15a543a630 Mon Sep 17 00:00:00 2001 From: Bagaev Dmitry Date: Tue, 25 Nov 2025 13:39:20 +0100 Subject: [PATCH 6/6] fix hotreload for models --- src/hotreload.jl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/hotreload.jl b/src/hotreload.jl index 867e9773..2059c94a 100644 --- a/src/hotreload.jl +++ b/src/hotreload.jl @@ -121,19 +121,20 @@ function hot_reload_task_models(server::ServerState) end # Double check that the specified locations are valid - hot_reload_models_locations = String[] - for location in locations - if isdir(location) - for (root, _, files) in walkdir(location) - for file in files - if isdir(joinpath(root, file)) - push!(hot_reload_models_locations, string(joinpath(root, file))) - end - end + hot_reload_models_locations = [] + for location in filter(isdir, locations) + for (root, _, files) in walkdir(location) + for file in files + model_location = joinpath(root, file) + push!(hot_reload_models_locations, model_location) + @warn "[HOT-RELOAD] Adding model location `$(model_location)` to the hot reload task" _id = :hot_reload end end end + @warn "[HOT-RELOAD] Model locations have been loaded, any new models will NOT be tracked, restart the server to track new models" _id = + :hot_reload + return hot_reload_task(:models, server, hot_reload_models_locations, []; all = false) do Models.reload!(Models.get_models_dispatcher()) @warn "[HOT-RELOAD] Models have been reloaded" _id = :hot_reload