Skip to content

Conversation

taewhi
Copy link
Member

@taewhi taewhi commented Jul 19, 2023

A simple model server are implemented.
You can train a model in a remote server as follows.

  1. Run TrainDBModelServer.py in $TRAINDB_PREFIX/models
  2. Create a modeltype using REMOTE keyword. For example,
CREATE MODELTYPE tablegan FOR SYNOPSIS AS REMOTE CLASS 'TableGAN' IN 'http://localhost:58080/'; CREATE MODELTYPE rspn FOR INFERENCE AS REMOTE CLASS 'RSPN' IN 'http://localhost:58080/';

For debugging and testing, http is used here. https can also be used.
3. Train a model in the same way as the local model.
The difference is that the model is trained asynchronously.

TRAIN MODEL tgan MODELTYPE tablegan ON instacart.order_products(reordered, add_to_cart_order) OPTIONS ( 'epochs'=1 ); TRAIN MODEL rspn_model MODELTYPE rspn ON instacart.order_products(reordered, add_to_cart_order);
  1. You can check the training status using the following commands.
SHOW TRAININGS; SHOW TRAININGS where 'model_name' = 'tgan' SHOW TRAININGS where 'model_server' LIKE '%localhost%'; SHOW TRAININGS where 'status' = 'TRAINING';
  1. training status will be updated when running some commands:
    SHOW TRAININGS, CREATE SYNOPSIS, SELECT APPROXIMATE
@taewhi taewhi linked an issue Jul 19, 2023 that may be closed by this pull request
@taewhi taewhi merged commit b125b42 into main Jul 20, 2023
@taewhi taewhi deleted the issue-12 branch July 20, 2023 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant