(population_range, sample_size)
| 142 | def gen_random_tokens(ip_lens, tokenizer, random_seed): |
| 143 | |
| 144 | def get_sample_from_population(population_range, sample_size): |
| 145 | # random.sample can not sample a value more than once. hence the check |
| 146 | if sample_size < len(population_range): |
| 147 | sample = random.sample(population_range, sample_size) |
| 148 | else: |
| 149 | sample = random.choices(population_range, k=sample_size) |
| 150 | |
| 151 | return sample |
| 152 | |
| 153 | input_ids = [] |
| 154 | random.seed(random_seed) |
no test coverage detected