Configuration
Training compute mode
Section titled “Training compute mode”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.
Compute sizing
Section titled “Compute sizing”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.
Training parameters
Section titled “Training parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
encoder_name | VARCHAR | required | Name for the encoder |
source_table | VARCHAR | required | Fully-qualified table name |
feature_columns | ARRAY | required | Columns to encode |
latent_dims | INTEGER | 16 | Output vector dimension |
epochs | INTEGER | 100 | Training epochs |
batch_size | INTEGER | 256 | Batch size |
passthrough_columns | ARRAY | [] | Columns returned alongside encoded vectors (not encoded) |
Encoder names ending in _v<number> are rejected to avoid collisions with the archive naming convention.
Scheduled training
Section titled “Scheduled training”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');Inference service
Section titled “Inference service”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.
Billing
Section titled “Billing”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;