CLI
actantial.cli.main()
Entry point for the actantial CLI command.
Parses command-line arguments, initialises the appropriate backend,
and delegates to run_extract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
--data_file
|
CSV file with |
required | |
--output_dir
|
Directory where results and logs will be saved. |
required | |
--backend
|
LLM backend to use for inference. One of |
required | |
--model
|
Model name or identifier understood by the chosen backend. |
required | |
--repository
|
HuggingFace repository name. Required when using the
|
required | |
--quantise
|
Run the model in 4-bit quantised mode. Only valid for
the |
required | |
--template
|
Prompt template name. Must exist in
|
required | |
--actor_labels_path
|
Path to a YAML file with predefined actor labels for closed-set annotation. |
required | |
--object_labels_path
|
Path to a YAML file with predefined object labels for closed-set annotation. |
required | |
--resume_timestamp
|
Timestamp of a previous run to resume, in
|
required | |
--templates_dir
|
Directory containing prompt templates. Defaults to the bundled templates. |
required | |
--backend_params_path
|
Path to a YAML file of keyword arguments passed to
the backend constructor (e.g. |
required |
actantial.cli.init_templates()
Entry point for the actantial-init-templates CLI command.
Copies the bundled prompt templates to a local directory so they can be inspected and customised. The destination must not already exist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
--dest
|
Parent directory in which a |
required |
Examples
# OpenAI API
actantial \
--data_file "data.csv" \
--output_dir "output" \
--backend openai \
--model "gpt-4o-mini" \
--templates_dir "templates" \
--template "my_template"
# HuggingFace (GPU, 4-bit quantised)
actantial \
--data_file "data.csv" \
--output_dir "output" \
--backend huggingface \
--repository "deepseek-ai" \
--model "DeepSeek-R1-Distill-Qwen-32B" \
--templates_dir "templates" \
--template "my_template" \
--quantise
# With predefined label sets
actantial \
--data_file "data.csv" \
--output_dir "output" \
--backend anthropic \
--model "claude-haiku-4-5" \
--templates_dir "templates" \
--template "my_template_closed" \
--actor_labels_path "labels/actors.yaml" \
--object_labels_path "labels/objects.yaml"
Resuming an interrupted run:
actantial \
--data_file "data.csv" \
--output_dir "output" \
--backend openai \
--model "gpt-4o-mini" \
--templates_dir "templates" \
--template "my_template" \
--resume_timestamp "20260101_121500"