Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

serve_model.py 624 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  1. import os
  2. import subprocess
  3. import sys
  4. sys.path.append(".")
  5. from madewithml.config import MODEL_REGISTRY # NOQA: E402
  6. from madewithml.serve import ModelDeployment # NOQA: E402
  7. # Copy from S3
  8. github_username = os.environ.get("GITHUB_USERNAME")
  9. subprocess.check_output(["aws", "s3", "cp", f"s3://madewithml/{github_username}/mlflow/", str(MODEL_REGISTRY), "--recursive"])
  10. subprocess.check_output(["aws", "s3", "cp", f"s3://madewithml/{github_username}/results/", "./", "--recursive"])
  11. # Entrypoint
  12. run_id = [line.strip() for line in open("run_id.txt")][0]
  13. entrypoint = ModelDeployment.bind(run_id=run_id, threshold=0.9)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...