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

prepare_ec2.py 684 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
18
19
20
21
22
  1. from yaml import safe_load
  2. from os.path import join
  3. import os
  4. ##### Source Code Access
  5. ec2_prepare_params = safe_load(open("params.yaml"))["ec2_prepare"]
  6. DAGSHUB_REMOTE_URL = ec2_prepare_params["DAGSHUB_REMOTE_URL"]
  7. DEPENDENCIES = ec2_prepare_params["REQUIREMENTS"]
  8. # 1. Clone the source code
  9. os.system("git clone {DAGSHUB_REMOTE_URL}")
  10. #### Model and Data Parameters
  11. model_data_params = safe_load(open("params.yaml"))["model_data_config"]
  12. MODEL_PATH = model_data_params["MODEL_PATH"]
  13. DATA_PATH = model_data_params["METRICS_PATH"]
  14. # 2. Pull data and model
  15. os.system("dvc pull {MODEL_PATH} {DATA_PATH}")
  16. # 3. Install the requirements
  17. os.system("pip install -r {DEPENDENCIES}")
Tip!

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

Comments

Loading...