Skip to content

magistery-tps/rec-sys-client-lib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

recsys-client-lib

This library give support for:

  • Access to rec-sys via database repositories.
  • Access to rec-sys REST API to config and update recommenders data.
  • Jobs: Used to build and config similarity matrix (user-user / item-item) required by rec-sys recommenders.

Requirements

Getting Started

Step 1: First Import src directory into python class path:

import sys
sys.path.append('./src')

Step 2: Import DomainContext class. DomainContext is a python class that build and config all services required to interact with rec-sys via REST API or Database Client. DomainContext can be seen as a facade pattern.

from recsys.domain_context import DomainContext

ctx = DomainContext()

Step 3: Access to a REST API client

api_client = ctx.api

# Get user interactions
api_client.interacitons()

See api.recsys.RecSysApi for more detail.

Step 3: Execute a job.

ctx.bert_item_distance_matrix_job('all-mpnet-base-v2').execute()

ctx.svd_distance_matrix_job.execute()

ctx.nmf_distance_matrix_job.execute()

See job for more detail.

Step 4: Also could run jobs from bash.

$ conda activate recsys-client-side

$ python bin/svd_distance_matrix_job.py

$ python bin/nmf_distance_matrix_job.py

$ python bin/all_minilm_l12_v2_bert_item_distance_matrix_job.py

$ python bin/all_mpnet_base_v2_bert_item_distance_matrix_job.py

$ python bin/all_minilm_l6_v2_bert_item_distance_matrix_job.py

$ python bin/multi_qa_mpnet_base_dot_v1_bert_item_distance_matrix_job.py

API Documentation

Go to rec-sys-client-side Documentation.

WIKI

Go to rec-sys WIKI for model project details.

Releases

No releases published

Packages

No packages published

Languages

  • Python 83.6%
  • Jupyter Notebook 16.4%