Skip to content

Troubleshooting Guide

Krishanth edited this page Oct 15, 2026 · 1 revision

Troubleshooting Guide

EveryO — Technical Diagnostics, Error Resolution & Support

Identify · Diagnose · Resolve · Verify

Project Python Support Status

A structured troubleshooting reference for installation, tensor operations, gradients, model training, CUDA, serialization, interoperability, and development workflows.

Home · Installation · API Reference · Testing and Quality Assurance


Repository: krishanth7/EveryO

Maintainer: @krishanth7

Support: Community-maintained, best-effort

Important

Before Troubleshooting

Use a supported Python environment, confirm the installed EveryO version, and run everyo doctor.

EveryO is experimental alpha software. The project does not claim to be a production training runtime.

This guide covers common failure patterns. The precise cause of any error must be established using its traceback and a reproducible example.


Table of Contents

  1. Troubleshooting Overview
  2. Quick Diagnostic Checklist
  3. Supported Environment
  4. Diagnostic Commands
  5. Installation Problems
  6. Import Errors
  7. Python Environment Conflicts
  8. Tensor Creation Errors
  9. Shape and Broadcasting Errors
  10. Automatic Differentiation Errors
  11. Gradient Verification
  12. Neural Network Errors
  13. Training Problems
  14. Loss and Optimizer Problems
  15. DataLoader Problems
  16. Serialization Problems
  17. CUDA Problems
  18. CUDA Build Problems
  19. Mixed Precision Problems
  20. ONNX Problems
  21. Distributed Training Problems
  22. Performance Problems
  23. CLI Problems
  24. Testing and CI Problems
  25. Security Considerations
  26. Issue Reporting and Escalation
  27. Troubleshooting Decision Tree
  28. Frequently Asked Questions
  29. Official References
  30. Final Checklist

1. Troubleshooting Overview

Effective troubleshooting starts by separating an observed symptom from its underlying cause.

An installation error, a tensor shape mismatch, and an incorrect gradient require different diagnostic approaches.

1.1 Recommended Process

             ERROR OCCURS
                  |
                  v
           Capture Error
                  |
                  v
         Check Environment
                  |
                  v
        Reproduce Minimally
                  |
                  v
          Isolate Component
                  |
                  v
           Apply Correction
                  |
                  v
            Run Verification
                  |
            +-----+-----+
            |           |
            v           v
         Resolved    Unresolved
                        |
                        v
                 Report Issue

1.2 Diagnostic Principles

  • Preserve the complete traceback.
  • Change one variable at a time.
  • Verify package and Python versions.
  • Reproduce the failure using the smallest possible example.
  • Distinguish unsupported functionality from defective behavior.
  • Do not assume that successful installation proves runtime compatibility.

2. Quick Diagnostic Checklist

Before investigating a complex problem, check the following.

  • Python version is supported.
  • The intended virtual environment is active.
  • EveryO is installed in that environment.
  • Required dependencies are available.
  • everyo doctor completes or provides actionable diagnostics.
  • The failure can be reproduced.
  • Input tensor shapes and dtypes are known.
  • Optional hardware and dependencies are available when required.
  • Relevant tests have been run.
  • No sensitive information appears in shared logs.

3. Supported Environment

EveryO's documented compatibility baseline includes Python 3.9 through 3.12.

3.1 Core Dependencies

Component Requirement
Python 3.9–3.12 documented
NumPy 1.22 or later
Matplotlib 3.5 or later
GPU Not required
Internet Not required for core runtime after installation
API keys Not required

3.2 Optional Dependencies

Feature Dependency
TensorFlow comparisons tensorflow>=2.12
YAML PyYAML>=6.0
ONNX onnx>=1.15
ONNX Runtime onnxruntime>=1.17
CUDA build pybind11>=2.11 and native toolchain
Development pytest, pytest-cov, Ruff

The package's declared minimum dependency versions do not guarantee that every combination is compatible with every Python version or operating system.


4. Diagnostic Commands

4.1 Verify Python

python --version

4.2 Verify Python Executable

python -c "import sys; print(sys.executable)"

4.3 Check EveryO

python -c "import everyo; print(everyo.__file__)"

4.4 Check Package Metadata

python -m pip show everyo

