-
Notifications
You must be signed in to change notification settings - Fork 3
/
config-docker.py
49 lines (36 loc) · 1.48 KB
/
config-docker.py
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
import os
# Flask
ENV = 'production'
DEBUG = False
# Logging
LOGGING_FORMAT = '%(asctime)s %(levelname)s %(message)s'
LOGGING_LEVEL = 'INFO'
# Annoy
ANNOY_DISTANCE = 'angular'
ANNOY_TREES = 16
# Models
MODELS_FILE = 'models.yaml'
# Data, expects directories in format {dataset}-{model}-{layer}[-pca]
ROOT_DIR = '/data/'
INDEX_DIR = f'{ROOT_DIR}/annoy' # directory for indexed embeddings
AGGRDATA_DIR = f'{ROOT_DIR}/aggrdata' # directory for aggregated embeddings
# Constants
SEGMENT_PRECISION = 1 # number of digits to show after period for seconds for url hash
# Database
SQLALCHEMY_DATABASE_URI = f'sqlite:///{ROOT_DIR}/db.sqlite'
SQLALCHEMY_TRACK_MODIFICATIONS = False # to suppress warnings about deprecated functionality in sqlalchemy
# Number of items that are committed at a time: higher number speeds up processing but if something goes wrong,
# more data will be lost
DB_COMMIT_BATCH_SIZE = 1000
# Audio
AUDIO_PROVIDER = 'jamendo' # can be 'jamendo' for mtg-jamendo-dataset, or 'local' for in-house collection
# Jamendo - ignore if not using Jamendo
JAMENDO_CLIENT_ID = os.environ.get("JAMENDO_CLIENT_ID")
JAMENDO_BATCH_SIZE = 100 # number of tracks to include in one API call to Jamendo when populating the metadata
# Experiments results
EXPERIMENTS_DIR = f'{ROOT_DIR}/results' # where to store similarity results
# Plots
PCA_DIMS = 10 # number of PCA dimensions that are used for tsne and umap
# Flask-Caching related configs
CACHE_TYPE = 'SimpleCache'
CACHE_DEFAULT_TIMEOUT = 600