Skip to content

Configuration

Training runs on CPU by default. GPU is an explicit opt-in that requires GPU availability in the consumer’s region.

Switch to GPU:

CALL veil.core.set_training_compute('gpu');
CALL veil.core.start_services();

Switch back to CPU:

CALL veil.core.set_training_compute('cpu');
CALL veil.core.start_services();

No active training job can be running during a mode switch.

GPU mode selection uses SHOW COMPUTE POOL INSTANCE FAMILIES at runtime and matches against tested families. If no tested family is available in the consumer’s region, GPU mode is rejected with a clear error.

The encoding (inference) pool and the CPU training pool each run on an instance family that an administrator can change. The default for both is CPU_X64_XS. Supported families: CPU_X64_XS, CPU_X64_S, CPU_X64_M, CPU_X64_SL, CPU_X64_L, HIGHMEM_X64_S, HIGHMEM_X64_M.

Set the encoding pool size:

CALL veil.core.set_encoding_instance('CPU_X64_M');
CALL veil.core.start_services();

Set the CPU training pool size:

CALL veil.core.set_training_instance('CPU_X64_M');
CALL veil.core.start_services();

The choice persists across restarts. start_services checks the family against those available in the consumer’s region before it changes anything, then recreates the pool on the selected family. Applying a size change restarts services, so run it during a maintenance window and not while a training job is active.

The training size applies to CPU training mode. In GPU mode, training runs on a GPU family selected automatically.

ParameterTypeDefaultDescription
encoder_nameVARCHARrequiredName for the encoder
source_tableVARCHARrequiredFully-qualified table name
feature_columnsARRAYrequiredColumns to encode
latent_dimsINTEGER16Output vector dimension
epochsINTEGER100Training epochs
batch_sizeINTEGER256Batch size
passthrough_columnsARRAY[]Columns returned alongside encoded vectors (not encoded)

Encoder names ending in _v<number> are rejected to avoid collisions with the archive naming convention.

Schedule periodic retraining:

CALL veil.schedule_training(
'sales',
'my_db.my_schema.sales',
ARRAY_CONSTRUCT('price', 'sqft', 'bedrooms', 'bathrooms'),
16, 100, 256,
'USING CRON 0 2 * * 0 America/Los_Angeles'
);

The inference service runs on a CPU pool. The default family is CPU_X64_XS, available on all cloud providers and regions; an administrator can select a larger family with set_encoding_instance (see Compute sizing). The service supports up to 3 instances for horizontal scaling.

Usage-based billing via Snowflake Custom Event Billing. A single billing dimension: data processed through encoders (training and inference), metered per GB.

View billing events:

SELECT * FROM veil.billing_events_v;