CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-feast

Python SDK for Feast - an open source feature store for machine learning that manages features for both training and serving environments.

Pending
Overview
Eval results
Files

cli-operations.mddocs/

CLI Operations

The Feast command-line interface provides essential tools for managing feature store operations, deployments, and development workflows. The CLI enables feature engineering teams to interact with Feast through standardized commands for repository management, feature serving, and data operations.

Capabilities

Repository Management

Initialize and manage Feast repositories with configuration templates and project setup.

# Initialize new Feast repository
feast init PROJECT_NAME

# Initialize with custom template
feast init PROJECT_NAME --template TEMPLATE_NAME

# Initialize minimal repository  
feast init PROJECT_NAME --minimal

Feature Definition Management

Apply and manage feature definitions including entities, feature views, and feature services.

# Apply all feature definitions from repository
feast apply

# Apply specific feature definitions
feast apply --feature-views FEATURE_VIEW_NAME

# Validate definitions without applying
feast plan

# Show differences between local and registry
feast diff

Feature Materialization

Materialize features from offline to online stores for serving with various scheduling and filtering options.

# Materialize features for date range
feast materialize START_TIMESTAMP END_TIMESTAMP

# Materialize specific feature views
feast materialize START_TIMESTAMP END_TIMESTAMP --feature-views FEATURE_VIEW_NAMES

# Incremental materialization since last run
feast materialize-incremental END_TIMESTAMP

# Materialize with custom scheduling
feast materialize START_TIMESTAMP END_TIMESTAMP --schedule "0 */4 * * *"

Feature Serving

Start and manage feature servers for production serving with HTTP and gRPC protocols.

# Start HTTP feature server
feast serve

# Start with custom host and port
feast serve --host 0.0.0.0 --port 8080

# Start gRPC server
feast serve --type grpc --port 6566

# Start with access logging disabled
feast serve --no-access-log

# Start offline feature server
feast serve-offline --host 0.0.0.0 --port 8081

# Start registry server
feast serve-registry --host 0.0.0.0 --port 6570

# Start transformation server
feast serve-transformations --host 0.0.0.0 --port 6569

Feature Retrieval

Retrieve features directly from the command line for testing and debugging.

# Get online features
feast get-online-features \
    --feature-service FEATURE_SERVICE_NAME \
    --entity KEY=VALUE

# Get historical features
feast get-historical-features \
    --feature-service FEATURE_SERVICE_NAME \
    --entity-df ENTITY_DATAFRAME_PATH \
    --output OUTPUT_PATH

Repository Inspection

Inspect and list feature store objects for debugging and exploration.

# List all entities
feast entities list

# Describe specific entity
feast entities describe ENTITY_NAME

# List all feature views
feast feature-views list

# Describe specific feature view  
feast feature-views describe FEATURE_VIEW_NAME

# List all feature services
feast feature-services list

# Describe specific feature service
feast feature-services describe FEATURE_SERVICE_NAME

# List all data sources
feast data-sources list

# Describe specific data source
feast data-sources describe DATA_SOURCE_NAME

Project Management

Manage Feast projects and their configurations.

# List all projects
feast projects list

# Create new project
feast projects create PROJECT_NAME

# Delete project
feast projects delete PROJECT_NAME

# Switch to project
feast projects set PROJECT_NAME

User Interface

Launch web-based interfaces for visual feature store management and exploration.

# Start Feast web UI
feast ui

# Start UI on custom host and port
feast ui --host 0.0.0.0 --port 8888

# Start UI with registry connection
feast ui --registry-ttl-sec 60

Validation and Testing

Validate feature store configurations and test feature definitions.

# Validate feature store configuration
feast validate

# Run feature store tests
feast test

# Validate specific feature views
feast validate --feature-views FEATURE_VIEW_NAMES

# Check data source connectivity
feast data-sources validate DATA_SOURCE_NAME

Registry Operations

Manage feature registry operations and metadata synchronization.

# Dump registry contents to console
feast registry-dump

# Refresh registry cache  
feast registry refresh

# Export registry contents
feast registry export --output registry_backup.json

# Import registry contents
feast registry import --input registry_backup.json

# Registry metadata operations
feast registry describe

System Operations

System-level operations for deployment and infrastructure management.

# Show Feast version
feast version

# Display current configuration
feast configuration

# Show feature server endpoints
feast endpoint

# Tear down deployed infrastructure
feast teardown

