Skip to main content

cirron init

Initialize a new Cirron project with pre-configured templates for different ML frameworks. The init command creates a complete project structure with all necessary files, configuration, and dependencies.

Usage

Arguments

ArgumentDescriptionRequired
project-nameName of the project to createNo (interactive mode)

Options

OptionDescriptionDefault
--template, -tTemplate to use (see templates below)pytorch
--force, -fOverwrite existing directoryfalse
--gitInitialize git repositoryfalse
--no-installSkip dependency installationfalse

Templates

PyTorch Templates

Creates a project with:
  • PyTorch and torchvision
  • Common ML dependencies (numpy, pandas, matplotlib)
  • Model definition and training scripts
  • Docker configuration
  • Testing setup

TensorFlow Templates

Creates a project with:
  • TensorFlow and Keras
  • GPU support configuration
  • Data pipeline utilities
  • Model training scripts
  • Docker with GPU support

Scikit-Learn Templates

Creates a project with:
  • scikit-learn, pandas, numpy
  • Data preprocessing utilities
  • Model evaluation tools
  • Lightweight Docker setup

Custom Template

Creates a blank Python project for any ML framework.

Interactive Mode

When you run cirron init without a project name, you’ll be prompted for:

Project Name

  • Validation: Project name can only contain letters, numbers, hyphens, and underscores
  • Default: my-ml-project

Framework Selection

Choose from available templates:
  • PyTorch - PyTorch model with training and inference
  • TensorFlow - TensorFlow/Keras model with training and inference
  • Scikit-Learn - Scikit-learn model with preprocessing and inference
  • PyTorch Training - PyTorch training pipeline with data loading
  • TensorFlow Training - TensorFlow training pipeline with data loading
  • Scikit-Learn Pipeline - Full ML pipeline with preprocessing and training
  • Custom Framework - Blank Python project for any ML framework

Model Type

Choose from available model types:
  • Classification - Classification models
  • Regression - Regression models
  • Computer Vision - Computer vision models
  • Natural Language Processing - NLP models
  • Time Series - Time series models
  • Custom - Custom model types

Additional Options

  • Include Sample Data - Include sample data for testing (default: true)
  • Include Jupyter Notebook - Include a Jupyter notebook for experimentation (default: true)

Examples

Basic Usage

Advanced Usage

Project Structure

After running cirron init, you’ll get a project structure like this:

Configuration File

The cirron.yaml file is automatically created with comprehensive configuration:

Model Type Configuration

Default Model Class Names

Each template and model type combination gets an appropriate default model class name:
  • PyTorch Classification: ClassificationModel
  • PyTorch Regression: RegressionModel
  • PyTorch Computer Vision: CNNModel
  • PyTorch NLP: TransformerModel
  • PyTorch Time Series: LSTMModel
  • TensorFlow Classification: ClassificationModel
  • Scikit-Learn Classification: ClassificationPipeline
  • Custom: Model

Default Architectures

  • PyTorch: Neural Network
  • TensorFlow: Keras Model
  • Scikit-Learn: Scikit-learn Pipeline
  • Custom: Custom Model

Default Input Shapes

  • PyTorch: (1, 3, 224, 224)
  • TensorFlow: (224, 224, 3)
  • Scikit-Learn: Varies by dataset
  • Custom: Not specified

Git Integration

Automatic Git Initialization

When using the --git flag, the command automatically:
  1. Initializes Git Repository: Runs git init
  2. Adds All Files: Runs git add .
  3. Creates Initial Commit: Runs git commit -m "Initial commit"

Git Information

If a git repository exists, the command captures:
  • Commit Hash: Current commit hash
  • Repository Info: Git repository metadata

Dependency Installation

Automatic Installation

By default, the command automatically installs dependencies. Use --no-install to skip. The installation:
  1. Installs Dependencies: Runs pip install -r requirements.txt
  2. Error Handling: Continues if installation fails
  3. Logging: Shows installation progress and warnings

Post-Install Commands

Each template includes post-install commands:

Project Registration

Cirron API Integration

If you’re authenticated with Cirron, your project will be automatically registered:
  1. API Registration: Creates project in Cirron API
  2. Project Metadata: Sends project configuration
  3. Error Handling: Continues if registration fails

Authentication Check

If not authenticated, you’ll see a tip:

Next Steps

After initializing your project:
  1. Navigate to the project:
  2. Install dependencies (if not done automatically):
  3. Run tests:
  4. Build project:
  5. Deploy:

Error Handling

Directory Already Exists

Invalid Project Name

Invalid Template

Git Initialization Fails

Dependency Installation Fails

Best Practices

Project Naming

  • Use Descriptive Names: Choose names that describe the project purpose
  • Follow Conventions: Use lowercase with hyphens or underscores
  • Avoid Special Characters: Stick to letters, numbers, hyphens, and underscores

Template Selection

  • Choose Appropriate Framework: Select framework based on your needs
  • Consider Training Needs: Use training templates for full ML pipelines
  • Start Simple: Use basic templates for simple models

Development Workflow

  • Use Git: Initialize git repository for version control
  • Install Dependencies: Install dependencies immediately after creation
  • Test Early: Run tests to verify project setup
  • Document Changes: Update README with project-specific information

Troubleshooting

Common Issues

Permission Errors

Network Issues

Python Environment Issues

Debugging Tips

  • Check Logs: Look for detailed error messages
  • Verify Dependencies: Ensure required tools are installed
  • Test Commands: Run commands manually to identify issues
  • Check Permissions: Verify file and directory permissions
  • cirron auth - Manage authentication
  • cirron test - Test your project
  • cirron build - Build your project
  • cirron deploy - Deploy your project