shared_data_utils.py 4.04 KB
Newer Older
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import os
import getpass

hostname = os.uname()[1]
username = getpass.getuser()

if hostname == 'rechenknecht1.cp.jku.at':
    path_data_cache = '/media/rk1/shared/kofta_cached_datasets'

    # midlevel
    path_midlevel_annotations_dir = '/media/rk1/shared/datasets/midlevel/metadata_annotations'
    path_midlevel_annotations = '/media/rk1/shared/datasets/midlevel/metadata_annotations/annotations.csv'
    path_midlevel_audio_dir = '/media/rk1/shared/datasets/midlevel/audio'

    # mtgjamendo
    path_mtgjamendo_annotations_dir = '/media/rk1/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations'
    path_mtgjamendo_annotations_train = '/media/rk1/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations/train_processed.tsv'
    path_mtgjamendo_annotations_val = '/media/rk1/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations/val_processed.tsv'
    path_mtgjamendo_annotations_test = '/media/rk1/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations/test_processed.tsv'
    path_mtgjamendo_audio_dir = '/media/rk1/shared/datasets/MTG-Jamendo/MTG-Jamendo_audio'

if hostname == 'rechenknecht2.cp.jku.at':
    path_data_cache = '/media/rk2/shared/kofta_cached_datasets'

    # midlevel
    path_midlevel_annotations_dir = '/media/rk2/shared/datasets/midlevel/metadata_annotations'
    path_midlevel_annotations = '/media/rk2/shared/datasets/midlevel/metadata_annotations/annotations.csv'
    path_midlevel_audio_dir = '/media/rk2/shared/datasets/midlevel/audio'

    # mtgjamendo
    path_mtgjamendo_annotations_dir = '/media/rk2/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations'
    path_mtgjamendo_annotations_train = '/media/rk2/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations/train_processed.tsv'
    path_mtgjamendo_annotations_val = '/media/rk2/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations/validation_processed.tsv'
    path_mtgjamendo_annotations_test = '/media/rk2/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations/test_processed.tsv'
    path_mtgjamendo_audio_dir = '/media/rk2/shared/datasets/MTG-Jamendo/MTG-Jamendo_audio'

if hostname == 'rechenknecht3.cp.jku.at':
    path_data_cache = '/media/rk3/shared/kofta_cached_datasets'

    # midlevel
    path_midlevel_annotations_dir = '/media/rk3/shared/datasets/midlevel/metadata_annotations'
    path_midlevel_annotations = '/media/rk3/shared/datasets/midlevel/metadata_annotations/annotations.csv'
    path_midlevel_audio_dir = '/media/rk3/shared/datasets/midlevel/audio'

    # mtgjamendo
    path_mtgjamendo_annotations_dir = '/media/rk3/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations'
    path_mtgjamendo_annotations_train = '/media/rk3/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations/train_processed.tsv'
    path_mtgjamendo_annotations_val = '/media/rk3/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations/validation_processed.tsv'
    path_mtgjamendo_annotations_test = '/media/rk3/shared/datasets/MTG-Jamendo/MTG-Jamendo_annotations/test_processed.tsv'
    path_mtgjamendo_audio_dir = '/media/rk3/shared/datasets/MTG-Jamendo/MTG-Jamendo_audio'

if hostname == 'shreyan-All-Series':
    path_data_cache = '/mnt/2tb/datasets/data_caches'

    # midlevel
    path_midlevel_annotations_dir = '/mnt/2tb/datasets/MidlevelFeatures/metadata_annotations'
    path_midlevel_annotations = '/mnt/2tb/datasets/MidlevelFeatures/metadata_annotations/annotations.csv'
    path_midlevel_audio_dir = '/mnt/2tb/datasets/MidlevelFeatures/audio'

    # mtgjamendo
    path_mtgjamendo_annotations_dir = '/mnt/2tb/datasets/MTG-Jamendo/MTG-Jamendo_annotations'
    path_mtgjamendo_annotations_train = '/mnt/2tb/datasets/MTG-Jamendo/MTG-Jamendo_annotations/train_processed.tsv'
    path_mtgjamendo_annotations_val = '/mnt/2tb/datasets/MTG-Jamendo/MTG-Jamendo_annotations/validation_processed.tsv'
    path_mtgjamendo_annotations_test = '/mnt/2tb/datasets/MTG-Jamendo/MTG-Jamendo_annotations/test_processed.tsv'
    path_mtgjamendo_audio_dir = '/mnt/2tb/datasets/MTG-Jamendo/MTG-Jamendo_audio'

if hostname not in ['rechenknecht1.cp.jku.at', 'rechenknecht2.cp.jku.at', 'rechenknecht3.cp.jku.at', 'shreyan-All-Series']:
    raise Exception(f"Paths not defined for {hostname}")