Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Flat file

ACORN can be configured using JSON, JSONC (JSON with Comments), or YAML format flat files. These configuration files allow users to specify options and settings for the ACORN CLI tool, including input and output directories and logging levels.

Example

.acorn.json file

{
    "buckets": [
        {
            "name": "bessd",
            "repository": {
                "provider": "gitlab",
                "id": 17603,
                "uri": "https://code.ornl.gov/research-enablement/buckets/bessd"
            }
        }
    ],
    "models": [
        {
            "name": "qwen-0.5b",
            "source": {
                "provider": "huggingface",
                "location": "https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct-GGUF"
            },
            "quantization": [
                "Q4_K_M"
            ],
            "gpuMemory": "4GB"
        }
    ],
    "runners": [
        {
            "name": "ACORN Research Runner",
            "repository": {
                "provider": "gitlab",
                "id": 24758,
                "uri": "https://code.ornl.gov/research-enablement"
            },
            "type": "group",
            "tags": ["acorn", "research"],
            "runUntagged": false
        }
    ]
}

.acorn.jsonc file

{
    // ACORN bucket configuration
    "buckets": [
        {
            "name": "bessd",
            "repository": {
                "provider": "gitlab",
                "id": 17603,
                "uri": "https://code.ornl.gov/research-enablement/buckets/bessd"
            }
        },
    ]
}

Tip

.jsonc files permit // line comments, /* block */ comments, and trailing commas. All other syntax follows standard JSON rules. Rename a .json file to .jsonc if you need comments. [!TIP] ACORN looks for .acorn.json, .acorn.jsonc, .acorn.yaml, .acorn.yml, then .acorn in the current working directory. The extensionless .acorn form uses JSONC. You can also specify a different configuration file using the --config <FILE> flag when running ACORN commands.

.env file and Environment Variables

The ACORN CLI tool can also be configured using .env files and/or environment variables.

Example

.env file

ACORN_LOG_LEVEL=info
READABILITY_METRIC=ari
MAX_ALLOWED_ARI=12

ACORN_CITATION_FORMAT selects the DOI citation family used by acorn gather --raw --resolve when --citation-format is not provided. Accepted case-insensitive values are apa, chicago, harvard, ieee, mla, and vancouver; IEEE is the default. The precedence is CLI option, environment variable, then IEEE. An unsupported environment value emits a warning and falls back to IEEE.

$env:ACORN_CITATION_FORMAT = "apa"
acorn gather report.pdf --raw --resolve