4.5 Run Built-In Diagnostics

everyo doctor

4.6 Check Dependencies

python -m pip check

4.7 Run Tests

From the repository root:

python -m pytest -q

4.8 Run Linting

ruff check .

ruff format --check .

5. Installation Problems

5.1 Symptom: Package Installation Fails

Possible causes:

  • Unsupported Python version.
  • Incompatible dependency versions.
  • Incorrect working directory.
  • Network restrictions during dependency installation.
  • Build tool problems.

Recommended Resolution

Create a fresh virtual environment.

python -m venv .venv

Activate it.

Linux/macOS:

source .venv/bin/activate

Windows PowerShell:

.\.venv\Scripts\Activate.ps1

Install EveryO from the repository root:

python -m pip install -e .

5.2 Symptom: Development Dependencies Missing

Install:

python -m pip install -e ".[dev]"

5.3 Symptom: Dependency Resolution Fails

Inspect the full pip output.

Do not automatically upgrade every package without identifying the incompatible requirement.


6. Import Errors

6.1 Symptom

ModuleNotFoundError: No module named 'everyo'

Likely Causes

  • EveryO is not installed.
  • The wrong Python interpreter is active.
  • The virtual environment is inactive.

Resolution

python -m pip install -e .

Then:

python -c "import everyo; print(everyo.__file__)"

6.2 Symptom: Optional Module Missing

Example:

ModuleNotFoundError: No module named 'onnx'

Install the relevant optional dependency group:

python -m pip install -e ".[onnx]"

For TensorFlow:

python -m pip install -e ".[tensorflow]"

6.3 Local File Shadowing

Avoid naming your own scripts:

everyo.py
numpy.py
tensorflow.py

Such filenames can shadow installed packages.


7. Python Environment Conflicts

7.1 Multiple Python Installations

A common failure occurs when installation and execution use different Python interpreters.

Compare:

python -c "import sys; print(sys.executable)"

With:

python -m pip --version

7.2 Recommended Practice

Use:

python -m pip

rather than relying on an unrelated pip executable.

7.3 Fresh Environment

If the environment is heavily modified, reproduce the problem in a new virtual environment before changing the existing one.


8. Tensor Creation Errors

8.1 Basic Tensor Example

import everyo as eo

x = eo.tensor(
    [1.0, 2.0, 3.0],
    requires_grad=True,
)

print(x)

8.2 Common Problems

  • Unsupported dtype.
  • Ragged input arrays.
  • Invalid device request.
  • Unexpected tensor shape.

8.3 Diagnostic Example

import everyo as eo

x = eo.tensor([[1.0, 2.0], [3.0, 4.0]])

print("Shape:", x.shape)
print("Dtype:", x.dtype)
print("Device:", x.device)

8.4 Recommended Resolution

Inspect the input data before performing operations.

Use consistent numerical dtypes and explicit shapes when debugging.


9. Shape and Broadcasting Errors

9.1 Matrix Multiplication

For matrix multiplication:

[ A_{m\times n}B_{n\times p} ]

The inner dimensions must match.

Example:

A shape: (4, 8)
B shape: (8, 3)

Result: (4, 3)

Invalid example:

A shape: (4, 8)
B shape: (7, 3)

Inner dimensions do not match.

9.2 Broadcasting

Broadcasting requires compatible dimensions.

Examples:

Shape A Shape B Expected Compatibility
(4, 3) (3,) Compatible
(4, 3) (1, 3) Compatible
(4, 3) (4, 1) Compatible
(4, 3) (5, 3) Incompatible

9.3 Resolution

Print tensor shapes before the failing operation.

Check whether the intended operation is:

  • Element-wise multiplication.
  • Matrix multiplication.
  • Reduction.
  • Broadcasting.

These operations have different shape rules.


10. Automatic Differentiation Errors

10.1 Symptom: Gradient Is Missing

Check whether the tensor requires gradients.

import everyo as eo

x = eo.tensor([2.0], requires_grad=True)

y = x * x

y.backward()

print(x.grad)

Expected numerical result:

[4.]

10.2 Common Causes

  • Gradient tracking disabled.
  • Tensor detached from the computational graph.
  • An operation that does not support differentiation.
  • Incorrect backward usage.
  • Unexpected gradient accumulation.

