# Path: fedjax/datasets/stackoverflow.py
# SPLITS = ('train', 'held_out', 'test')
#   PAD = 0
#   BOS = 1
#   EOS = 2
# def cite():
# def load_split(split: str,
#                mode: str = 'sqlite',
#                cache_dir: Optional[str] = None) -> federated_data.FederatedData:
# def load_data(
#     mode: str = 'sqlite',
#     cache_dir: Optional[str] = None
# ) -> Tuple[federated_data.FederatedData, federated_data.FederatedData,
# def preprocess_client(
#     client_id: federated_data.ClientId,
#     examples: client_datasets.Examples) -> client_datasets.Examples:
# def default_vocab(default_vocab_size) -> List[str]:
#   def __init__(self,
#                vocab: Optional[List[str]] = None,
#                default_vocab_size: Optional[int] = 10000,
#                num_oov_buckets: int = 1):
#   def create_token_to_ids_fn(self, max_length: int):
#     def token_to_ids(tokens):
#   def as_preprocess_batch(
#       self, max_length: int
#   ) -> Callable[[client_datasets.Examples], client_datasets.Examples]:
#     def preprocess_batch(
#         examples: client_datasets.Examples) -> client_datasets.Examples:
# class StackoverflowTokenizer:


from absl.testing import absltest
from fedjax.datasets import stackoverflow
import numpy as np
import numpy.testing as npt
# Copyright 2021 Google LLC
#
# 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 fedjax.datasets.stackoverflow.

This file only tests preprocessing functions.
"""



class StackoverflowTest(absltest.TestCase):

  def test_preprocess_client(self):
    npt.assert_equal(

# Path: fedjax/datasets/stackoverflow.py
# SPLITS = ('train', 'held_out', 'test')
#   PAD = 0
#   BOS = 1
#   EOS = 2
# def cite():
# def load_split(split: str,
#                mode: str = 'sqlite',
#                cache_dir: Optional[str] = None) -> federated_data.FederatedData:
# def load_data(
#     mode: str = 'sqlite',
#     cache_dir: Optional[str] = None
# ) -> Tuple[federated_data.FederatedData, federated_data.FederatedData,
# def preprocess_client(
#     client_id: federated_data.ClientId,
#     examples: client_datasets.Examples) -> client_datasets.Examples:
# def default_vocab(default_vocab_size) -> List[str]:
#   def __init__(self,
#                vocab: Optional[List[str]] = None,
#                default_vocab_size: Optional[int] = 10000,
#                num_oov_buckets: int = 1):
#   def create_token_to_ids_fn(self, max_length: int):
#     def token_to_ids(tokens):
#   def as_preprocess_batch(
#       self, max_length: int
#   ) -> Callable[[client_datasets.Examples], client_datasets.Examples]:
#     def preprocess_batch(
#         examples: client_datasets.Examples) -> client_datasets.Examples:
# class StackoverflowTokenizer:


# Path: fedjax/datasets/stackoverflow_test.py
from absl.testing import absltest
from fedjax.datasets import stackoverflow
import numpy as np
import numpy.testing as npt

# Copyright 2021 Google LLC
#
# 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 fedjax.datasets.stackoverflow.

This file only tests preprocessing functions.
"""



class StackoverflowTest(absltest.TestCase):

  def test_preprocess_client(self):
    npt.assert_equal(

        stackoverflow.preprocess_client(