gorse

by zhenghaoz

Helm chartv0.5.4-rc.2App 0.5.4-rc.2

Gorse Recommender System Engine

About this chart

Gorse Helm Chart

Gorse An open-source recommender system service written in Go.

TL;DR

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add gorse-io https://charts.gorse.io
helm install gorse gorse-io/gorse

Introduction

This chart bootstraps a Gorse deployment on a Kubernetes cluster using the Helm package manager.

It also packages the Bitnami MongoDB chart which is required for bootstrapping a MongoDB deployment for the database requirements of the Gorse application.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name gorse:

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add gorse-io https://charts.gorse.io
helm install gorse gorse-io/gorse

The command deploys Gorse on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the gorse deployment:

helm unistall gorse

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionOverride Kubernetes version""
nameOverrideString to partially override common.names.fullname""
fullnameOverrideString to fully override common.names.fullname""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
secretAnnotationsAnnotations to add to secret{}
clusterDomainDefault Kubernetes cluster domaincluster.local

Gorse Configuration parameters

NameDescriptionValue
gorse.dashboard.usernameUsername for the dashboard.gorse
gorse.dashboard.passwordPassword for the dashboard.""
gorse.dashboard.authServerToken server for the dashboard.""

Master SSL

NameDescriptionValue
gorse.master.ssl.modeEnable SSL for the gRPC communication.false
gorse.master.ssl.caSSL certification authority for the gRPC communication.""
gorse.master.ssl.certSSL certification for the gRPC communication.""
gorse.master.ssl.keySSL certification key for the gRPC communication.""
gorse.api.keyThe key to secure the API endpoint""
gorse.api.corsDomainsList of allowed values for Http Origin[]
gorse.api.corsMethodsList of http methods names. Checking is case-insensitive.[]
gorse.api.autoInsertUsersInsert new users while inserting feedbacktrue
gorse.api.autoInsertItemsInsert new items while inserting feedback.true
gorse.api.returnSizeDefault number of returned items10
gorse.api.serverCacheExpireServer-side cache expire time10s
gorse.recommend.dataSource.feedbackTimeToLiveThe time-to-live (days) of positive feedback0
gorse.recommend.dataSource.itemTimeToLiveThe time-to-live (days) of items0
gorse.recommend.dataSource.positiveFeedbacksThe feedback types for positive events[]
gorse.recommend.dataSource.readFeedbacksThe feedback types for read events.[]
gorse.recommend.cache.sizeThe cache size for recommended/popular/latest items10
gorse.recommend.cache.expireRecommended cache expire time72h

Recommend online context

NameDescriptionValue
gorse.recommend.contextSizeThe context size for online recommendations.100
gorse.recommend.activeUserTtlThe time-to-live (days) of active users.0
gorse.recommend.popularThe time window of popular items4320h

Non-personalized recommenders

NameDescriptionValue
gorse.recommend.nonPersonalized[0].nameLeaderboard name (first entry)most_starred_weekly
gorse.recommend.nonPersonalized[0].scoreLeaderboard score expression (first entry)count(feedback, .FeedbackType == 'star')
gorse.recommend.nonPersonalized[0].filterLeaderboard filter expression (first entry)(now() - item.Timestamp).Hours() < 168

Item-to-item recommenders

NameDescriptionValue
gorse.recommend.itemToItem[0].nameItem-to-item recommender name (first entry)neighbors
gorse.recommend.itemToItem[0].typeItem-to-item recommender type (first entry)embedding
gorse.recommend.itemToItem[0].columnEmbedding column (first entry)item.Labels.embedding

User-to-user recommenders

NameDescriptionValue
gorse.recommend.userToUser[0].nameUser-to-user recommender name (first entry)neighbors
gorse.recommend.userToUser[0].typeUser-to-user recommender type (first entry)items

External recommenders

NameDescriptionValue
gorse.recommend.external[0].nameExternal recommender name (first entry)trending
gorse.recommend.external[0].scriptExternal recommender script (first entry)`const response = fetch("https://cdn.jsdelivr.net/gh/isboyjc/github-trending-api/data/daily/all.json");
if (!response.ok) {
throw new Error(${response.status} ${response.body});
}
const data = JSON.parse(response.body);
data["items"].map((item) => {
return item["title"].toLowerCase().replace("/", ":");
})
`
gorse.recommend.neighbors.users.typeThe type of neighbors for userssimilar
gorse.recommend.neighbors.items.typeThe type of neighbors for items.similar

Collaborative filtering

NameDescriptionValue
gorse.recommend.collaborative.enableEnable approximate collaborative filtering recommend using vector indextrue
gorse.recommend.collaborative.fitPeriodTime period for model fitting60m
gorse.recommend.collaborative.fitEpochNumber of epochs for model fitting100
gorse.recommend.collaborative.optimizePeriodTime period for hyperparameter optimization360m
gorse.recommend.collaborative.optimizeTrialsNumber of trials for hyperparameter optimization10
gorse.recommend.collaborative.earlyStopping.patienceEarly stopping patience epochs10

Replacement strategy

NameDescriptionValue
gorse.recommend.replacement.enableReplace historical items back to recommendationsfalse
gorse.recommend.replacement.decay.positiveDecay the weights of replaced items from positive feedbacks0.8
gorse.recommend.replacement.decay.readDecay the weights of replaced items from read feedbacks0.6

Ranker

NameDescriptionValue
gorse.recommend.ranker.typeRanker type (nonefm)
gorse.recommend.ranker.cacheExpireTime period to refresh recommendation for inactive users120h
gorse.recommend.ranker.recommendersCandidate recommenders used before ranking["latest","collaborative","non-personalized/most_starred_weekly","item-to-item/neighbors","user-to-user/neighbors"]
gorse.recommend.ranker.fitPeriodTime period for model fitting60m
gorse.recommend.ranker.fitEpochNumber of epochs for model fitting100
gorse.recommend.ranker.optimizePeriodTime period for hyperparameter optimization360m
gorse.recommend.ranker.optimizeTrialsNumber of trials for hyperpara

Deploy gorse with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has gorse on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgorse is pinned at v0.5.4-rc.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply