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

data_load.py 468 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
  1. import hydra
  2. import pandas as pd
  3. from omegaconf.omegaconf import OmegaConf
  4. from typing import Text
  5. @hydra.main(config_path="../configs", config_name="configs")
  6. def data_load(cfg: Text) -> None:
  7. OmegaConf.to_yaml(cfg, resolve=True)
  8. """Load raw data and saves it to path
  9. Args:
  10. cfg {Text}: path to config
  11. """
  12. data = pd.read_csv(cfg.train.ingest)
  13. data.to_csv(cfg.train.dataset_csv, index=False)
  14. if __name__ == '__main__':
  15. data_load()
Tip!

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

Comments

Loading...