Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test layers #146

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions deckard/base/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ def __call__(self, data: list, model: object, library=None):
else:
raise e
time_dict = {
"train_time": (start - end) / 1e9,
"train_time_per_sample": end / (len(data[0]) * 1e9),
"train_time": (end - start) / 1e9,
"train_time_per_sample": (end - start) / (len(data[0]) * 1e9),
"train_start_time": start_timestamp,
"train_end_time": end_timestamp,
"train_device": device,
Expand Down Expand Up @@ -589,8 +589,8 @@ def predict(self, data=None, model=None, predictions_file=None):
return (
predictions,
{
"predict_time": (start - end) / 1e9,
"predict_time_per_sample": (start - end) / (len(data[0]) * 1e9),
"predict_time": (end - start) / 1e9,
"predict_time_per_sample": (end - start) / (len(data[0]) * 1e9),
"predict_start_time": start_timestamp,
"predict_stop_time": end_timestamp,
"predict_device": device,
Expand Down Expand Up @@ -643,8 +643,8 @@ def predict_proba(self, data=None, model=None, probabilities_file=None):
return (
predictions,
{
"predict_proba_time": (start - end) / 1e9,
"predict_proba_time_per_sample": end / (len(data[0]) * 1e9),
"predict_proba_time": (end - start) / 1e9,
"predict_proba_time_per_sample": (end - start) / (len(data[0]) * 1e9),
"predict_proba_start_time": start_timestamp,
"predict_proba_stop_time": end_timestamp,
"predict_proba_device": device,
Expand Down Expand Up @@ -706,8 +706,9 @@ def predict_log_loss(self, data, model, losses_file=None):
return (
predictions,
{
"predict_log_proba_time": (start - end) / 1e9,
"predict_log_proba_time_per_sample": end / (len(data[0]) * 1e9),
"predict_log_proba_time": (end - start) / 1e9,
"predict_log_proba_time_per_sample": (end - start)
/ (len(data[0]) * 1e9),
"predict_log_proba_start_time": start_timestamp,
"predict_log_proba_stop_time": end_timestamp,
"predict_log_device": device,
Expand Down
2 changes: 2 additions & 0 deletions deckard/layers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
├── parse.py: Dumps the hydra configuration folder to `params.yaml` as specified by the `defaults` list in the hydra configuration file.
├── template.html: Draft webpage for each experiment (work in progress)
├── utils.py: Handy utilities for the other scripts
├── afr.py: For building accelerated failure rate models
├── plots.py: For generating plots using seaborn
└── watcher.py: Watches a file, transforms the data, and moves it somewhere else via parallelized scp (work in progress).
Empty file removed test/layers/test_exp.py
Empty file.
Loading