/refrakt_cli

The CLI helper that will convert natural language input into yaml structure and allow for pipeline training to be handled by refrakt_core.

Primary LanguagePythonMIT LicenseMIT

refrakt_cli

PyPI version

refrakt_cli is a command-line interface for the refrakt_core deep learning and machine learning research framework. It enables rapid, reproducible, and flexible pipeline training by converting CLI arguments into YAML-based experiment configurations, seamlessly integrating with refrakt_core's modular system.


๐Ÿ“ฆ Installation

Install the latest release from PyPI:

pip install refrakt_cli

๐Ÿš€ What is refrakt_cli?

  • A CLI tool to launch, manage, and override ML/DL training pipelines using YAML configs.
  • Bridges user-friendly command-line workflows with the powerful abstractions of refrakt_core.
  • Supports dynamic hyperparameter overrides, modular experiment configs, and robust logging.

โš™๏ธ Setup

git clone https://github.com/refrakt-hub/refrakt_cli.git
cd refrakt_cli

# (Recommended) Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install .

๐Ÿงช Usage: Running Experiments

Run with a config file

refrakt --config path/to/your_config.yaml

Override hyperparameters on-the-fly

refrakt --config path/to/your_config.yaml model.name=ResNet optimizer.lr=0.0005 trainer.epochs=20

Supported CLI Flags

Flag Description
--config Path to YAML config file
--log_type Logging backend: tensorboard, wandb, or both
--debug Enable debug mode with extra verbosity

๐Ÿงฉ Project Structure

src/refrakt_cli/
โ”œโ”€โ”€ cli.py                # Main CLI entry point
โ”œโ”€โ”€ helpers/              # Argument parsing, config overrides, pipeline orchestration
โ”‚   โ”œโ”€โ”€ argument_parser.py
โ”‚   โ”œโ”€โ”€ config_overrides.py
โ”‚   โ””โ”€โ”€ pipeline_orchestrator.py
โ”œโ”€โ”€ hooks/                # Custom hooks (e.g., hyperparameter overrides)
โ”‚   โ””โ”€โ”€ hyperparameter_override.py
โ”œโ”€โ”€ utils/                # Utility functions for pipeline management
โ”‚   โ””โ”€โ”€ pipeline_utils.py
โ””โ”€โ”€ __init__.py
  • cli.py: Main CLI logic and entry point.
  • helpers/: Argument parsing, config override logic, and pipeline orchestration.
  • hooks/: Custom hooks for advanced config/hyperparameter handling.
  • utils/: Utility functions for pipeline and config management.

Test files are located in the tests/ directory, mirroring the main module structure.


๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Please read our CONTRIBUTING.md for guidelines on how to get started and best practices for contributing to refrakt_cli.


๐Ÿ“„ License

This repository is licensed under the MIT License. See LICENSE for full details.


๐Ÿ‘ค Credits

Akshath Mangudi

If you find issues, raise them. If you learn from this, share it. Built with love and curiosity :)