# Path: prompt_tuning/data/postprocessors.py
# def remove_extra_id_0(decoded_model_output: str, *args, **kwargs) -> str:  # pylint: disable=unused-argument
# def postprocess_with_examples(
#     postprocess_func,
#     decoded_model_output,
#     prediction_field: str = constants.PREDICTION,
#     prediction_text_field: str = constants.PREDICTION_TEXT,
#     example_fields: Sequence[str] = (constants.INPUT_TEXT,
#                                      constants.TARGET_TEXT),
#     decoded_model_output_field: Optional[str] = None,
#     **kwargs,
# ) -> Union[Mapping[str, Any], Any]:
# def sequential(*funcs):
#   def execute(x, *args, **kwargs):
# def mrpc_to_qqp(decoded_model_output: str, *args, **kwargs) -> str:  # pylint: disable=unused-argument
# def qqp_to_mrpc(decoded_model_output: str, *args, **kwargs) -> str:  # pylint: disable=unused-argument


import unittest.mock as mock
from absl.testing import absltest
from prompt_tuning.data import postprocessors
# Copyright 2022 Google.
#
# 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.

"""Tests for postprocessors."""



class PostprocessorsTest(absltest.TestCase):

  def test_postprocess(self):
    gold = "gold"
    postproc_fn = mock.create_autospec(

# Path: prompt_tuning/data/postprocessors.py
# def remove_extra_id_0(decoded_model_output: str, *args, **kwargs) -> str:  # pylint: disable=unused-argument
# def postprocess_with_examples(
#     postprocess_func,
#     decoded_model_output,
#     prediction_field: str = constants.PREDICTION,
#     prediction_text_field: str = constants.PREDICTION_TEXT,
#     example_fields: Sequence[str] = (constants.INPUT_TEXT,
#                                      constants.TARGET_TEXT),
#     decoded_model_output_field: Optional[str] = None,
#     **kwargs,
# ) -> Union[Mapping[str, Any], Any]:
# def sequential(*funcs):
#   def execute(x, *args, **kwargs):
# def mrpc_to_qqp(decoded_model_output: str, *args, **kwargs) -> str:  # pylint: disable=unused-argument
# def qqp_to_mrpc(decoded_model_output: str, *args, **kwargs) -> str:  # pylint: disable=unused-argument


# Path: prompt_tuning/data/postprocessors_test.py
import unittest.mock as mock
from absl.testing import absltest
from prompt_tuning.data import postprocessors

# Copyright 2022 Google.
#
# 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.

"""Tests for postprocessors."""



class PostprocessorsTest(absltest.TestCase):

  def test_postprocess(self):
    gold = "gold"
    postproc_fn = mock.create_autospec(

        postprocessors.remove_extra_id_0, spec_set=True, return_value=gold)