Skip to content

Commit

Permalink
Avoid star-imports
Browse files Browse the repository at this point in the history
  • Loading branch information
c-bata committed Apr 9, 2020
1 parent 93f46f2 commit f2c5f37
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
8 changes: 4 additions & 4 deletions pkg/suggestion/v1alpha3/chocolate/base_chocolate_service.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import json
import numpy as np
import chocolate as choco
import logging
import base64

from pkg.suggestion.v1alpha3.internal.search_space import *
from pkg.suggestion.v1alpha3.internal.trial import *
from pkg.suggestion.v1alpha3.internal.search_space import (
INTEGER, DOUBLE, CATEGORICAL, DISCRETE, MAX_GOAL,
)
from pkg.suggestion.v1alpha3.internal.trial import Assignment

logger = logging.getLogger(__name__)

Expand Down
8 changes: 5 additions & 3 deletions pkg/suggestion/v1alpha3/hyperopt/base_hyperopt_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
import numpy as np
import logging

from pkg.suggestion.v1alpha3.internal.search_space import *
from pkg.suggestion.v1alpha3.internal.trial import *
from pkg.suggestion.v1alpha3.internal.search_space import (
INTEGER, DOUBLE, CATEGORICAL, DISCRETE, MAX_GOAL,
)
from pkg.suggestion.v1alpha3.internal.trial import Assignment

logger = logging.getLogger(__name__)

TPE_ALGORITHM_NAME = "tpe"
RANDOM_ALGORITHM_NAME = "random"


class BaseHyperoptService(object):
def __init__(self, algorithm_name=TPE_ALGORITHM_NAME, random_state=None, search_space=None):
self.algorithm_name = algorithm_name
Expand Down Expand Up @@ -64,7 +67,6 @@ def create_fmin(self):

self.fmin.catch_eval_exceptions = False


def getSuggestions(self, trials, request_number):
"""
Get the new suggested trials with the given algorithm.
Expand Down
Empty file.
12 changes: 6 additions & 6 deletions pkg/suggestion/v1alpha3/skopt/base_skopt_service.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import json
import numpy as np
import skopt
import datetime
import logging
import skopt

from pkg.suggestion.v1alpha3.internal.search_space import *
from pkg.suggestion.v1alpha3.internal.trial import *
import datetime
from pkg.suggestion.v1alpha3.internal.search_space import (
INTEGER, DOUBLE, CATEGORICAL, DISCRETE, MAX_GOAL,
)
from pkg.suggestion.v1alpha3.internal.trial import Assignment

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit f2c5f37

Please sign in to comment.