<commit_before>import os
from typing import Set
import copy

import numpy as np
import pytest
from sklearn.utils import check_random_state

from obp.policy import Random
from obp.types import BanditFeedback
from obp.dataset import (
    SyntheticBanditDataset,
    logistic_reward_function,
    linear_behavior_policy,
    SyntheticSlateBanditDataset,
)
from obp.utils import sigmoid

# resolve ImportMismatchError when using virtual environment
os.environ["PY_IGNORE_IMPORTMISMATCH"] = "1"

# generate synthetic dataset using SyntheticBanditDataset
@pytest.fixture(scope="session")
def synthetic_bandit_feedback() -> BanditFeedback:
    n_actions = 10
    dim_context = 5
    random_state = 12345<commit_msg>flake8<commit_after>import os
from typing import Set
import copy

import numpy as np
import pytest
from sklearn.utils import check_random_state

from obp.policy import Random
from obp.types import BanditFeedback
from obp.dataset import (
    SyntheticBanditDataset,
    logistic_reward_function,
    linear_behavior_policy,
    SyntheticSlateBanditDataset,
)
from obp.utils import sigmoid

# resolve ImportMismatchError when using virtual environment
os.environ["PY_IGNORE_IMPORTMISMATCH"] = "1"


# generate synthetic dataset using SyntheticBanditDataset
@pytest.fixture(scope="session")
def synthetic_bandit_feedback() -> BanditFeedback:
    n_actions = 10
    dim_context = 5
    random_state = 12345
{'fraction_non_alphanumeric': 0.05524079320113314, 'fraction_numerical': 0.013456090651558074, 'mean_word_length': 5.481651376146789, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7422873', 'n_tokens_mistral': 450, 'n_tokens_neox': 434, 'n_words': 119}