Documentation ¶
Overview ¶
Package vertigo is an opinionated approach to interacting with the Vertex AI Online Feature Store gRPC API.
Index ¶
Constants ¶
const DefaultRegion = "us-central1"
DefaultRegion is the region
const VertexEndpoint = "aiplatform.googleapis.com:443"
VertexEndpoint is the URL:PORT for the AI Platform API. This is used in providing non-default regional endpoints for Vertex AI.
Variables ¶
var ErrInvalidFeatureStoreName = errors.New("feature store name is not valid")
var ErrInvalidProjectID = errors.New("project id is not valid")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Vertigo client, which uses the aiplatformv1beta1 gRPC API to communicate with the FeaturestoreOnlineServingClient.
type Config ¶
type Config struct { // ProjectID is the GCP Project ID your Feature Store resides in. ProjectID string `json:"project_id" yaml:"project_id"` // Region is the GCP Region (sometimes referred to as Location) the Feature Store is running in. // Please see `https://cloud.google.com/vertex-ai/docs/general/locations` for a list // of supported regions. Region string `json:"region" yaml:"region"` // FeatureStoreName is the name of the feature store. FeatureStoreName string `json:"feature_store_name" yaml:"feature_store_name"` }
Config is the struct the contains configuration that is used in the Vertex AI API.
func (*Config) APIEndpoint ¶
APIEndpoint is the Vertex AI API Endpoint, specific to the Region you have deployed your feature store in.
func (*Config) ParentPath ¶
ParentPath is the resource hierarchy for the feature store that we are interacting with.
type ConfigBuilder ¶
type ConfigBuilder interface { WithRegion(region string) ConfigBuilder WithProjectID(projectID string) ConfigBuilder WithFeatureStoreName(featureStore string) ConfigBuilder Apply() (*Config, error) }
ConfigBuilder provides a fluent interface for building the Vertigo Config. If Region is not set, it will fall back to the DefaultRegion value.
func NewConfigBuilder ¶
func NewConfigBuilder() ConfigBuilder
NewConfigBuilder returns a fluent API to build the Config struct using the ConfigBuilder interface.
type Entity ¶
type Entity struct { ID string // contains filtered or unexported fields }
Entity contains the header and data from the aiplatform.ReadFeatureValuesResponse to be used to scan the response into a user provided struct.
func (*Entity) ScanStruct ¶
ScanStruct will parse the ReadFeatureValues response from the online serving client and load the features into dst. DST must be a pointer to a struct and have valid `vertex` tags that map to the feature IDs of the entity being parsed.
type Query ¶
Query represents a query to the Vertex AI Online Feature Store API for getting an Entity's Feature Values.
func (*Query) BuildRequest ¶
func (q *Query) BuildRequest(cfg *Config) *aiplatformpb.ReadFeatureValuesRequest
BuildRequest translates the Query struct into an AI Platform ReadFeatureValuesRequest, which is submitted to the Vertex AI Online Feature Store API to retrieve the Feature Values for an entity.