API Reference - krishanth7/EveryO GitHub Wiki

API Reference

EveryO — Official Python API & Developer Reference

Build · Compute · Differentiate · Train · Integrate

Python EveryO API License

A centralized reference for EveryO's public Python interfaces, computational functions, neural network components, optimization algorithms, data utilities, training tools, and integrations.

Home · Quick Start · Framework Architecture · Examples and Tutorials


Maintained By & Owner: EveryO Contributors & @krishanth7

Important

API Version and Compatibility

This reference is based on the public exports declared in everyo/__init__.py for the repository's default branch, with package metadata reporting version 0.2.0.

EveryO is currently classified as alpha software. APIs may change.

Public symbol availability has been checked against source exports. Detailed signatures are provided only where inspected; for other APIs, use Python introspection and the linked source code to confirm parameters and behavior.


Table of Contents

  1. API Overview
  2. Installation and Import
  3. Package Structure
  4. Tensor API
  5. Tensor Creation
  6. Mathematical Operations
  7. Automatic Differentiation
  8. Neural Network API
  9. Optimization API
  10. Data Processing API
  11. Training API
  12. Backend and Device API
  13. Mixed Precision API
  14. Serialization and ONNX
  15. Quantization API
  16. Profiling and Visualization
  17. Configuration and Logging
  18. Exceptions
  19. API Inspection and Compatibility
  20. Developer References
  21. Next Steps

1. API Overview

EveryO exposes a Python interface for neural computing and machine learning experimentation.

Its public exports cover tensor operations, gradient tracking, neural network modules, optimizers, data utilities, training workflows, serialization, and optional integrations.

1.1 API Categories

Category Main Responsibility
Core Tensor structures and numerical operations
Autograd Gradient tracking and differentiation
Neural Networks Layers, models, losses, activations
Optimization Parameter updates
Data Datasets, loading, preprocessing
Training Training loops, callbacks, metrics
Backends Numerical execution and device integration
Precision Mixed-precision execution utilities
Serialization Saving, loading, ONNX interoperability
Quantization Reduced-precision representations
Profiling Performance inspection
Visualization Training and evaluation plots
Configuration Application and training configuration

1.2 Basic Import

import everyo as eo

The eo alias is used throughout this reference.


2. Installation and Import

2.1 Requirements

Requirement Version
Python 3.9 or newer
NumPy 1.22 or newer
Matplotlib 3.5 or newer

2.2 Development Installation

git clone https://github.com/krishanth7/EveryO.git
cd EveryO

python -m pip install -e .

2.3 Optional Dependencies

The repository declares these optional dependency groups:

Extra Purpose
dev Development and testing
tensorflow TensorFlow integration
cuda CUDA extension build dependencies
onnx ONNX export and runtime
yaml YAML configuration

Example:

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

2.4 Verify Installation

import everyo as eo

print(eo.__version__)

3. Package Structure

EveryO organizes functionality across several Python modules.

3.1 Public API Organization

everyo
 |
 +-- core
 |    +-- tensor
 |    +-- operations
 |    +-- autograd
 |    +-- device
 |    +-- dtype
 |    +-- convolution
 |
 +-- nn
 |
 +-- optim
 |
 +-- data
 |
 +-- training
 |
 +-- backends
 |
 +-- cuda
 |
 +-- precision
 |
 +-- serialization
 |
 +-- quantization
 |
 +-- profiler
 |
 +-- visualization
 |
 +-- config

This is a simplified functional map, not an exhaustive directory listing.

3.2 Top-Level API

The public API is defined by the exports in:

everyo/__init__.py

Developers can inspect available symbols using:

import everyo as eo

for name in eo.__all__:
    print(name)

4. Tensor API

The Tensor class represents multidimensional numerical data with optional gradient tracking.

4.1 Public Interfaces

API Description
Tensor Tensor class
tensor Tensor construction
as_tensor Convert supported input to tensor
is_tensor Tensor type check

4.2 Tensor Constructor

The source defines the following constructor:

Tensor(
    data,
    *,
    dtype=None,
    device="cpu",
    requires_grad=False,
    name=None
)

Parameters

Parameter Type / Concept Description
data Array-like or scalar Input numerical data
dtype Optional Requested data type
device Device-like Execution device
requires_grad Boolean Enable gradient tracking
name Optional string Debugging label

Example

import everyo as eo

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

print(x.shape)

Expected output:

(2, 2)

4.3 Tensor Properties

The Tensor implementation exposes data and shape information.

import everyo as eo

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

print(x.shape)
print(x.data)

4.4 Matrix Multiplication

import everyo as eo

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

result = eo.matmul(x, y)

print(result.item())

Expected output:

11.0

Source: Tensor Implementation


5. Tensor Creation

