我要评分
获取效率
正确性
完整性
易理解

Basic Commands

This section describes the options and examples of common ANN-Benchmarks commands. Additional parameters are added to the command. You can determine whether to add the parameters as required.

Test Command Format

1
python run.py [options]...

The options field is a list of zero or more command line options starting with --. Table 1 describes these options.

Command Options

Table 1 Options and their descriptions

Command Option

Default Value

Description

--dataset [NAME]

glove-100-angular

Name of the dataset where the training point is loaded.

--algorithms [NAME]

None

Name of the algorithm to be run.

--k [COUNT], --count [COUNT]

10

Number of neighbors to be searched for.

--local

False

If this option is set, all content is run locally (in the same process) instead of using Docker.

--batch

False

If set, the algorithm immediately obtains all queries.

--runs [count]

5

Number of times that each algorithm instance runs (only the best result is used).

--definitions [FOLDER]

ann_benchmarks/algorithms

Base directory where the algorithm is located. The algorithm definition is expected to be in FOLDER/*/config.yml.

--docker-tag [NAME]

None

Run only algorithms in a specific Docker image.

--force

False

Run the algorithm again even if the result already exists.

--timeout [TIMEOUT]

7200

Timeout interval (in seconds) for running each algorithm. If no timeout is set, the value is -1.

--max-n-algorithms [MAX_N_ALGORITHMS]

-1

Maximum number of algorithms that can be run (for test only).

--run-disabled

False

Run the algorithms disabled in algos.yml.

--parallelism [PARALLELISM]

1

Number of concurrent Docker containers.

--list-algorithms

False

Print the names of all known algorithms and exit.

--threads

-1

Additional parameter. Number of threads started by the test command. If this parameter is not set, the number of threads started is the same as the number of CPUs by default.