10.3 Diagnostic Procedure

  1. Confirm requires_grad=True.
  2. Reduce the computation to a small example.
  3. Verify the expected derivative manually.
  4. Inspect the backward result.
  5. Compare against finite differences.

10.4 Gradient Accumulation

When performing multiple backward passes, verify whether existing gradients must be cleared before the next optimization step.


11. Gradient Verification

11.1 Why Verify Gradients?

An incorrect gradient can make training fail even when the forward calculation appears correct.

11.2 Central Finite Differences

[ g_{\text{numeric}}

\frac{f(x+h)-f(x-h)}{2h} ]

11.3 Error Metrics

Absolute error:

[ E_{\text{abs}} = |g_{\text{analytic}}-g_{\text{numeric}}| ]

Relative error:

[ E_{\text{rel}} = \frac{|g_{\text{analytic}}-g_{\text{numeric}}|} {\max(\epsilon,|g_{\text{analytic}}|,|g_{\text{numeric}}|)} ]

11.4 Diagnostic Recommendations

  • Use float64 where supported.
  • Choose an appropriate finite-difference step.
  • Avoid non-differentiable points.
  • Test multiple input shapes.
  • Use both absolute and relative tolerances.

11.5 Interpreting Failures

A failed finite-difference comparison may indicate:

  • Incorrect backward logic.
  • A numerical precision problem.
  • A poorly chosen finite-difference step.
  • Evaluation at a non-differentiable point.

Investigate before changing tolerance values.


12. Neural Network Errors

12.1 Linear Layer Shape Mismatch

A linear layer's input feature count must match its configured in_features.

Example:

import everyo as eo

layer = eo.Linear(4, 8)

x = eo.tensor([[1.0, 2.0, 3.0, 4.0]])

y = layer(x)

print(y.shape)

Expected shape:

(1, 8)

12.2 Incorrect Input Features

If a layer expects four features, passing three features will not satisfy the layer's shape contract.

12.3 Module Parameters

Confirm trainable parameters are registered correctly when implementing custom modules.

12.4 Model Mode

Use the appropriate training or evaluation mode for layers whose behavior changes between training and inference.


13. Training Problems

13.1 Symptom: Loss Does Not Decrease

Possible causes:

  • Learning rate too high.
  • Learning rate too low.
  • Incorrect labels.
  • Incompatible output and loss shapes.
  • Missing gradient updates.
  • Incorrect data preprocessing.
  • Numerical instability.

13.2 Recommended Diagnostic Sequence

  1. Train on a very small dataset.
  2. Verify model outputs.
  3. Verify target values.
  4. Inspect loss.
  5. Check gradients.
  6. Confirm optimizer updates.
  7. Increase dataset size gradually.

13.3 Minimal Training Pattern

import everyo as eo

model = eo.Sequential(
    eo.Linear(4, 16),
    eo.ReLU(),
    eo.Linear(16, 2),
)

optimizer = eo.Adam(
    model.parameters(),
    lr=0.001,
)

loss_fn = eo.CrossEntropyLoss()

Connect the model, optimizer, and loss to a properly configured training dataset.

13.4 Symptom: Loss Becomes NaN

Investigate:

  • Non-finite input values.
  • Excessively large updates.
  • Invalid loss inputs.
  • Division by zero.
  • Overflow.
  • Unstable operations.

Reducing the learning rate may help, but the underlying cause should still be identified.


14. Loss and Optimizer Problems

14.1 Incorrect Loss Selection

Choose the loss according to the task.

Task Common Loss
Regression Mean squared error
Classification Cross-entropy
Binary classification Binary cross-entropy

14.2 Incorrect Target Representation

Verify the expected target format for the selected loss.

For classification, check whether the API expects class indices or another target representation.

14.3 Optimizer Updates

Confirm:

  • The optimizer receives model parameters.
  • Gradients are available.
  • The learning rate is appropriate.
  • Parameters actually change after an update.

14.4 Unexpected Optimization Behavior

Inspect optimizer state, gradient magnitudes, and the loss calculation.


15. DataLoader Problems

15.1 Common Symptoms

  • Unexpected batch shape.
  • Inconsistent labels.
  • Incorrect sample ordering.
  • Missing samples.
  • Invalid dataset indexing.