EveryO publicly exports the following tensor creation functions.

Function General Purpose
tensor Create a tensor
as_tensor Convert input to tensor
zeros Create zero-filled tensor
ones Create one-filled tensor
full Create tensor with a specified fill value
eye Create identity-style matrix
arange Create a numeric sequence
linspace Create evenly spaced values
rand Generate random values
randn Generate normally distributed values
normal Normal-distribution generation
uniform Uniform-distribution generation
zeros_like Create zeros based on another tensor
ones_like Create ones based on another tensor

5.1 Example: Zero Tensor

import everyo as eo

x = eo.zeros(3, 4)

print(x.shape)

5.2 Example: Identity Matrix

import everyo as eo

identity = eo.eye(3)

print(identity.data)

Note

Inspect the signatures of creation functions before passing optional parameters such as dtype, device, or random seeds.


6. Mathematical Operations

EveryO exposes mathematical functions through its top-level namespace.

6.1 Arithmetic Operations

Function Operation
add Addition
subtract Subtraction
multiply Multiplication
divide Division
negative Negation
power Exponentiation
abs Absolute value
clip Value clipping

6.2 Linear Algebra

Function Operation
matmul Matrix multiplication
dot Dot product

6.3 Mathematical Functions

Function Operation
exp Exponential
log Natural logarithm
sqrt Square root
sigmoid Sigmoid
tanh Hyperbolic tangent
relu ReLU
softmax Softmax
log_softmax Log-softmax

6.4 Reductions

Function Operation
sum Sum
mean Mean
max Maximum
min Minimum
variance Variance

6.5 Shape Operations

Function Operation
reshape Reshape
transpose Transpose
flatten Flatten
concatenate Concatenate
stack Stack tensors

6.6 Additional Operations

Function Purpose
one_hot One-hot representation
conv2d Two-dimensional convolution
max_pool2d Max pooling
avg_pool2d Average pooling

Source Reference

Core Operations


7. Automatic Differentiation

EveryO exports gradient-control utilities.

7.1 Public API

API Purpose
no_grad Disable gradient tracking within a context
enable_grad Enable gradient tracking within a context
set_grad_enabled Control gradient tracking

7.2 Gradient-Tracking Example

import everyo as eo

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

7.3 Inference Context

import everyo as eo

with eo.no_grad():
    x = eo.tensor([1.0, 2.0, 3.0])
    y = eo.multiply(x, x)

7.4 Autograd Concepts

The autograd system is concerned with:

  • Computational dependencies.
  • Backward propagation.
  • Gradient accumulation.
  • Differentiable tensor operations.
  • Gradient-tracking state.

Related Documentation: Automatic Differentiation


8. Neural Network API

EveryO exports neural network components from everyo.nn.

8.1 Core Model Classes

Class Purpose
Module Base neural network module
Parameter Trainable parameter
Sequential Sequential model composition

8.2 Dense and Structural Layers

Class Purpose
Linear Fully connected layer
Flatten Flatten dimensions
Dropout Dropout regularization
Embedding Embedding representation

8.3 Convolution and Normalization

Class Purpose
Conv2D Two-dimensional convolution
MaxPool2D Maximum pooling
AvgPool2D Average pooling
BatchNorm1D One-dimensional batch normalization
BatchNorm2D Two-dimensional batch normalization
LayerNorm Layer normalization

8.4 Activation Modules

Class Purpose
ReLU ReLU activation
Sigmoid Sigmoid activation
Tanh Tanh activation
Softmax Softmax
LogSoftmax Log-softmax

8.5 Recurrent Modules

Class Purpose
RNN Recurrent neural network
LSTM Long Short-Term Memory
GRU Gated Recurrent Unit

8.6 Attention and Transformers

API Purpose
MultiHeadAttention Multi-head attention
PositionalEncoding Positional representations
TransformerEncoderBlock Transformer encoder block
TransformerEncoder Transformer encoder
scaled_dot_product_attention Attention computation
causal_mask Causal masking
padding_mask Padding masking

8.7 Loss Functions

Class General Use
Loss Base loss abstraction
MSELoss Mean squared error
MAELoss Mean absolute error
BCELoss Binary cross-entropy
BCEWithLogitsLoss Binary cross-entropy with logits
CrossEntropyLoss Classification cross-entropy

8.8 Verified Linear Constructor

Linear(
    in_features,
    out_features,
    *,
    bias=True,
    initializer="he_uniform",
    seed=None
)

Parameters

Parameter Description
in_features Input feature count
out_features Output feature count
bias Whether to include trainable bias
initializer Weight initialization scheme
seed Optional initialization seed

Example

import everyo as eo

layer = eo.Linear(4, 2, seed=0)

x = eo.zeros(3, 4)

output = layer(x)

