-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add back kt-legacy for import kerastuner (#899)
- Loading branch information
1 parent
5cec63f
commit afe25e6
Showing
4 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Copyright 2019 The KerasTuner Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import pytest | ||
|
||
|
||
def test_kerastuner_same_as_keras_tuner(): | ||
with pytest.deprecated_call(): | ||
import kerastuner | ||
from kerastuner.tuners import RandomSearch # noqa: F401 | ||
from kerastuner.tuners import BayesianOptimization # noqa: F401 | ||
from kerastuner.tuners import Hyperband # noqa: F401 | ||
from kerastuner.engine.base_tuner import BaseTuner # noqa: F401 | ||
from kerastuner.engine.conditions import Condition # noqa: F401 | ||
from kerastuner.engine.hypermodel import HyperModel # noqa: F401 | ||
from kerastuner.engine.hyperparameters import ( # noqa: F401 | ||
HyperParameter, | ||
) | ||
from kerastuner.engine.hyperparameters import ( # noqa: F401 | ||
HyperParameters, | ||
) | ||
from kerastuner.engine.metrics_tracking import ( # noqa: F401 | ||
MetricObservation, | ||
) | ||
from kerastuner import Objective # noqa: F401 | ||
from kerastuner.engine.oracle import Oracle # noqa: F401 | ||
from kerastuner.engine.tuner import Tuner # noqa: F401 | ||
from kerastuner.engine.stateful import Stateful # noqa: F401 | ||
from kerastuner.engine.trial import Trial # noqa: F401 | ||
from kerastuner.engine.multi_execution_tuner import ( # noqa: F401 | ||
MultiExecutionTuner, | ||
) | ||
from kerastuner.applications import HyperResNet # noqa: F401 | ||
from kerastuner.applications import HyperXception # noqa: F401 | ||
|
||
import keras_tuner | ||
|
||
attr1 = [attr for attr in dir(kerastuner) if not attr.startswith("__")] | ||
attr2 = [attr for attr in dir(keras_tuner) if not attr.startswith("__")] | ||
|
||
assert len(attr1) > 20 | ||
assert set(attr1) >= set(attr2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
install_requires=[ | ||
"packaging", | ||
"requests", | ||
"kt-legacy", | ||
], | ||
extras_require={ | ||
"tensorflow": [ | ||
|