Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cirron.com/llms.txt

Use this file to discover all available pages before exploring further.

cirron info

Display comprehensive information about your ML model, including architecture details, dependencies, and metadata. The command also provides diagnostic checks and hardware detection.

Usage

cirron info [options]

Options

OptionDescriptionDefault
--update <type>Update metadata (metadata)null
--dry-runPreview changes without applyingfalse
--diagnosticsRun diagnostic checks on configuration and connectivityfalse
--hardwareShow hardware informationfalse
--jsonOutput in JSON formatfalse
--detailedShow detailed informationfalse

Basic Information Display

# Display model information
cirron info
The command provides detailed information about:

Basic Information

  • Model Type: Classification, regression, etc.
  • Framework: PyTorch, TensorFlow, Scikit-learn
  • Python Version: Required Python version
  • GPU Required: Whether GPU is needed

Model Details

  • Model Class: Detected model class name
  • Architecture: CNN, LSTM, Transformer, etc.
  • Parameters: Estimated parameter count
  • Input Shape: Expected input dimensions
  • Output Shape: Model output dimensions
  • Training/Test Data Shapes: Data dimensions

Version Control

  • Git Commit: Current commit hash
  • Branch: Current git branch
  • Repository Status: Clean or uncommitted changes

Associated Endpoints

  • Deployment URLs: Configured endpoint URLs
  • Environment Status: Production, staging, etc.

Key Dependencies

  • Framework Dependencies: torch, tensorflow, sklearn
  • Data Processing: numpy, pandas
  • Visualization: matplotlib, seaborn

Model Analysis

The command performs static analysis of your src/model.py file to extract:

Framework Detection

# PyTorch models
class MyModel(nn.Module):
    pass

# TensorFlow models  
class MyModel(tf.keras.Model):
    pass

# Scikit-learn models
model = RandomForestClassifier()

Architecture Pattern Recognition

  • CNN: Conv2d, Conv1d layers
  • LSTM/GRU: Recurrent neural networks
  • Transformer: Attention mechanisms
  • ResNet: Residual connections
  • Regularization: Dropout, BatchNorm
  • Embeddings: Word embeddings

Input Shape Detection

# Detected from sample calls
torch.randn(1, 3, 224, 224)  # Input shape: (1, 3, 224, 224)
np.random.randn(100, 10)     # Input shape: (100, 10)
tf.random.normal([32, 784])  # Input shape: (32, 784)

Metadata Management

Update Metadata

# Update metadata based on current analysis
cirron info --update metadata

# Preview changes without applying
cirron info --update metadata --dry-run
Updates the following metadata fields:
  • modelClassName: Detected model class
  • architecture: Recognized architecture patterns
  • inputShape: Detected input dimensions
  • trainingDataShape: Training data shape
  • testDataShape: Test data shape
  • gitCommitHash: Current git commit
  • detectedPatterns: Architecture patterns found

Metadata Mismatch Detection

The command automatically detects mismatches between stored metadata and current model analysis:

Critical Mismatches

  • Model Class Changes: Different model class detected
  • Input Shape Changes: Modified input dimensions

Warning Mismatches

  • Architecture Changes: New/different architecture patterns
  • Git Commit Changes: Code has been modified

Examples

Basic Information Display

# Display all model information
cirron info
Example output:
Model Information: sentiment-analysis
──────────────────────────────────────────────────────────────────

Basic Information
  Model Type: classification
  Framework: pytorch
  Python Version: 3.9
  GPU Required: No

Model Details
  Model Class: SentimentClassifier
  Architecture: LSTM + Attention
  Parameters: 1,234,567
  Input Shape: (batch_size, sequence_length)
  Output Shape: (batch_size, num_classes)

Version Control
  Git Commit: a1b2c3d
  Branch: main
  Repository: Clean working directory

Associated Endpoints
  • production: https://api.example.com/v1/predict
  • staging: https://staging.example.com/v1/predict

Key Dependencies
  • torch
  • numpy
  • pandas

Update Metadata

# Update metadata with current analysis
cirron info --update metadata
Example output:
Metadata Update Preview
──────────────────────────────────────────────────────────────────

  modelClassName:
    - SentimentClassifier
    + TransformerClassifier

  architecture:
    - LSTM + Attention
    + Transformer + Attention

  gitCommitHash:
    - a1b2c3d
    + e4f5g6h