15.2 Recommended Checks

Print:

  • Dataset length.
  • Batch size.
  • First batch shape.
  • Label shape.
  • Feature dtype.

15.3 Reproducibility

Use controlled random seeds where supported.

15.4 Data Integrity

Verify that input samples and target labels remain aligned after preprocessing or shuffling.


16. Serialization Problems

EveryO uses .evo model archives.

16.1 Save Example

import everyo as eo

model = eo.Sequential(
    eo.Linear(4, 8),
    eo.ReLU(),
    eo.Linear(8, 2),
)

eo.save(model, "model.evo")

16.2 Load Example

restored = eo.load("model.evo")

16.3 Common Problems

  • Missing file.
  • Corrupted archive.
  • Incompatible architecture.
  • Parameter shape mismatch.
  • Unsupported module type.
  • Invalid archive metadata.

16.4 Recommended Resolution

  1. Confirm the file exists.
  2. Verify the archive was created successfully.
  3. Check model compatibility.
  4. Confirm custom modules are properly registered.
  5. Reproduce using a minimal model.

16.5 Security

EveryO's .evo format is designed to avoid Python pickle execution.

Nevertheless, untrusted files should be handled with appropriate resource and integrity controls.


17. CUDA Problems

CUDA is optional.

EveryO should remain usable on CPU-only systems.

17.1 Check Availability

import everyo as eo

print(eo.cuda.is_available())
print(eo.cuda.device_count())
print(eo.cuda.unavailable_reason())

17.2 Runtime Information

import everyo as eo

print(eo.cuda.runtime_info())

17.3 Common Causes of Unavailability

  • No compatible NVIDIA GPU.
  • Missing native extension.
  • Incompatible CUDA runtime.
  • Driver problems.
  • CUDA explicitly disabled.

17.4 CPU Fallback

import everyo as eo

device = eo.device("cuda")

print(device)

When CUDA is unavailable, the documented non-strict device request falls back to CPU with a warning.

17.5 Strict CUDA

import everyo as eo

device = eo.device("cuda", strict=True)

If CUDA is unavailable, strict mode raises an error instead of silently selecting CPU.

17.6 Disable CUDA

For diagnostic purposes, the documented environment variable is:

EVERYO_DISABLE_CUDA=1

Set it in the environment before starting Python.


18. CUDA Build Problems

18.1 Required Tools

The documented CUDA build requires:

  • NVIDIA CUDA Toolkit.
  • nvcc.
  • CMake 3.18 or later.
  • pybind11.
  • Compatible compiler and platform.

A compatible GPU is required for execution, although compilation may be possible without one.

18.2 Install Optional Dependencies

python -m pip install -e ".[cuda]"

18.3 Build Extension

./scripts/build_cuda.sh

18.4 Direct CMake Build

cmake -S cuda -B build/cuda -DCMAKE_BUILD_TYPE=Release

cmake --build build/cuda --parallel

18.5 Build Failure Checklist

  • CUDA Toolkit installed.
  • nvcc accessible.
  • CMake available.
  • Compatible compiler configured.
  • pybind11 installed.
  • Correct Python environment active.
  • Build logs reviewed.

18.6 GPU Performance

A GPU is not automatically faster for small operations.

Host-device transfers may outweigh kernel execution time.


19. Mixed Precision Problems

EveryO includes mixed-precision utilities.

19.1 Common Symptoms

  • Gradient underflow.
  • Non-finite values.
  • Unexpected numerical differences.
  • Slower execution on CPU.

19.2 Why Underflow Happens

Float16 represents a smaller numerical range than float32.

Very small gradient values may round to zero.

19.3 Loss Scaling

Loss scaling increases gradient magnitudes during backward computation to reduce underflow.

19.4 Recommended Checks

  • Compare with float32 execution.
  • Inspect gradient values.
  • Verify scaling behavior.
  • Check for NaN or infinity.
  • Use appropriate precision for the workload.

19.5 CPU Performance

Mixed precision is not guaranteed to improve CPU performance.

The README notes that NumPy float16 arithmetic can be slower because computation may involve upcasting.


20. ONNX Problems

EveryO supports ONNX export for documented model types.

