magpie.config

Module Contents

Data

GITHUB_TOKEN

A GitHub token to be used when performing calls to the GitHub API.

MAGPIE_LOG_LEVEL

Default logging level.

MOCK_NETWORK

Control whether we want to mock network calls and cache them. This is useful for running tests repeatedly.

WORKER_START

Control whether to start a Celery worker cluster automatically

WORKER_COLD_SHUTDOWN

Control whether we want to signal the worker to finish, and wait for it (warm shutdown), or if we want to kill it immediately (cold shutdown) see Celery docs.

WORKER_LOG_TO_FILE

Control whether the workers should also save their logs to files, grouped by task ID. They are easily retrievable using the just log command.

FLOWER_START

Control whether to start a Celery Flower task monitor.

MAGPIE_TESTS

When True, will import additional tasks, functions and classes for running tests.

WORKER_COUNT

Number of worker processes to be launched in the Celery cluster.

EMBED_BATCH_COUNT

Control batch size used when computing embeddings in retriever celery tasks.

API

magpie.config.GITHUB_TOKEN

None

A GitHub token to be used when performing calls to the GitHub API.

magpie.config.MAGPIE_LOG_LEVEL

‘INFO,magpie=DEBUG,celery=DEBUG’

Default logging level.

This can be a single value, in which case it will be the logging level for all modules, or it can be a comma-separated list of module=LEVEL value pairs, which allows to specify a different level for each module. If a module is not specified, the level will be the default level.

Example:

MAGPIE_LOG_LEVEL=INFO,magpie=DEBUG,celery=DEBUG

In this case, the default logging level will be INFO but all messages issued from the magpie and celery modules will be logged with DEBUG severity.

magpie.config.MOCK_NETWORK

False

Control whether we want to mock network calls and cache them. This is useful for running tests repeatedly.

magpie.config.WORKER_START

True

Control whether to start a Celery worker cluster automatically

magpie.config.WORKER_COLD_SHUTDOWN

True

Control whether we want to signal the worker to finish, and wait for it (warm shutdown), or if we want to kill it immediately (cold shutdown) see Celery docs.

magpie.config.WORKER_LOG_TO_FILE

False

Control whether the workers should also save their logs to files, grouped by task ID. They are easily retrievable using the just log command.

magpie.config.FLOWER_START

False

Control whether to start a Celery Flower task monitor.

magpie.config.MAGPIE_TESTS

False

When True, will import additional tasks, functions and classes for running tests.

magpie.config.WORKER_COUNT

‘min(…)’

Number of worker processes to be launched in the Celery cluster.

magpie.config.EMBED_BATCH_COUNT

10

Control batch size used when computing embeddings in retriever celery tasks.