Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Experiments] Remove Supervisord Config #94

Merged
merged 2 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# debian:buster-slim is much smaller than ubuntu 22
ARG BASE_IMAGE=debian:buster-slim

FROM ${BASE_IMAGE} as base
FROM ${BASE_IMAGE} AS base

ARG POETRY_VERSION=1.8.2
ARG PYTHON_VERSION=3.11.6
Expand Down Expand Up @@ -34,8 +34,6 @@ RUN apt-get update -y \
libxmlsec1-dev \
libffi-dev \
liblzma-dev \
# Multi-process manager inside docker
supervisor \
# Install the rest
git \
gcc \
Expand Down Expand Up @@ -86,9 +84,6 @@ COPY experiments/ ./experiments/
# Copy external dependencies (for now only cereal)
COPY external/ ./external/

# Copy the configuration for supervisor
COPY bin/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

# Install needed dependencies including flatnav.
# Install hnwlib (from a forked repo that has extensions we need)
WORKDIR ${FLATNAV_PATH}
Expand Down
3 changes: 1 addition & 2 deletions bin/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ fi
docker run \
--name $CONTAINER_NAME \
-it \
-e MAKE_TARGET=$1 \
--volume ${DATA_DIR}:/root/data \
--volume ${METRICS_DIR}:/root/metrics \
--rm flatnav:$TAG_NAME \
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
make $1
19 changes: 0 additions & 19 deletions bin/supervisord.conf

This file was deleted.

7 changes: 5 additions & 2 deletions include/flatnav/index/Index.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ class Index {

bool _collect_stats = false;

// These are currently only supported for single-threaded search.
// Trying to use them in multi-threaded setting will result in wird behavior.
// NOTE: These metrics are meaningful the most with single-threaded search.
// With multi-threaded search, for instance, the number of distance computations will
// accumulate across queries, which means at the end of the batched search, the number
// you get is the cumulative sum of all distance computations across all queries.
// Maybe that's what you want, but it's worth noting
mutable std::atomic<uint64_t> _distance_computations = 0;
mutable std::atomic<uint64_t> _metric_hops = 0;

Expand Down
Loading