Skip to content

Commit

Permalink
Code cleanup, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Ostrzyciel committed Jan 13, 2024
1 parent f8a5fa7 commit 3f454dd
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,42 @@ Where `<args>` are the arguments to the benchmark driver:
- host – host to send requests to
- port – port to send requests to
- For `car`:
- batchSize – size of each batch
- intervalMillis – interval between batches in milliseconds
- nBatches – number of batches to generate
- batchSize – size of batches sent to the MIS
- intervalMillis – interval between vehicle scans in milliseconds
- nBatches – number of vehicle scans to generate
- host – host to send requests to
- port – port to send requests to

### Data

TODO
The inference data should be placed in the `/worker/data` directory of the container. The directory structure should be as follows:

- `/worker/data`
- `accel.csv` – acceleration data, downloaded from [here](https://github.com/Modular-ML-inference/ml-usecase/blob/main/fall_detection/data/test_accel.csv)
- `car` – directory containing the subset of the [CarDD dataset](https://cardd-ustc.github.io/), obtained using the instructions [here](https://github.com/Modular-ML-inference/ml-usecase).

### Benchmark scripts

TODO
The `bin` directory contains Bash scripts useful for reproducing the experiments from the paper. The scripts use the aforementioned Docker container and assume that the data is placed in the `./data` directory on the host machine, the results are then saved in the `./out` directory.

- `fall.sh` – fall detection benchmark, using only one client at a time (used in the tests with the GWEN).
- `fall_multiple.sh` – fall detection benchmark, using multiple clients at a time (used in the tests with the x86-64 server).
- `car.sh` – scratch detection benchmark.

All scripts take two positional arguments:

- Hostname/IP of the Modular Inference Server
- Port of the Modular Inference Server

### Examples

- Run the `fall` test with 10 workers, 500ms between requests, 100 requests, sending to `10.0.0.2:8080`:
```bash
java -jar /app/benchmark-assembly.jar fall 10 500 100 10.0.0.2 8080
```
- Run the `car` test with 5 images per batch, 2 minutes (120000 ms) between batches, 100 batches, sending to `localhost:8080`:
- Run the `car` test with 4 images per batch, 3 minutes (180000 ms) between scans, 15 vehicle scans, sending to `localhost:8080`:
```bash
java -jar /app/benchmark-assembly.jar car 5 120000 100 10.0.0.2 8080
java -jar /app/benchmark-assembly.jar car 4 180000 15 10.0.0.2 8080
```

## Authors
Expand Down
2 changes: 1 addition & 1 deletion bin/car.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eux

BATCHES="1 4 16"
CLIENTS="1 4 16"
CLIENTS="1 2 4"

docker pull ghcr.io/modular-ml-inference/benchmark-driver:main

Expand Down
2 changes: 1 addition & 1 deletion bin/fall_multiple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eux

DEVICES="10 40 160"
CLIENTS="$3"
CLIENTS="1 4 16"

docker pull ghcr.io/modular-ml-inference/benchmark-driver:main

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ class GrpcConnector(host: String, port: Int)(using ActorSystem):
.withTls(false)
.withChannelBuilderOverrides(_.maxInboundMessageSize(Int.MaxValue))

// TODO: inverse broadcast
val client = ExtendedInferenceServiceClient(clientSettings)

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package eu.assistiot.inference.benchmark
package util

import com.google.protobuf.ByteString
import stream.encoding.CarEncodingFlow

import java.awt.image.BufferedImage

Expand Down

0 comments on commit 3f454dd

Please sign in to comment.