print(output.shape)

Expected output:

(3, 2)

Source: Neural Network Layers


9. Optimization API

EveryO exports the following optimizer classes.

Class Purpose
Optimizer Optimizer base class
SGD Stochastic Gradient Descent
Adam Adaptive Moment Estimation

9.1 Import

from everyo import SGD, Adam

9.2 Optimization Workflow

A typical optimization process includes:

  1. Model parameter initialization.
  2. Forward computation.
  3. Loss calculation.
  4. Gradient calculation.
  5. Parameter updates.

9.3 API Verification

Inspect exact optimizer signatures using:

import inspect
import everyo as eo

print(inspect.signature(eo.SGD))
print(inspect.signature(eo.Adam))

Do not assume that optimizer parameter names or defaults match those of another machine learning framework.

Related Documentation: Optimization


10. Data Processing API

EveryO exports dataset and preprocessing utilities.

10.1 Dataset Classes

API Purpose
Dataset Dataset abstraction
ArrayDataset Array-backed dataset
TransformDataset Transformed dataset
Subset Dataset subset
DataLoader Data loading

10.2 Data Splitting

Function Purpose
train_test_split Split training and test data
stratified_split Stratified splitting
random_split Random splitting

10.3 Preprocessing

API Purpose
StandardScaler Feature standardization
MinMaxScaler Min-max scaling
standardize Standardization
one_hot_encode One-hot encoding
load_csv_dataset CSV dataset loading

10.4 Example: Inspect DataLoader

import inspect
import everyo as eo

print(inspect.signature(eo.DataLoader))

11. Training API

EveryO exports model training utilities and callbacks.

11.1 Training Components

API Purpose
Trainer Training workflow
History Training history
Callback Callback base
EarlyStopping Early stopping
ModelCheckpoint Model checkpointing
LearningRateScheduler Learning-rate scheduling
CSVLogger CSV logging
ProgressLogger Progress reporting

11.2 Evaluation Utilities

API Purpose
accuracy Accuracy metric
confusion_matrix Confusion matrix

11.3 Inspect Trainer

import inspect
import everyo as eo

print(inspect.signature(eo.Trainer))

11.4 Callback Considerations

Developers should confirm:

  • Callback lifecycle methods.
  • Training state passed to callbacks.
  • Checkpoint storage behavior.
  • Scheduler update frequency.
  • Exception handling.

12. Backend and Device API

12.1 Device Interfaces

API Purpose
Device Device representation
device Device-related interface
DTYPES Supported dtype registry
dtype_name Data type naming

12.2 Backend Modules

EveryO publicly exposes:

import everyo as eo

print(eo.backends)
print(eo.cuda)

12.3 Device Compatibility

Device behavior depends on:

  • Available hardware.
  • Installed dependencies.
  • Backend implementation.
  • Supported operations.
  • Runtime configuration.

Warning

CUDA availability must be verified independently. The presence of the cuda module does not guarantee an operational GPU backend.


13. Mixed Precision API

EveryO exports mixed-precision utilities.

API Purpose
autocast Autocast context
autocast_dtype Autocast dtype information
is_autocast_enabled Autocast state inspection
GradScaler Gradient scaling

13.1 Why Mixed Precision Matters

Mixed precision can reduce memory usage and improve performance on suitable hardware.

However, numerical behavior depends on:

  • Data type.
  • Supported operations.
  • Hardware.
  • Loss scaling.
  • Backend implementation.

13.2 Inspect Public Interfaces

import inspect
import everyo as eo

print(inspect.signature(eo.autocast))
print(inspect.signature(eo.GradScaler))

14. Serialization and ONNX

EveryO exports model serialization and interoperability utilities.

14.1 Serialization API

API Purpose
save Save supported state
load Load supported state
inspect_archive Inspect serialized archive

14.2 ONNX API

API Purpose
export_onnx ONNX export
export_onnx_traced Traced ONNX export
onnx_available ONNX dependency availability
run_onnx ONNX execution
trace_operations Operation tracing
TRACEABLE_OPERATIONS Traceable operation registry

14.3 ONNX Dependencies

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

14.4 Compatibility Considerations

Not all models or operations are necessarily supported by the ONNX export paths.

Confirm supported:

  • Operators.
  • Input shapes.
  • Model architectures.
  • ONNX versions.
  • Runtime dependencies.

14.5 Security

Treat untrusted serialized artifacts as potentially unsafe.

Do not assume that a file is safe merely because it has a recognized extension.


15. Quantization API

EveryO publicly exports quantization-related utilities.

API Purpose
quantize Quantization operation
quantize_dynamic Dynamic quantization
QuantizedArray Quantized array representation
QuantizedLinear Quantized linear component
QuantizationError Quantization-specific error

