Skip to content

Commit 34dc1ba

Browse files
authored
Merge pull request #5 from equalitie/model_interface
Model Interface
2 parents 77235c4 + 5ea0167 commit 34dc1ba

27 files changed

+907
-1477
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "CustomLogs",
3+
"properties": {
4+
"timestamp": {
5+
"type": "string",
6+
"format": "date",
7+
"pattern": "(\\d\\d\\d\\d-([0-2])?\\d-([0-3])?\\dT?([0-2])?\\d:([0-5])?\\d:([0-5])?\\d\\.\\d?\\d?\\d?Z?)"
8+
},
9+
"some_property": {
10+
"type": "string"
11+
},
12+
"some_other_property": {
13+
"type": "string"
14+
},
15+
"an_integer_property": {
16+
"type": "integer"
17+
},
18+
"a_numeric_property": {
19+
"type": "string"
20+
}
21+
},
22+
"required": ["timestamp", "some_property"],
23+
"additionalProperties": false
24+
}

src/baskerville/main.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,6 @@ def run_simulation(conf, spark=None):
6262
print('Set up Simulation...')
6363

6464

65-
def populate_with_test_data(database_config):
66-
"""
67-
Load the test data and save them in the database
68-
:param dict[str, T] database_config:
69-
:return:
70-
"""
71-
global logger
72-
from baskerville.util.model_serialization import import_pickled_model
73-
path = os.path.join(get_default_data_path(), 'samples', 'sample_model')
74-
test_model_path = os.path.join(get_default_data_path(), 'samples', 'test_model')
75-
logger.info(f'Loading test model from: {test_model_path}')
76-
import_pickled_model(database_config, path, test_model_path)
77-
78-
7965
def main():
8066
"""
8167
Baskerville commandline arguments
@@ -99,13 +85,6 @@ def main():
9985
"in the configuration port",
10086
)
10187

102-
parser.add_argument(
103-
"-t", "--testmodel", dest="test_model",
104-
help="Add a test model in the models table",
105-
default=False,
106-
action="store_true"
107-
)
108-
10988
parser.add_argument(
11089
"-c", "--conf", action="store", dest="conf_file",
11190
default=os.path.join(src_dir, '..', 'conf', 'baskerville.yaml'),
@@ -143,10 +122,6 @@ def main():
143122
logger.info(f'Starting Baskerville Exporter at '
144123
f'http://localhost:{port}')
145124

146-
# populate with test data if specified
147-
if args.test_model:
148-
populate_with_test_data(conf['database'])
149-
150125
for p in PROCESS_LIST[::-1]:
151126
print(f"{p.name} starting...")
152127
p.start()

src/baskerville/models/anomaly_detector.py

Lines changed: 0 additions & 215 deletions
This file was deleted.

0 commit comments

Comments
 (0)