|
| 1 | +# Feast - Agent Instructions |
| 2 | + |
| 3 | +This file provides instructions for AI coding agents (GitHub Copilot, Claude Code, OpenAI Codex, etc.) working in this repository. |
| 4 | + |
| 5 | +## Project Overview |
| 6 | + |
| 7 | +Feast is an open source feature store for machine learning that helps ML platform teams manage features consistently for training and serving. |
| 8 | + |
| 9 | +Feast (Feature Store) is a Python-based project that provides: |
| 10 | +- **Offline Store**: Process historical data for batch scoring or model training |
| 11 | +- **Online Store**: Power real-time predictions with low-latency features |
| 12 | +- **Feature Server**: Serve pre-computed features online |
| 13 | +- **Point-in-time correctness**: Prevent data leakage during model training |
| 14 | +- **Data infrastructure abstraction**: Decouple ML from data infrastructure |
| 15 | + |
| 16 | +## Development Commands |
| 17 | + |
| 18 | +### Setup |
| 19 | +```bash |
| 20 | +# Install development dependencies |
| 21 | +make install-python-dependencies-dev |
| 22 | + |
| 23 | +# Install minimal dependencies |
| 24 | +make install-python-dependencies-minimal |
| 25 | +``` |
| 26 | + |
| 27 | +### Code Quality |
| 28 | +```bash |
| 29 | +# Format Python code |
| 30 | +make format-python |
| 31 | + |
| 32 | +# Lint Python code |
| 33 | +make lint-python |
| 34 | + |
| 35 | +# Type check |
| 36 | +cd sdk/python && python -m mypy feast |
| 37 | +``` |
| 38 | + |
| 39 | +### Testing |
| 40 | +```bash |
| 41 | +# Run unit tests |
| 42 | +make test-python-unit |
| 43 | + |
| 44 | +# Run integration tests (local) |
| 45 | +make test-python-integration-local |
| 46 | + |
| 47 | +# Run integration tests (CI) |
| 48 | +make test-python-integration |
| 49 | + |
| 50 | +# Run all Python tests |
| 51 | +make test-python-universal |
| 52 | +``` |
| 53 | + |
| 54 | +### Protobuf Compilation |
| 55 | +```bash |
| 56 | +# Compile Python protobuf files |
| 57 | +make compile-protos-python |
| 58 | + |
| 59 | +# Compile all protos |
| 60 | +make protos |
| 61 | +``` |
| 62 | + |
| 63 | +### Go Development |
| 64 | +```bash |
| 65 | +# Build Go code |
| 66 | +make build-go |
| 67 | + |
| 68 | +# Test Go code |
| 69 | +make test-go |
| 70 | + |
| 71 | +# Format Go code |
| 72 | +make format-go |
| 73 | + |
| 74 | +# Lint Go code |
| 75 | +make lint-go |
| 76 | +``` |
| 77 | + |
| 78 | +### Docker |
| 79 | +```bash |
| 80 | +# Build all Docker images |
| 81 | +make build-docker |
| 82 | + |
| 83 | +# Build feature server Docker image |
| 84 | +make build-feature-server-docker |
| 85 | +``` |
| 86 | + |
| 87 | +### Documentation |
| 88 | +```bash |
| 89 | +# Build Sphinx documentation |
| 90 | +make build-sphinx |
| 91 | + |
| 92 | +# Build templates |
| 93 | +make build-templates |
| 94 | + |
| 95 | +# Build Helm docs |
| 96 | +make build-helm-docs |
| 97 | +``` |
| 98 | + |
| 99 | +## Project Structure |
| 100 | + |
| 101 | +``` |
| 102 | +feast/ |
| 103 | +├── sdk/python/ # Python SDK and core implementation |
| 104 | +├── go/ # Go implementation |
| 105 | +├── ui/ # Web UI |
| 106 | +├── docs/ # Documentation |
| 107 | +├── examples/ # Example projects |
| 108 | +├── infra/ # Infrastructure and deployment |
| 109 | +│ ├── charts/ # Helm charts |
| 110 | +│ └── feast-operator/ # Kubernetes operator |
| 111 | +└── protos/ # Protocol buffer definitions |
| 112 | +``` |
| 113 | + |
| 114 | +## Key Technologies |
| 115 | + |
| 116 | +- **Languages**: Python (primary), Go |
| 117 | +- **Dependencies**: pandas, pyarrow, SQLAlchemy, FastAPI, protobuf |
| 118 | +- **Data Sources**: BigQuery, Snowflake, Redshift, Parquet, Postgres, Spark |
| 119 | +- **Online Stores**: Redis, DynamoDB, Bigtable, Snowflake, SQLite, Postgres |
| 120 | +- **Offline Stores**: BigQuery, Snowflake, Redshift, Spark, Dask, DuckDB |
| 121 | +- **Cloud Providers**: AWS, GCP, Azure |
| 122 | + |
| 123 | +## Common Development Tasks |
| 124 | + |
| 125 | +### Running Tests |
| 126 | +The project uses pytest for Python testing with extensive integration test suites for different data sources and stores. |
| 127 | + |
| 128 | +### Code Style |
| 129 | +- Use type hints on all Python function signatures |
| 130 | +- Follow existing patterns in the module you are modifying |
| 131 | +- PR titles must follow semantic conventions: `feat:`, `fix:`, `ci:`, `chore:`, `docs:` |
| 132 | +- Sign off commits with `git commit -s` (DCO requirement) |
| 133 | +- Uses `ruff` for Python linting and formatting |
| 134 | +- Go uses standard `gofmt` |
| 135 | + |
| 136 | +### Protobuf Development |
| 137 | +Protocol buffers are used for data serialization and gRPC APIs. Recompile protos after making changes to `.proto` files. |
| 138 | + |
| 139 | +### Multi-language Support |
| 140 | +Feast supports Python and Go SDKs. Changes to core functionality may require updates across both languages. |
| 141 | + |
| 142 | +## Documentation and Blog Posts |
| 143 | + |
| 144 | +- **Blog posts must be placed in `/infra/website/docs/blog/`** — do NOT create blog posts under `docs/blog/` or any other location. |
| 145 | +- Blog post files must include YAML frontmatter with `title`, `description`, `date`, and `authors` fields, following the format of existing posts in that directory. |
| 146 | +- All other reference documentation goes under `docs/`. |
| 147 | + |
| 148 | +## Contributing |
| 149 | + |
| 150 | +1. Follow the [contribution guide](docs/project/contributing.md) |
| 151 | +2. Set up your development environment |
| 152 | +3. Run relevant tests before submitting PRs |
| 153 | +4. Ensure code passes linting and type checking |
0 commit comments