Skip to content

CLI Main¤

Main CLI entry point for Datarax commands.

See Also¤


datarax.cli.main ¤

Datarax CLI main module.

This module provides the main entry point for the Datarax command-line interface.

is_config_valid ¤

is_config_valid(config_path: str) -> bool

Validate a pipeline configuration file.

Parameters:

Name Type Description Default
config_path str

Path to the configuration file.

required

Returns:

Type Description
bool

True if valid, False otherwise.

run_pipeline ¤

run_pipeline(config_path: str, overrides: dict[str, str] | None = None) -> int

Run a pipeline from configuration.

Parameters:

Name Type Description Default
config_path str

Path to the pipeline configuration file.

required
overrides dict[str, str] | None

Optional configuration overrides.

None

Returns:

Type Description
int

Exit code (0 for success).

run_benchmark ¤

run_benchmark(dataset: str, **kwargs: Any) -> int

Run benchmark on a dataset.

Parameters:

Name Type Description Default
dataset str

Dataset to benchmark.

required
**kwargs Any

Additional benchmark parameters.

{}

Returns:

Type Description
int

Exit code.

list_components ¤

list_components(component_type: str | None = None) -> dict[str, list]

List available Datarax components.

Parameters:

Name Type Description Default
component_type str | None

Optional specific type to list.

None

Returns:

Type Description
dict[str, list]

Dictionary of component types and names.

is_pipeline_template_written_to_path ¤

is_pipeline_template_written_to_path(output_path: str, template: str = 'basic') -> bool

Create a pipeline configuration template.

Parameters:

Name Type Description Default
output_path str

Path to write the template.

required
template str

Template type to create.

'basic'

Returns:

Type Description
bool

True if successful.

profile_pipeline ¤

profile_pipeline(config_path: str, num_iterations: int = 100) -> dict[str, float]

Profile a pipeline's performance.

Parameters:

Name Type Description Default
config_path str

Path to pipeline configuration.

required
num_iterations int

Number of iterations to profile.

100

Returns:

Type Description
dict[str, float]

Performance metrics.

main ¤

main(argv: list[str] | None = None) -> int

Execute the Datarax CLI program.

Parameters:

Name Type Description Default
argv list[str] | None

List of command-line arguments. If None, sys.argv is used.

None

Returns:

Type Description
int

An exit code (0 for success, non-zero for error).