forked from qoherent/modrec-workflow
fixed the workflow, app.yaml now matches app_settings.py, configured dataset.py to always create a new data folder
This commit is contained in:
parent
ce312384da
commit
e822d68b53
|
@ -20,7 +20,7 @@ training:
|
||||||
inference:
|
inference:
|
||||||
model_path: "checkpoints/model.ckpt"
|
model_path: "checkpoints/model.ckpt"
|
||||||
num_classes: 10
|
num_classes: 10
|
||||||
results_output_path: "results/output.json"
|
output_path: "results/output.json"
|
||||||
|
|
||||||
app:
|
app:
|
||||||
build_dir: "dist"
|
build_dir: "dist"
|
|
@ -20,7 +20,7 @@ class DataSetConfig:
|
||||||
@dataclass
|
@dataclass
|
||||||
class TrainingConfig:
|
class TrainingConfig:
|
||||||
batch_size: int
|
batch_size: int
|
||||||
num_epochs: int
|
epochs: int
|
||||||
learning_rate: float
|
learning_rate: float
|
||||||
checkpoint_path: str
|
checkpoint_path: str
|
||||||
use_gpu: bool
|
use_gpu: bool
|
||||||
|
@ -29,7 +29,7 @@ class TrainingConfig:
|
||||||
class InferenceConfig:
|
class InferenceConfig:
|
||||||
model_path: str
|
model_path: str
|
||||||
num_classes: int
|
num_classes: int
|
||||||
output_dir: str
|
output_path: str
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class AppConfig:
|
class AppConfig:
|
||||||
|
@ -53,7 +53,7 @@ class AppSettings:
|
||||||
@lru_cache
|
@lru_cache
|
||||||
def get_app_settings() -> AppSettings:
|
def get_app_settings() -> AppSettings:
|
||||||
"""Return application configuration settings."""
|
"""Return application configuration settings."""
|
||||||
module_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
module_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
config_file = os.path.join(module_path, "conf", "app.yaml")
|
config_file = os.path.join(module_path, "conf", "app.yaml")
|
||||||
return AppSettings(config_file=config_file)
|
return AppSettings(config_file=config_file)
|
||||||
|
|
||||||
|
|
|
@ -116,9 +116,9 @@ def generate_datasets(cfg):
|
||||||
dset (h5py.Dataset): The created dataset object
|
dset (h5py.Dataset): The created dataset object
|
||||||
"""
|
"""
|
||||||
|
|
||||||
parent = os.path.dirname(cfg.output_dir)
|
#always create the output directory
|
||||||
if parent:
|
os.makedirs(cfg.output_dir, exist_ok=True)
|
||||||
os.makedirs(parent, exist_ok=True)
|
|
||||||
|
|
||||||
# we assume the recordings are in .npy format
|
# we assume the recordings are in .npy format
|
||||||
files = os.listdir(cfg.input_dir)
|
files = os.listdir(cfg.input_dir)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user