У меня есть структура папок, которая выглядит следующим образом:
Код: Выделить всё
source_scripts/
├── utils
│ ├── logger.py
├── models/
│ ├── ground_truth.py
│ ├── document.py
├── processing/
│ ├── processing.py
│ └── main.py
└── training/
├── training.py
└── main.py
Код: Выделить всё
from ..common.ground_truth import GroundTruthRow
Код: Выделить всё
script_processor = FrameworkProcessor()
args = script_processor.get_run_args(
source_dir="source_scripts"
code="processing/main.py"
)
step_process = ProcessingStep(
code=args.code
)
estimator = Estimator(
source_dir="source_scripts"
code="training/main.py"
)
step_train = TrainingStep(
estimator=estimator
)
Код: Выделить всё
ImportError: attempted relative import with no known parent package
Подробнее здесь: https://stackoverflow.com/questions/787 ... ps-without