File size: 789 Bytes
3e4ba8b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from typing import List
import os
from src.utils.multirun_op import multirun_artifact_producer
import hydra
from omegaconf import DictConfig
from loguru import logger
from dotenv import load_dotenv, find_dotenv
import rootutils

# Load environment variables
load_dotenv(find_dotenv(".env"))

# Setup root directory
root = rootutils.setup_root(__file__, indicator=".project-root")


@hydra.main(config_path="../configs", config_name="train", version_base="1.3")
def create_artifacts(cfg: DictConfig):
    base_path = os.path.join(cfg.paths.log_dir, "train", "runs")
    logger.info(
        f"Base path: {base_path} and artifact directory: {cfg.paths.artifact_dir}"
    )
    multirun_artifact_producer(base_path, cfg.paths.artifact_dir)


if __name__ == "__main__":
    create_artifacts()