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

helper.py 442 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. from pathlib import Path
  2. from hydra import compose, initialize
  3. from prefect import task
  4. @task
  5. def load_config():
  6. """Load configurations from the file `main.yaml` under the `config` directory"""
  7. with initialize(version_base=None, config_path="../config"):
  8. config = compose(config_name="main")
  9. return config
  10. def create_parent_directory(path: str):
  11. parent_dir = Path(path).parent
  12. parent_dir.mkdir(exist_ok=True)
Tip!

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

Comments

Loading...