> ## 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.

# info

> Inspect model metadata, runtime, and diagnostics.

# cirron info

Display comprehensive information about your ML model (architecture, dependencies, metadata) and run diagnostic checks or hardware detection.

## Usage

```bash theme={null}
cirron info [options]
```

## Options

| Option            | Description                                             | Default |
| ----------------- | ------------------------------------------------------- | ------- |
| `--update <type>` | Update metadata (currently: `metadata`)                 | `null`  |
| `--dry-run`       | Preview metadata changes without applying               | `false` |
| `--diagnostics`   | Run diagnostic checks on configuration and connectivity | `false` |
| `--hardware`      | Show hardware information                               | `false` |
| `--json`          | Output in JSON format                                   | `false` |
| `--detailed`      | Show detailed information                               | `false` |

## Output Fields

Running `cirron info` produces a report with the following groups of fields:

| Group        | Field                            | Description                                                    |
| ------------ | -------------------------------- | -------------------------------------------------------------- |
| Basic        | Model Type                       | Classification, regression, etc.                               |
| Basic        | Framework                        | PyTorch, TensorFlow, Scikit-learn                              |
| Basic        | Python Version                   | Required Python version                                        |
| Basic        | GPU Required                     | Whether GPU is needed                                          |
| Model        | Model Class                      | Detected model class name                                      |
| Model        | Architecture                     | CNN, LSTM, Transformer, etc.                                   |
| Model        | Parameters                       | Estimated parameter count                                      |
| Model        | Input Shape                      | Expected input dimensions                                      |
| Model        | Output Shape                     | Model output dimensions                                        |
| Model        | Training/Test Data Shapes        | Data dimensions                                                |
| VCS          | Git Commit                       | Current commit hash                                            |
| VCS          | Branch                           | Current git branch                                             |
| VCS          | Repository Status                | Clean or uncommitted changes                                   |
| Endpoints    | Deployment URLs                  | Configured endpoint URLs by environment                        |
| Dependencies | Framework / Data / Visualization | torch, tensorflow, sklearn, numpy, pandas, matplotlib, seaborn |

The command performs static analysis of `src/model.py` to detect frameworks (`nn.Module`, `tf.keras.Model`, sklearn estimators), architecture patterns (CNN, LSTM/GRU, Transformer, ResNet, Dropout/BatchNorm, embeddings), and input shapes from sample tensor calls.

## Metadata Management

```bash theme={null}
# Apply updates to cirron.yaml
cirron info --update metadata

# Preview without writing
cirron info --update metadata --dry-run
```

Updated fields: `modelClassName`, `architecture`, `inputShape`, `trainingDataShape`, `testDataShape`, `gitCommitHash`, `detectedPatterns`.

The command also surfaces mismatches between stored metadata and current analysis: **critical** (model class, input shape changes) or **warning** (architecture pattern, git commit changes).

### cirron.yaml metadata section

```json theme={null}
{
  "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"
  }
}
```

## Diagnostics

```bash theme={null}
cirron info --diagnostics
cirron info --diagnostics --json
cirron info --diagnostics --detailed
```

Validates `cirron.yaml` structure, checks settings consistency, tests API reachability and authentication, and verifies Python/CUDA/dependency availability.

## Hardware Info

Equivalent to `cirron config hardware --detect`. Reports CPU, memory, GPU, CUDA availability, and framework compatibility.

```bash theme={null}
cirron info --hardware
cirron info --hardware --json
```

For full hardware configuration and profile management, use `cirron config hardware`.

## Examples

```bash theme={null}
# Full report
cirron info

# Refresh metadata
cirron info --update metadata

# Preview metadata changes
cirron info --update metadata --dry-run
```

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
```

## Troubleshooting

| Error / Symptom                                    | Resolution                                                                      |
| -------------------------------------------------- | ------------------------------------------------------------------------------- |
| `Not a Cirron project`                             | Run `cirron init my-project`                                                    |
| `Unknown update type`                              | Only `metadata` is supported today                                              |
| `cirron.yaml has been modified by another process` | Retry after other processes complete                                            |
| Missing model information                          | Ensure `src/model.py` exists and the model inherits from framework base classes |
| Inaccurate parameter counts                        | Ensure model instantiation works; avoid dynamic parameter generation            |
| Architecture not detected                          | Use standard framework patterns; avoid custom layer name typos                  |

## Integration

```yaml theme={null}
# GitHub Actions
- name: Update Model Metadata
  run: |
    cirron info --update metadata
    git add cirron.yaml
    git commit -m "Update model metadata"
```
