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

get_data.py 779 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
23
24
  1. # Set Authentication
  2. from yaml import safe_load
  3. import os
  4. # Get The Credentials
  5. credentials = safe_load(open("config.yaml"))["credentials"]
  6. # DVC Credentials
  7. dvc_config = credentials["dvc_config"]
  8. DVC_REMOTE_URL = dvc_config["DAGSHUB_REMOTE_URL"]
  9. USERNAME = dvc_config["USERNAME"]
  10. PASSWORD = dvc_config["PASSWORD"]
  11. # Get Raw Data path for pulling
  12. meta_data = credentials["metadata_path"]
  13. RAW_DATA_PATH = meta_data["RAW_DATA_PATH"]
  14. os.system("dvc remote add origin {}".format(DVC_REMOTE_URL))
  15. os.system("dvc remote modify origin --local auth basic")
  16. os.system("dvc remote modify origin --local user {}".format(USERNAME))
  17. os.system("dvc remote modify origin --local password {}".format(PASSWORD))
  18. # Get data from DVC
  19. os.system("dvc pull -r origin {}".format(RAW_DATA_PATH))
Tip!

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

Comments

Loading...