20.1 Install Dependencies

python -m pip install -e ".[onnx]"

20.2 Export Example

import everyo as eo

model = eo.Sequential(
    eo.Linear(4, 8),
    eo.ReLU(),
    eo.Linear(8, 2),
)

model.eval()

eo.export_onnx(
    model,
    "model.onnx",
    input_shape=(1, 4),
)

20.3 Common Problems

  • Unsupported operation.
  • Missing optional dependencies.
  • Unexpected input shape.
  • Incorrect tensor layout.
  • Static tracing limitations.
  • Numerical disagreement.

20.4 Layout Differences

EveryO convolution operations use NHWC layout.

ONNX convolution operators use NCHW layout.

Export logic must account for this difference.

20.5 Tracing Limitations

A traced graph records the executed path.

For recurrent models, sequence length and other shape assumptions may be fixed by the example input.

20.6 Recommended Validation

Run the exported model through ONNX Runtime and compare outputs against EveryO.

A structurally valid ONNX model is not sufficient proof of numerical equivalence.


21. Distributed Training Problems

Distributed execution introduces communication and synchronization concerns.

21.1 Common Symptoms

  • Worker hangs.
  • Connection failures.
  • Inconsistent gradients.
  • Process crashes.
  • Incorrect worker configuration.

21.2 Diagnostic Checks

Verify:

  • Worker count.
  • Process rank.
  • Network connectivity.
  • Port configuration.
  • Identical model initialization.
  • Consistent tensor shapes.

21.3 Isolation Strategy

  1. Verify single-process training.
  2. Verify multiple processes on one machine.
  3. Verify communication configuration.
  4. Test across machines only after local validation.
  5. Compare numerical results.

21.4 Security Limitation

EveryO's documented TCP process-group implementation assumes a trusted network.

Do not expose it to untrusted networks without appropriate protection.


22. Performance Problems

22.1 Symptom: Training Is Slow

Potential causes:

  • Large tensor dimensions.
  • Python execution overhead.
  • Frequent host-device transfers.
  • Inefficient batching.
  • Excessive logging.
  • Unsupported acceleration paths.

22.2 Baseline Measurements

Measure:

  • Batch size.
  • Operation latency.
  • Epoch duration.
  • Memory usage.
  • Hardware configuration.

22.3 Profiling

EveryO includes profiling utilities.

Consult the API documentation for the supported profiling interface and available output formats.

22.4 Benchmarking

Example repository benchmark:

python benchmarks/benchmark_matmul.py --sizes 128 512 1024 2048

22.5 Avoid Misleading Comparisons

Use equivalent:

  • Input shapes.
  • Dtypes.
  • Hardware.
  • Warm-up procedures.
  • Measurement methods.

23. CLI Problems

EveryO provides the everyo command-line interface.

23.1 Available Commands

The README documents:

everyo info
everyo doctor
everyo benchmark
everyo test
everyo demo

23.2 Symptom: Command Not Found

Check whether the virtual environment is active.

Then reinstall:

python -m pip install -e .

23.3 Symptom: CLI Runs in Wrong Environment

Verify the executable location.

Linux/macOS:

command -v everyo

Windows PowerShell:

Get-Command everyo

23.4 Built-In Diagnostics

Start with:

everyo doctor

24. Testing and CI Problems

24.1 Run Core Tests

python -m pytest -q

24.2 Run Tests with Coverage

python -m pytest --cov=everyo

24.3 Run Linting

ruff check .

24.4 Run Formatting Check

ruff format --check .

24.5 Optional Test Skips

Some tests require optional dependencies or hardware.

A skipped CUDA test on a machine without CUDA is not automatically a defect.

24.6 CI Versus Local Differences

Check:

  • Python version.
  • Operating system.
  • Dependency versions.
  • Environment variables.
  • Available hardware.

24.7 Formatting Version

The repository pins Ruff to a specific version for development to reduce formatting differences between local machines and CI.


25. Security Considerations

25.1 Never Share Secrets

Remove:

  • Passwords.
  • API keys.
  • Tokens.
  • Private keys.
  • Sensitive filesystem paths.

25.2 Untrusted Model Files

Treat untrusted archives as potentially malformed or resource-intensive, even when the format avoids pickle execution.

