-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hparams: extract
api
wrapper over summary_v2
Summary: We’ll shortly extract the Keras callback out of `summary_v2` such that `summary_v2` does not need to depend on TensorFlow. It will continue to be exposed from `api`. Part of a reorganization to match the structure described here: <#2139 (comment)> wchargin-branch: hparams-api-refactor
- Loading branch information
Showing
4 changed files
with
98 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. | ||
# | ||
# 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 | ||
# | ||
# http://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. | ||
# ============================================================================== | ||
"""Experimental public APIs for the HParams plugin.""" | ||
|
||
from __future__ import absolute_import | ||
from __future__ import division | ||
from __future__ import print_function | ||
|
||
from tensorboard.plugins.hparams import summary_v2 | ||
|
||
|
||
Discrete = summary_v2.Discrete | ||
Domain = summary_v2.Domain | ||
HParam = summary_v2.HParam | ||
IntInterval = summary_v2.IntInterval | ||
KerasCallback = summary_v2.KerasCallback | ||
Metric = summary_v2.Metric | ||
RealInterval = summary_v2.RealInterval | ||
hparams_config = summary_v2.hparams_config | ||
|
||
|
||
del absolute_import | ||
del division | ||
del print_function | ||
del summary_v2 |
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,35 @@ | ||
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. | ||
# | ||
# 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 | ||
# | ||
# http://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. | ||
# ============================================================================== | ||
|
||
from __future__ import absolute_import | ||
from __future__ import division | ||
from __future__ import print_function | ||
|
||
from tensorboard import test | ||
from tensorboard.plugins.hparams import api | ||
from tensorboard.plugins.hparams import summary_v2 | ||
|
||
|
||
class ApiTest(test.TestCase): | ||
|
||
def test_has_core_attributes(self): | ||
self.assertIs(api.HParam, summary_v2.HParam) | ||
|
||
def test_has_keras_dependent_attributes(self): | ||
self.assertIs(api.KerasCallback, summary_v2.KerasCallback) | ||
|
||
|
||
if __name__ == "__main__": | ||
test.main() |
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