Skip to content

Commit

Permalink
fix: Fix format
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <gaoce@caicloud.io>
  • Loading branch information
gaocegege committed May 30, 2019
1 parent c676244 commit af4edaa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pkg/suggestion/v1alpha2/bayesian_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, logger=None):
self.manager_port = 6789
if logger == None:
self.logger = getLogger(__name__)
FORMAT = '%(asctime)-15s StudyID %(studyid)s %(message)s'
FORMAT = '%(asctime)-15s Experiment %(experiment_name)s %(message)s'
logging.basicConfig(format=FORMAT)
handler = StreamHandler()
handler.setLevel(INFO)
Expand Down Expand Up @@ -59,9 +59,9 @@ def GetSuggestions(self, request, context):
lowerbound = np.array(algo_manager.lower_bound)
upperbound = np.array(algo_manager.upper_bound)
self.logger.debug("lowerbound: %r", lowerbound,
extra={"experimeng_name": request.experiment_name})
extra={"experiment_name": request.experiment_name})
self.logger.debug("upperbound: %r", upperbound,
extra={"experimeng_name": request.experiment_name})
extra={"experiment_name": request.experiment_name})
alg = BOAlgorithm(
dim=algo_manager.dim,
N=int(service_params["N"]),
Expand Down Expand Up @@ -134,10 +134,10 @@ def getEvalHistory(self, experiment_name, obj_name, burn_in):
x_train = []
y_train = []
self.logger.info("Trials will be sampled until %d trials for burn-in are completed.",
burn_in, extra={"Experiment": experiment_name})
burn_in, extra={"experiment_name": experiment_name})
else:
self.logger.debug("Completed trials: %r", x_train,
extra={"Experiment": experiment_name})
extra={"experiment_name": experiment_name})

return x_train, y_train

Expand Down
2 changes: 1 addition & 1 deletion pkg/suggestion/v1alpha2/bayesianoptimization/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from logging import getLogger, StreamHandler


FORMAT = '%(asctime)-15s StudyID %(studyid)s %(message)s'
FORMAT = '%(asctime)-15s Experiment %(experiment_name)s %(message)s'
LOG_LEVEL = os.environ.get("LOG_LEVEL", "INFO")


Expand Down

0 comments on commit af4edaa

Please sign in to comment.