✓ Successfully updated 3 metadata field(s) in cirron.yaml

Preview Changes

# See what would be updated without making changes
cirron info --update metadata --dry-run

Metadata Mismatch Warnings

Metadata Mismatch Detected
──────────────────────────────────────────────────────────────────

  • [critical] Model class changed: SentimentClassifier → TransformerClassifier
  • [warning] Architecture pattern changed: LSTM + Attention → Transformer + Attention
  • [warning] Git commit changed: a1b2c3d → e4f5g6h

Run cirron info --update metadata to refresh metadata.

Framework-Specific Analysis

PyTorch Analysis

# Detects nn.Module subclasses
class MyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(784, 10)  # Output shape: 10

# Parameter counting
total_params = sum(p.numel() for p in model.parameters())

TensorFlow Analysis

# Detects Keras models
class MyModel(tf.keras.Model):
    def __init__(self):
        super().__init__()
        self.dense = tf.keras.layers.Dense(10)  # Output shape: 10

# Model summary
model.summary()  # Parameter count available

Scikit-Learn Analysis

# Detects sklearn models
from sklearn.ensemble import RandomForestClassifier
model = RandomForestClassifier()

# Fit method calls
model.fit(X_train, y_train)  # Shape depends on training data

Configuration

cirron.yaml Metadata Section

{
  "name": "my-model",
  "framework": "pytorch",
  "metadata": {
    "modelClassName": "MyModel",
    "architecture": "CNN + BatchNorm",
    "inputShape": "(1, 3, 224, 224)",
    "trainingDataShape": "(1000, 3, 224, 224)",
    "testDataShape": "(200, 3, 224, 224)",
    "gitCommitHash": "a1b2c3d",
    "detectedPatterns": ["CNN", "BatchNorm"],
    "lastUpdated": "2024-01-15T10:30:00Z"
  }
}

Error Handling

Common Errors

Not a Cirron Project

Error: Not a Cirron project. Run this command in a directory with cirron.yaml

Unknown Update Type

Error: Unknown update type: invalid. Available options: metadata

Concurrent File Changes

Error: cirron.yaml has been modified by another process. Please retry the update.

Recovery Actions

  1. Missing Project Configuration
    cirron init my-project
    
  2. Invalid Update Type
    # Use correct update type
    cirron info --update metadata
    
  3. Concurrent Changes
    # Retry after other processes complete
    cirron info --update metadata
    

Integration

CI/CD Pipeline

# GitHub Actions example
- name: Update Model Metadata
  run: |
    cirron info --update metadata
    git add cirron.yaml
    git commit -m "Update model metadata"

Pre-deployment Validation

# Check model information before deployment
cirron info
cirron test --model

Diagnostics

Run diagnostic checks on your configuration, settings, and connectivity.
# Run diagnostics
cirron info --diagnostics

# Diagnostics with JSON output
cirron info --diagnostics --json

# Detailed diagnostics
cirron info --diagnostics --detailed
Diagnostics checks include:
  • Configuration: Validates cirron.yaml structure and required fields
  • Settings: Checks global and project settings for consistency
  • Connectivity: Tests API endpoint reachability and authentication
  • Environment: Verifies Python, CUDA, and dependency availability

Hardware Info

Quick hardware detection shortcut. This is equivalent to cirron config hardware --detect.
# Show hardware information
cirron info --hardware

# Hardware info in JSON format
cirron info --hardware --json
Reports CPU, memory, GPU, CUDA availability, and framework compatibility. For full hardware configuration and profile management, use cirron config hardware.

Troubleshooting

Missing Model Information

  • Ensure src/model.py exists and is valid Python
  • Check that model class inherits from framework base classes
  • Verify import statements are correct

Inaccurate Parameter Counts

  • Run with model loaded for accurate counts
  • Check for dynamic parameter generation
  • Verify model instantiation works

Metadata Not Updating

  • Check file permissions on cirron.yaml
  • Ensure no other processes are modifying the file
  • Verify git repository is accessible

Architecture Detection Issues

  • Use standard framework patterns
  • Avoid custom layer implementations
  • Check for typos in layer names