Completed
Push — master ( 77ef8d...d45822 )
by Simon
02:00
created

hyperactive.memory.paths.get_date_path()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
# Author: Simon Blanke
2
# Email: [email protected]
3
# License: MIT License
4
5
import os
6
import datetime
7
8
from .util import get_hash
9
10
11
def get_meta_path():
12
    current_path = os.path.realpath(__file__)
13
    return current_path.rsplit("/", 1)[0] + "/meta_data/"
14
15
16
def get_model_path(model_id):
17
    return "model_id:" + model_id + "/"
18
19
20
def get_date_path(datetime):
21
    return "run_data/" + datetime + "/"
22
23
24
def get_datetime():
25
    return datetime.datetime.now().strftime("%d.%m.%Y - %H:%M:%S")
26
27
28
def get_meta_data_name(X, y):
29
    feature_hash = get_hash(X)
30
    label_hash = get_hash(y)
31
32
    return "dataset_id:" + feature_hash + "_" + label_hash + "_.csv"
33