# Delete specific Feast objects
feast delete OBJECT_ID

# Listen for streaming updates
feast listen --address localhost:50051

Permission Management

Manage access control and permissions for feature store resources.

# List permissions
feast permissions list

# Create permission
feast permissions create PERMISSION_NAME --actions ACTION_LIST --resources RESOURCE_LIST

# Delete permission
feast permissions delete PERMISSION_NAME

# Describe permission
feast permissions describe PERMISSION_NAME

# Apply permissions from file
feast permissions apply PERMISSIONS_FILE

Configuration Options

Global CLI Options

Common command-line options available across most Feast commands.

# Specify feature store repository path
feast --repo-path /path/to/repo COMMAND

# Set log level
feast --log-level DEBUG COMMAND

# Use specific configuration file
feast --config /path/to/feature_store.yaml COMMAND

# Disable colored output
feast --no-color COMMAND

Environment Variables

Environment variables that configure Feast CLI behavior.

# Feature store configuration file path
export FEAST_FS_YAML_FILE_PATH=/path/to/feature_store.yaml

# Default repository path  
export FEAST_REPO_PATH=/path/to/repo

# Registry server endpoint
export FEAST_REGISTRY_SERVER_HOST=localhost
export FEAST_REGISTRY_SERVER_PORT=6570

# Authentication settings
export FEAST_AUTH_TYPE=oidc
export FEAST_AUTH_CLIENT_ID=feast-client

Usage Examples

Complete Development Workflow

# Initialize new project
feast init my_feature_store
cd my_feature_store

# Apply feature definitions
feast apply

# Validate configuration
feast validate

# Materialize historical data
feast materialize 2023-01-01T00:00:00 2023-01-31T23:59:59

# Start feature server for testing
feast serve --host 0.0.0.0 --port 6566 &

# Test online feature retrieval
feast get-online-features \
    --feature-service driver_ranking_service \
    --entity driver=1001

# Start web UI for exploration
feast ui --port 8888

Production Deployment Commands

# Apply production configurations
feast apply --environment production

# Materialize features for production serving
feast materialize-incremental $(date -u +"%Y-%m-%dT%H:%M:%S")

# Start production feature server
feast serve \
    --host 0.0.0.0 \
    --port 6566 \
    --type http \
    --workers 4

# Start registry server for metadata serving
feast serve-registry \
    --host 0.0.0.0 \
    --port 6570 \
    --workers 2

# Monitor registry health
feast registry describe

Debugging and Inspection

# Check feature store status
feast status

# Inspect specific feature view
feast feature-views describe customer_features

# Validate data source connectivity
feast data-sources validate customer_data_source

# Show feature lineage
feast lineage show --feature-view customer_features

# Export current registry state
feast registry export --output backup_$(date +%Y%m%d).json

# List materialization history
feast materialization list --feature-view customer_features

CI/CD Integration

# Validate changes in CI pipeline
feast plan --detailed

# Apply changes if validation passes
if feast validate; then
    feast apply
    echo "Feature definitions applied successfully"
else
    echo "Validation failed"
    exit 1
fi

# Automated materialization
feast materialize-incremental $(date -u +"%Y-%m-%dT%H:%M:%S") \
    --feature-views production_features

# Health check for deployment
curl -f http://localhost:6566/health || exit 1

Batch Operations

# Apply multiple feature views
feast apply \
    --feature-views customer_features,driver_features,order_features

# Materialize multiple feature views in parallel  
feast materialize 2023-01-01T00:00:00 2023-01-31T23:59:59 \
    --feature-views customer_features,driver_features \
    --parallel

# Bulk export historical features
feast get-historical-features \
    --feature-service training_service \
    --entity-df entities.csv \
    --output training_data.parquet \
    --format parquet

Error Handling and Troubleshooting

Common Error Scenarios

# Debug registry connection issues
feast validate --verbose

# Check feature view dependencies
feast feature-views validate FEATURE_VIEW_NAME --check-dependencies

# Verify data source accessibility
feast data-sources test DATA_SOURCE_NAME

# Debug materialization failures
feast materialize START END --dry-run --verbose

# Check permission issues
feast permissions check --resource RESOURCE_NAME --action ACTION

Install with Tessl CLI

npx tessl i tessl/pypi-feast

docs

cli-operations.md

data-sources.md

entities.md

feature-store.md

feature-views.md

index.md

vector-store.md

tile.json