Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Train models on remote model servers #38

Merged
merged 7 commits into from
Jul 20, 2023
Merged

Feat: Train models on remote model servers #38

merged 7 commits into from
Jul 20, 2023

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:https://localhost:58080/';
CREATE MODELTYPE rspn FOR INFERENCE AS REMOTE CLASS 'RSPN' IN 'http:https://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
1 check passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: Train models on remote model servers
1 participant