Skip to content

Commit

Permalink
update models/readme.md
Browse files Browse the repository at this point in the history
Added an addition function for evaluate in Julia minimal server example to make it more consistent with python and C++ examples (earlier, an anonymous in-line function was used)
  • Loading branch information
purusharths authored May 14, 2024
1 parent 3b3a70a commit e0162d9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,15 @@ Optionally, configuration options may be passed to the model by the client: `con
For more flexibility, the model's input and output dimensions may optionally depend on `config`.

```
testmodel = UMBridge.Model(name="forward", inputSizes=[1], outputSizes=[1])
UMBridge.define_evaluate(testmodel, (input, config) -> (2*input))
# Define the model behavior
function evaluate(input::Vector{Any}, config::Dict{String, Any})
output = 2 * input
return [output]
end
UMBridge.serve_models([testmodel], 4242)
testmodel = UMBridge.Model(name="forward", inputSizes=[1], outputSizes=[1])
UMBridge.define_evaluate(testmodel, evaluate)
UMBridge.serve_models([testmodel], 4232)
```

## MUQ server
Expand Down

0 comments on commit e0162d9

Please sign in to comment.