# Path: init2winit/hyperparameters.py
# def build_hparams(model_name,
#                   initializer_name,
#                   dataset_name,
#                   hparam_file,
#                   hparam_overrides):


from absl.testing import absltest
from init2winit import hyperparameters
import tensorflow.compat.v1 as tf
#
# 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.

"""Unit tests for hyperparameters.py."""



class HyperParameterTest(absltest.TestCase):
  """Tests hyperparameter overrides."""

  def test_override(self):
    """Test polynomial schedule works correctly."""
    hps_overrides = {
        'lr_hparams.schedule': 'polynomial',
        'lr_hparams.power': 2.0,
        'lr_hparams.base_lr': .1,
        'lr_hparams.end_factor': .01,
        'lr_hparams.decay_steps_factor': 0.5,
    }


# Path: init2winit/hyperparameters.py
# def build_hparams(model_name,
#                   initializer_name,
#                   dataset_name,
#                   hparam_file,
#                   hparam_overrides):


# Path: init2winit/test_hyperparameters.py
from absl.testing import absltest
from init2winit import hyperparameters
import tensorflow.compat.v1 as tf

#
# 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.

"""Unit tests for hyperparameters.py."""



class HyperParameterTest(absltest.TestCase):
  """Tests hyperparameter overrides."""

  def test_override(self):
    """Test polynomial schedule works correctly."""
    hps_overrides = {
        'lr_hparams.schedule': 'polynomial',
        'lr_hparams.power': 2.0,
        'lr_hparams.base_lr': .1,
        'lr_hparams.end_factor': .01,
        'lr_hparams.decay_steps_factor': 0.5,
    }


    merged_hps = hyperparameters.build_hparams(