15.1 Quantization Objectives

Quantization may help reduce:

  • Model storage requirements.
  • Numerical representation size.
  • Memory bandwidth requirements.

Performance benefits depend on the implementation and execution hardware.

15.2 Verification

Inspect signatures before use:

import inspect
import everyo as eo

print(inspect.signature(eo.quantize))
print(inspect.signature(eo.quantize_dynamic))

16. Profiling and Visualization

16.1 Profiling API

API Purpose
Profiler Profiling component
profile Profiling utility
record_function Named profiling region

16.2 Visualization API

Function Purpose
plot_loss Loss visualization
plot_accuracy Accuracy visualization
plot_history Training history
plot_predictions Prediction visualization
plot_confusion_matrix Confusion matrix
plot_benchmark Benchmark visualization

16.3 Import Example

import everyo as eo

plotter = eo.plot_loss

print(plotter)

Check function signatures before passing training data or plotting options.


17. Configuration and Logging

17.1 Configuration API

API Purpose
Config General configuration
DeviceConfig Device configuration
ModelConfig Model configuration
TrainingConfig Training configuration
load_config Configuration loading

17.2 Logging API

API Purpose
configure_logging Logging configuration
get_logger Logger retrieval

17.3 Inspect Configuration

import inspect
import everyo as eo

print(inspect.signature(eo.Config))
print(inspect.signature(eo.TrainingConfig))

17.4 Configuration Principles

  • Validate required values.
  • Document defaults.
  • Avoid storing secrets in source control.
  • Record reproducibility-related settings.
  • Keep environment-specific configuration separate.

18. Exceptions

EveryO defines custom exception classes.

Exception Category
EveryOError General framework error
EveryOBackendError Backend-related error
EveryOConfigurationError Configuration error
EveryOCudaError CUDA-related error
EveryODeviceError Device-related error
EveryODTypeError Data type error
EveryOGradientError Gradient-related error
EveryOSerializationError Serialization error
EveryOShapeError Tensor shape error

18.1 Example

import everyo as eo

try:
    layer = eo.Linear(0, 4)
except eo.EveryOShapeError as error:
    print("Invalid layer shape:", error)

The Linear implementation rejects non-positive feature counts.

18.2 Error Handling Recommendations

  • Catch specific exception classes.
  • Preserve useful diagnostic information.
  • Avoid silently ignoring failed operations.
  • Log unexpected errors.
  • Validate inputs before expensive computations.

19. API Inspection and Compatibility

Because EveryO is in alpha development, API introspection is an important part of integration.

19.1 List Public Exports

import everyo as eo

for name in sorted(eo.__all__):
    print(name)

19.2 Inspect Function Signatures

import inspect
import everyo as eo

for name in ["tensor", "matmul", "Linear", "SGD", "Adam"]:
    obj = getattr(eo, name)

    try:
        signature = inspect.signature(obj)
    except (TypeError, ValueError):
        signature = "Signature unavailable"

    print(f"{name}: {signature}")

19.3 Inspect Documentation

import everyo as eo

help(eo.Tensor)
help(eo.Linear)
help(eo.Adam)

19.4 API Compatibility Policy

Until a formal stability guarantee is published:

  • Avoid assuming long-term signature stability.
  • Pin a tested release or commit.
  • Run integration tests after upgrades.
  • Review the changelog.
  • Report regressions through GitHub Issues.

19.5 Suggested API Documentation Standard

Each detailed API entry should include:

Field Description
Symbol Public class or function
Import Path Supported import
Signature Exact callable signature
Parameters Names, types, defaults
Returns Return type and meaning
Exceptions Documented failure cases
Example Tested executable example
Compatibility Version and backend requirements
Source Link to implementation

20. Developer References

Resource Link
Public API Exports everyo/init.py
Tensor Implementation core/tensor.py
Core Operations core/operations.py
Neural Network Modules nn/
Optimizers optim/
Training training/
Examples examples/
Tests tests/
Package Configuration pyproject.toml
Changelog CHANGELOG.md

21. Next Steps

Continue with the following EveryO Wiki pages.

Page Focus
Examples and Tutorials Practical executable workflows
Tensor Engine Tensor operations and numerical computing
Automatic Differentiation Gradient computation
Neural Networks Model development
Optimization Optimizers and training
Backend System Numerical execution

Wiki links become active when their corresponding pages are created.


API Reference — Documentation Prepared

Next Recommended Page: Examples and Tutorials →

Home · Quick Start · Framework Architecture · Backend System


EveryO — Open Machine Learning. Built for Developers.

Maintained By & Owner:
EveryO Contributors & @krishanth7

Open Source · MIT Licensed · Community Driven

© 2026 EveryO Contributors

⚠️ **GitHub.com Fallback** ⚠️