I am currently constructing a custom module with an architecture like such:
module/
│
├── util/
│ ├── metrics.py
│ └── util.py
│
└── training/
├── pretraining.py
└── training_step.py
In my pretraining.py
script I need to use a function located in util.py
. I am not sure how to import it in pretraining.py
So far I tried the classic:
from util.metrics import accuracy
I get the following error:
Traceback (most recent call last):
File "pretraining.py", line 5, in <module>
from util.metrics import accuracy
ModuleNotFoundError: No module named 'util'
How can I import the function in pretraining.py?