forked from jwzhanggy/Graph-Bert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmethod.py
44 lines (33 loc) · 1.18 KB
/
method.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
'''
Base MethodModule class for all models and frameworks
'''
# Copyright (c) 2017 Jiawei Zhang <[email protected]>
# License: TBD
import abc
class method:
'''
MethodModule: Abstract Class
Entries: method_name: the name of the MethodModule
method_description: the textual description of the MethodModule
method_start_time: start running time of MethodModule
method_stop_time: stop running time of MethodModule
method_running_time: total running time of the MethodModule
method_training_time: time cost of the training phrase
method_testing_time: time cost of the testing phrase
'''
method_name = None
method_description = None
data = None
method_start_time = None
method_stop_time = None
method_running_time = None
method_training_time = None
method_testing_time = None
# initialization function
def __init__(self, mName=None, mDescription=None):
self.methodName = mName
self.method_description = mDescription
# running function
@abc.abstractmethod
def run(self, trainData, trainLabel, testData):
return