Data: Tabular Time Series Specialty: Endocrinology Laboratory: Blood Tests EHR: Demographics Diagnoses Medications Omics: Genomics Multi-omics Transcriptomics Wearable: Activity Clinical Purpose: Treatment Response Assessment Task: Biomarker Discovery
[5ef06f]: / src / move / __main__.py

Download this file

49 lines (41 with data), 1.3 kB

 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
__all__ = []
import hydra
from omegaconf import OmegaConf
import move.tasks
from move import HYDRA_VERSION_BASE
from move.conf.schema import (
AnalyzeLatentConfig,
EncodeDataConfig,
IdentifyAssociationsConfig,
MOVEConfig,
TuneModelConfig,
)
from move.core.logging import get_logger
@hydra.main(
config_path="conf",
config_name="main",
version_base=HYDRA_VERSION_BASE,
)
def main(config: MOVEConfig) -> None:
"""Run MOVE.
Example:
$ python -m move experiment=random_small -cd=tutorial/config
"""
if not hasattr(config, "task"):
raise ValueError("No task defined.")
task_type = OmegaConf.get_type(config.task)
if task_type is None:
logger = get_logger("move")
logger.info("No task specified.")
elif task_type is EncodeDataConfig:
move.tasks.encode_data(config.data)
elif issubclass(task_type, TuneModelConfig):
move.tasks.tune_model(config)
elif task_type is AnalyzeLatentConfig:
move.tasks.analyze_latent(config)
elif issubclass(task_type, IdentifyAssociationsConfig):
move.tasks.identify_associations(config)
else:
raise ValueError("Unsupported type of task.")
if __name__ == "__main__":
main()