Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
goodwanghan committed Aug 16, 2024
1 parent c4bbc77 commit 55fe30e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tune_sklearn/objective.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import os
import cloudpickle
from tune.api.factory import TUNE_OBJECT_FACTORY
from typing import Any, Optional, Tuple
from uuid import uuid4

import cloudpickle
import numpy as np
import pandas as pd
from sklearn.metrics import get_scorer
from sklearn.model_selection import cross_val_score
from triad import FileSystem

from tune import NonIterativeObjectiveFunc, Trial, TrialReport
from tune.api.factory import TUNE_OBJECT_FACTORY
from tune.constants import (
SPACE_MODEL_NAME,
TUNE_DATASET_DF_DEFAULT_NAME,
TUNE_DATASET_VALIDATION_DF_DEFAULT_NAME,
)

from tune_sklearn.utils import to_sk_model, to_sk_model_expr


Expand Down
6 changes: 3 additions & 3 deletions tune_tensorflow/utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from typing import Any, Type, Dict
from typing import Any, Dict, Type

from triad.utils.convert import get_full_type_path, to_type
from tune.concepts.space.parameters import TuningParametersTemplate

from tune_tensorflow.spec import KerasTrainingSpec
from tune import Space
from tune.concepts.space.parameters import TuningParametersTemplate
from tune.constants import SPACE_MODEL_NAME
from tune_tensorflow.spec import KerasTrainingSpec

_TYPE_DICT: Dict[str, Type[KerasTrainingSpec]] = {}

Expand Down
4 changes: 2 additions & 2 deletions tune_test/local_optmizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_rand(self):
# common case
values = self._generate_values(Rand(-2.0, 3.0), lambda x: x**2)
assert len(values) > 0
assert all(x >= -2.0 and x <= 3.0 for x in values)
assert all(-2.0 <= x <= 3.0 for x in values)

# with q, and range%q == 0
values = self._generate_values(Rand(-2.0, 3.0, q=2.5), lambda x: x**2)
Expand All @@ -65,7 +65,7 @@ def test_rand(self):

# with log
values = self._generate_values(Rand(0.1, 3.0, log=True), lambda x: x**2)
assert all(x >= 0.1 and x <= 3.0 for x in values)
assert all(0.1 <= x <= 3.0 for x in values)

# with log and q, and range%q == 0
values = self._generate_values(
Expand Down

0 comments on commit 55fe30e

Please sign in to comment.