Skip to content

Instantly share code, notes, and snippets.

@achad4
Created April 6, 2022 22:20
Show Gist options
  • Save achad4/2b069958bfcd396022de6f4ead771cd8 to your computer and use it in GitHub Desktop.
Save achad4/2b069958bfcd396022de6f4ead771cd8 to your computer and use it in GitHub Desktop.
import ...
import fire
class CustomerModel(BaseModel):
def __init__(self):
super().__init__()
def train_model(lookback_days=30: int):
"""
Trains a model using data from the past <lookback_days> and persists to a model store
"""
...
def score_customers(model_version=None: str, lookback_days=30: int):
"""
Pulls <model_version> from the model store and uses it to score production data for the last <lookback_days>
"""
...
if __name__ == "main":
fire.Fire(CustomerModel)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment