Skip to content

Commit

Permalink
allow batch inference config.
Browse files Browse the repository at this point in the history
  • Loading branch information
anarkiwi committed Jul 13, 2024
1 parent 513502c commit 9adf53c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
pybind11-dev \
python3-numpy
WORKDIR /root
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.112
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.113
COPY --from=iqtlabs/gamutrf-vkfft:latest /root /root/gr-iqtlabs
WORKDIR /root/gr-iqtlabs/build
COPY --from=iqtlabs/gamutrf-sigmf:latest /usr/local /usr/local
Expand Down
3 changes: 2 additions & 1 deletion gamutrf/grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(
gps_server="",
igain=0,
inference_addr="0.0.0.0", # nosec
inference_batch=1,
inference_min_confidence=0.5,
inference_min_db=-200,
inference_model_name="",
Expand Down Expand Up @@ -330,7 +331,7 @@ def __init__(
samp_rate=int(samp_rate),
power_inference=iq_power_inference,
background=iq_inference_background,
batch=0, # TODO: not used yet.
batch=inference_batch,
)
self.inference_blocks.append(self.iq_inference_block)
if self.write_samples_block:
Expand Down
7 changes: 7 additions & 0 deletions gamutrf/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ def argument_parser():
default=10000,
help="Log FFT results to this port",
)
parser.add_argument(
"--inference_batch",
dest="inference_batch",
type=int,
default=5,
help="How many inference requests to make at once",
)
parser.add_argument(
"--inference_addr",
dest="inference_addr",
Expand Down

0 comments on commit 9adf53c

Please sign in to comment.