25.3 Native Extensions

Native code may introduce memory-safety risks and should be tested carefully.

25.4 Vulnerability Reporting

Do not disclose security vulnerabilities in public issues.

Use:

GitHub Private Vulnerability Reporting

25.5 Official Policy

SECURITY.md


26. Issue Reporting and Escalation

If the problem remains unresolved, create a reproducible report.

26.1 Support Channels

Problem Recommended Channel
Reproducible bug GitHub Issues
Usage question GitHub Discussions
Feature request Feature request issue
Security vulnerability Private vulnerability report

26.2 Bug Report Template

# Bug Report

## Summary

Describe the problem.

## Environment

- EveryO version:
- Python version:
- Operating system:
- CPU/GPU:
- Installation method:
- Optional dependencies:

## Reproduction Steps

1.
2.
3.

## Minimal Reproducible Example

```python
# Insert minimal example here.

Expected Behavior

Describe the expected result.

Actual Behavior

Describe the observed result.

Error Output

Paste sanitized traceback here.

Diagnostics Performed

List commands and checks already attempted.

Additional Context

Provide relevant information.


## 26.3 Support Expectations

Community support is provided on a best-effort basis.

There is no guaranteed response time.

---

# 27. Troubleshooting Decision Tree

```text
                  START
                    |
                    v
          Does import succeed?
               /         \
             No           Yes
             |             |
             v             v
       Check Python    Run doctor
       environment         |
             |             v
             |        Is CUDA needed?
             |          /       \
             |         No       Yes
             |         |         |
             |         v         v
             |      CPU tests  CUDA checks
             |         |         |
             +---------+---------+
                       |
                       v
                Reproduce Error
                       |
                       v
                Identify Component
                       |
          +------------+------------+
          |            |            |
          v            v            v
        Tensor       Training      Export
          |            |            |
          v            v            v
       Shapes       Gradients     ONNX checks
          |            |            |
          +------------+------------+
                       |
                       v
                 Verify Fix
                       |
                +------+------+
                |             |
                v             v
             Resolved      Report Issue

28. Frequently Asked Questions

Why does EveryO report that CUDA is unavailable?

A compatible GPU, working runtime, and built native extension are required.

Run everyo doctor and inspect eo.cuda.unavailable_reason().

Can EveryO run without a GPU?

Yes. The core framework runs on CPU.

Why is my gradient missing?

Check gradient tracking, graph connectivity, and backward usage.

Start with a minimal scalar example.

Why does ONNX output differ slightly?

Small differences can arise from floating-point rounding and execution order.

Large differences require further investigation.

Why does mixed precision run slower on CPU?

NumPy may upcast float16 values for computation, introducing overhead.

Does passing all CPU tests prove CUDA correctness?

No. CUDA runtime correctness requires appropriate GPU testing.

Where can I report a bug?

Use the project's GitHub bug-report template.

Does EveryO provide guaranteed technical support?

No. Support is community-maintained and best-effort.


29. Official References

Resource Link
EveryO Repository GitHub
README README.md
Installation Guide Getting Started
CUDA Documentation docs/cuda.md
Architecture docs/architecture.md
API Reference docs/api-reference.md
Support Policy SUPPORT.md
Security Policy SECURITY.md
Contributing CONTRIBUTING.md
Bug Reports GitHub Issues
Discussions GitHub Discussions
CI Workflows GitHub Actions

30. Final Checklist

Before requesting support:

  • Verify the Python version.
  • Activate the correct environment.
  • Confirm EveryO installation.
  • Run everyo doctor.
  • Capture the complete error.
  • Reduce the problem to a minimal example.
  • Check shapes, dtypes, and devices.
  • Verify optional dependencies.
  • Run relevant tests.
  • Remove secrets from logs.
  • Search existing issues.
  • Submit a clear report if unresolved.

Reliable debugging begins with reproducible evidence.


Troubleshooting Guide — Documentation Prepared

Next Recommended Page: Best Practices →

Home · Installation · API Reference


EveryO — Open Machine Learning. Built for Developers.

Project Maintainer: @krishanth7

Open Source · MIT Licensed · Community Driven

© 2026 EveryO Contributors

Clone this wiki locally