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

template.py 2.4 KB

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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
  1. import os
  2. from pathlib import Path
  3. import logging
  4. logging.basicConfig(level=logging.INFO, format='[%(asctime)s]: %(message)s:')
  5. project_name = "wineQuality"
  6. list_of_files = [
  7. ".github/workflows/.gitkeep",
  8. f"src/{project_name}/__init__.py",
  9. f"src/{project_name}/components/__init__.py",
  10. f"src/{project_name}/components/data_ingestion.py",
  11. f"src/{project_name}/components/data_validation.py",
  12. f"src/{project_name}/components/data_transformation.py",
  13. f"src/{project_name}/components/model_training.py",
  14. f"src/{project_name}/components/model_evaluation.py",
  15. f"src/{project_name}/utils/_init__.py",
  16. f"src/{project_name}/utils/common.py",
  17. f"src/{project_name}/config/__init__.py",
  18. f"src/{project_name}/config/configuration_manager.py",
  19. f"src/{project_name}/pipeline/__init__.py",
  20. f"src/{project_name}/pipeline/stage_01_data_ingestion.py",
  21. f"src/{project_name}/pipeline/stage_02_data_validation.py",
  22. f"src/{project_name}/pipeline/stage_03_data_transformation.py",
  23. f"src/{project_name}/pipeline/stage_04_model_training.py",
  24. f"src/{project_name}/pipeline/stage_05_model_evaluation.py",
  25. f"src/{project_name}/pipeline/stage_06_prediction.py",
  26. f"src/{project_name}/entity/__init__.py",
  27. f"src/{project_name}/entity/entity_configuration.py",
  28. f"src/{project_name}/constants/__init__.py",
  29. "config/config.yaml",
  30. "dvc.yaml",
  31. "params.yaml",
  32. "schema.yaml",
  33. "requirements.txt",
  34. "setup.py",
  35. "main.py",
  36. "research/trials.ipynb",
  37. "research/01_data_ingestion.ipynb",
  38. "research/02_data_validation.ipynb",
  39. "research/03_data_transformation.ipynb",
  40. "research/04_model_training.ipynb",
  41. "research/05_model_evaluation.ipynb",
  42. "research/06_prediction.ipynb",
  43. "templates/index.html",
  44. "templates/results.html",
  45. "Dockerfile",
  46. "app.py",
  47. ".gitignore",
  48. "logs/logfile.log",
  49. ]
  50. for filepath in list_of_files:
  51. filepath = Path(filepath)
  52. filedir, filename = os.path.split(filepath)
  53. if filedir != "":
  54. os.makedirs(filedir, exist_ok=True)
  55. logging.info(f"Creating directory;{filedir} for the file {filename}")
  56. if (not os.path.exists(filepath)) or (os.path.getsize(filepath) == 0):
  57. with open(filepath, 'w') as f:
  58. pass
  59. logging.info(f"Creating empty file: {filepath}")
  60. else:
  61. logging.info(f"{filename} already exists")
Tip!

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

Comments

Loading...