diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-10-22 14:00:45 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-10-22 14:00:45 +0200 |
commit | 4d8e84f322d704bb01d31190f3afa8b9eef81c86 (patch) | |
tree | a1b111d2a4fbb729954968d3481e44dee9db41d2 /bin/eval-online-model-accuracy.py | |
parent | 9232a9e5b289a837d7d6231448a56ba0c7cf1ed2 (diff) |
eval-online-model-accuracy: use PTA.from_file
Diffstat (limited to 'bin/eval-online-model-accuracy.py')
-rwxr-xr-x | bin/eval-online-model-accuracy.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/eval-online-model-accuracy.py b/bin/eval-online-model-accuracy.py index 8ddae65..75e2a51 100755 --- a/bin/eval-online-model-accuracy.py +++ b/bin/eval-online-model-accuracy.py @@ -110,11 +110,7 @@ if __name__ == '__main__': modelfile = args[0] - with open(modelfile, 'r') as f: - if '.json' in modelfile: - pta = PTA.from_json(json.load(f)) - else: - pta = PTA.from_yaml(yaml.safe_load(f)) + pta = PTA.from_file(modelfile) enum = dict() if '.json' not in modelfile: @@ -165,12 +161,15 @@ if __name__ == '__main__': base_weight += 8 return base_weight + #sys.exit(0) + mean_errors = list() for timer_freq, timer_type, ts_type, power_type, energy_type in itertools.product(timer_freqs, timer_types, timestamp_types, power_types, energy_types): real_energies = list() real_durations = list() model_energies = list() # duration in µs + # Bei kurzer Dauer (z.B. nur [1e2]) performt auc uint32_t für Energie gut, sonst nicht so (weil overflow) for sleep_duration in [1e2, 1e3, 1e4, 1e5, 1e6]: runs = pta.dfs(opt['depth'], with_arguments = True, with_parameters = True, trace_filter = opt['trace-filter'], sleep = sleep_duration) for run in runs: |