outerproduct.init() function is the entry point for every OuterProduct session. It authenticates the SDK against the OuterProduct API and must be called before you create datasets, configure trainers, or invoke any other SDK operation. You can supply your API key either through an environment variable (recommended for production) or by passing it directly in code.
Function Signature
Parameters
Your OuterProduct API key. If omitted, the SDK reads the key from the
OUTERPRODUCT_API_KEY environment variable. Generate a key from the OuterProduct Console.Usage
The environment-variable approach is strongly recommended for production workloads. It keeps credentials out of source code and avoids accidental exposure in version-control history or notebook outputs.
Setting the environment variable
SetOUTERPRODUCT_API_KEY in your shell before running your script:
What happens at initialization
Wheninit() is called, the SDK:
- Resolves the API key from the argument or the environment variable.
- Validates the key format locally.
- Establishes an authenticated session that all subsequent SDK calls reuse.
init() itself; the key is sent with the first API request.
Next steps
Once initialized, you are ready to load data and start training:Load your data
Create a
Dataset from a CSV, DataFrame, Parquet file, or NumPy array.Configure a Trainer
Use
Trainer.configure() to select your target column, model families, and optimization metric.