From c7ca583535fab28cffddf720294b8f5ada141631 Mon Sep 17 00:00:00 2001 From: chun9l <97897047+chun9l@users.noreply.github.com> Date: Fri, 27 Feb 2026 12:03:37 +0000 Subject: [PATCH 1/3] Added example for other model functions --- lib/README.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/lib/README.md b/lib/README.md index a9788927..6e7805dd 100644 --- a/lib/README.md +++ b/lib/README.md @@ -175,6 +175,25 @@ Output key | Value type | Purpose -----------------|------------------|------------- output | Array of numbers | Gradient of objective +Input example: +```json +{ + "name": "posterior", + "inWrt": 0, + "outWrt": 0, + "sens": [1.1], + "input": [[0.0, 0.0]], + "config": {} +} +``` + +Output example: +```json +{ + "output":[-0.01957508257895159, 0.01957508257895159] +} +``` + ### POST /ApplyJacobian Input key | Value type | Purpose @@ -190,6 +209,25 @@ Output key | Value type | Purpose -----------------|------------------|------------- output | Array of numbers | Jacobian of output `outWrt` with respect to input parameter `inWrt` applied to vector `vec` +Input example: +```json +{ + "name": "posterior", + "inWrt": 0, + "outWrt": 0, + "vec": [1.1, 0.5], + "input": [[0.0, 0.0]], + "config": {} +} +``` + +Output example: +```json +{ + "output":[-0.01067731777033723] +} +``` + ### POST /ApplyHessian Input key | Value type | Purpose @@ -207,6 +245,26 @@ Output key | Value type | Purpose -----------------|------------------|------------- output | Array of numbers | Hessian at `input` applied to vector `vec` +```json +{ + "name": "posterior", + "inWrt1": 0, + "inWrt2": 0, + "outWrt": 0, + "vec": [1.1, 0.5], + "sens": [0.1], + "input": [[0.0, 0.0]], + "config": {} +} +``` + +Output example: +```json +{ + "output":[-0.27076762180664354] +} +``` + ### Errors Each endpoint may return errors, indicated by error codes (i.e. 400 for user errors, 500 for model side errors) and a JSON structure giving more detailed information. The following error types exist: From ff07d5f5c01a913c0783e7f3e42ee226103a5f7b Mon Sep 17 00:00:00 2001 From: chun9l <97897047+chun9l@users.noreply.github.com> Date: Fri, 6 Mar 2026 15:00:54 +0000 Subject: [PATCH 2/3] Added table for language specific features --- models/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/models/README.md b/models/README.md index bb2d3d81..732114f4 100644 --- a/models/README.md +++ b/models/README.md @@ -24,7 +24,15 @@ docker run -p 4242:4242 linusseelinger/model-testmodel-python:latest ## Implementation -A model may make use of the existing integrations below. They take care of the entire HTTP communication transparently, and provide easy to implement model interfaces. Refer to the models in this repository for working examples of the server integrations shown in the following. +A model may make use of the existing integrations below. They take care of the entire HTTP communication transparently, and provide easy to implement model interfaces. However, there are some features that are language specific. The table below briefly summarises these differences. + +| Implementation | Optional Error Checks | Allow Parallel Requests | Allow `Inf` & `NaN` Output | +|----------------|-----------------------|-------------------------|----------------------------| +| Python | Yes | Yes | WIP | +| C++ | Yes | Yes | No | +| Julia | No | Yes | Yes | + +Refer to the models in this repository for working examples of the server integrations shown in the following. ### Python server @@ -159,6 +167,7 @@ testmodel = UMBridge.Model(name="forward", inputSizes=[1], outputSizes=[1]) UMBridge.define_evaluate(testmodel, evaluate) UMBridge.serve_models([testmodel], 4232) ``` +[Full example sources here.](https://github.com/UM-Bridge/umbridge/tree/main/models/testmodel-julia) ## MUQ server From 08231cfe8986477d6bc38152a1a153975b0cb8d0 Mon Sep 17 00:00:00 2001 From: Chung Ming Loi <97897047+chun9l@users.noreply.github.com> Date: Fri, 6 Mar 2026 15:32:39 +0000 Subject: [PATCH 3/3] Add missing python package --- .github/workflows/client-python-emcee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/client-python-emcee.yml b/.github/workflows/client-python-emcee.yml index e3fb38f0..cd185e80 100644 --- a/.github/workflows/client-python-emcee.yml +++ b/.github/workflows/client-python-emcee.yml @@ -28,7 +28,7 @@ jobs: apt update && DEBIAN_FRONTEND="noninteractive" apt install -y python3-pip python3-venv python3 -m venv venv . venv/bin/activate - pip3 install numpy arviz emcee umbridge + pip3 install numpy arviz emcee umbridge matplotlib - name: Build and run run: |