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

Feature/optuna kube bench #26

Merged
merged 28 commits into from
Sep 2, 2022
Merged

Feature/optuna kube bench #26

merged 28 commits into from
Sep 2, 2022

Conversation

gebauerm
Copy link
Collaborator

This PR:

  • adds benchmark config to results
  • adds yml definitions
  • adds wattage measurements
  • adds classification tracking (WIP)
  • updates optuna-kubernetes benchmark

@gebauerm gebauerm requested a review from tawalaya August 29, 2022 15:42
@@ -9,38 +9,6 @@ data:
POSTGRES_DB: postgresdb
POSTGRES_USER: postgresadmin
POSTGRES_PASSWORD: admin123
# ---
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete if unused


def deploy(self) -> None:
"""
Deploy DB
"""
# TODO: deal with exsiting resources...

if self.hyperparameter:
#TODO: XXX we got to fix this dependency thing. eitehr merge minikube/kubernetes or use the same baseclass or something...
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added as an issue in #22

@@ -165,10 +206,11 @@ def undeploy(self):
if self.delete_after_run:
client.CoreV1Api().delete_namespace(self.namespace)
self._watch_namespace()
self.image_builder.cleanup(self.trial_tag)
# self.image_builder.cleanup(self.trial_tag)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image builder causes issues as images have to be forcefully deleted, at least in minikube added as an issue in #27


def _watch_namespace(self):
try:
#TODO: XXX fix me!
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while loop needed. Added as an Issue in #28

@@ -0,0 +1,9 @@
# generated file - do not edit
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be deleted after benchmark is finished. Adressed in #29

from ml_benchmark.utils.yml_parser import YMLParser
import itertools

def generate_search_space(yaml_file_path):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hidden layer generation is not working. Issue #24

print(e)
raise AttributeError("Functions need to be part of a class in order to measure their latency.")
self.add_to_id(f"function-name_{self.function_name}__objHash_{self.obj_hash}")
#TODO: make each id filed also availible as a column
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont get that - what do you mean? Pls create issue if not already done

yaml_path (str): filename to write yaml to
obj (any): object to save as yaml
"""
with open(yaml_path, "w") as f:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only one class to handle yaml. Adressed in #22

@@ -50,7 +50,7 @@ def train(self):
epoch_losses.append(sum(batch_losses)/len(batch_losses))
return {"train_loss": epoch_losses}

@latency_decorator
@validation_latency_decorator
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

record dictionary in benchmrk metrics. Adressed in #21

@@ -0,0 +1,16 @@
import logging
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testfiles should resamble concrete files. Issue: #32

@gebauerm gebauerm merged commit ce9735f into main Sep 2, 2022
@tawalaya tawalaya deleted the feature/optuna-kube-bench branch October 31, 2022 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants