<jupyter_start><jupyter_text>Load list<jupyter_code>num_epochs = [6, 10, 20]
poison_samples = [8, 16, 24]
step_decay = [True, False]
learning_rate = [0.3, 0.1, 0.01]

decay = True

for epochs, poison, lr in itertools.product(num_epochs, poison_samples, learning_rate):
    fmt = f"""
- client:
    malicious:
      objective:
        args:
          num_epochs: {epochs}
          step_decay: {'true' if decay else 'false'}
          poison_samples: {poison}
          learning_rate: {lr}"""
    print(fmt)

num_epochs = [60, 80, 100, 140, 160]
poison_samples = [16, 20, 24, 28]
step_decay = [True, False]
# learning_rate = [0.001, 0.0001]

for epochs, poison, decay in itertools.product(num_epochs, poison_samples, step_decay):
    fmt = f"""
- client:
    malicious:
      objective:
        args:
          num_epochs: {epochs}
          step_decay: {'true' if decay else 'false'}
          poison_samples: {poison}"""
    print(fmt)
scale_factor = 85.0

bounds = [2, 5, 10, 15, 20, 25]
pgd_div = [0.8]
# learning_rate = [0.001, 0.0001]

print(len(list(itertools.product(bounds, pgd_div))))

for bound, pgd_div_i in itertools.product(bounds, pgd_div):
    pgd = bound / (scale_factor * pgd_div_i) if pgd_div_i is not None else '~'
    fmt = f"""
- client: # bgwall, under clipping bound
    malicious:
      objective:
        args:
          num_epochs: 25
          step_decay: ~
          poison_samples: 16
          learning_rate: 0.05
      backdoor:
        train: [568,3934,12336,30560,33105,33615,33907,36848,41706] # bgwall
        test: [330, 30696, 40713]
      evasion:
        args:
          scale_factor: 85
          pgd_factor: {pgd}
    clip:
      type: l2
      value: {bound}"""
    print(fmt)<jupyter_output>6

- client: # bgwall, under clipping bound
    malicious:
      objective:
        args:
          num_epochs: 25
          step_decay: ~
          poison_samples: 16
          learning_rate: 0.05
      backdoor:
        train: [568,3934,12336,30560,33105,33615,33907,36848,41706] # bgwall
        test: [330, 30696, 40713]
      evasion:
        args:
          scale_factor: 85
          pgd_factor: 0.029411764705882353
    clip:
      type: l2
      value: 2

- client: # bgwall, under clipping bound
    malicious:
      objective:
        args:
          num_epochs: 25
          step_decay: ~
          poison_samples: 16
          learning_rate: 0.05
      backdoor:
        train: [568,3934,12336,30560,33105,33615,33907,36848,41706] # bgwall
        test: [330, 30696, 40713]
      evasion:
        args:
          scale_factor: 85
          pgd_factor: 0.07352941176470588
    clip:
      type: l2
      value: 5

- client: # bgwall, under clipping bound
    malicious:
      objective:
 [...]<jupyter_text>Select 20<jupyter_code>target_people = people_7[-200:]
print(target_people)
num_select = 10
selection_size = 5
selections = []
step = int(target_people.shape[0] / num_select)
for i in range(num_select):
    selections.append(target_people[i*step:(i*step + selection_size)])

print(selections)
for s in selections:
    fmt = f"""
- environment:
    malicious_client_indices: [{','.join([str(x) for x in list(s)])}]"""
    print(fmt)

for s in selections:
    fmt = f"""[{','.join([str(x) for x in list(s)])}],"""
    print(fmt)<jupyter_output>[486,270,2078,3325,1559],
[2570,2163,2925,402,2088],
[1992,2270,1938,3000,1313],
[2424,2909,1989,2797,1929],
[2686,1951,2003,1811,1861],
[587,228,2647,1019,310],
[2418,3293,821,2161,2090],
[2275,2478,2332,593,1324],
[176,3321,2860,2752,2885],
[1653,3267,108,1053,2193],
{'fraction_non_alphanumeric': 0.13468013468013468, 'fraction_numerical': 0.1419753086419753, 'mean_word_length': 2.796592119275825, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '123325', 'license': 'MIT', 'n_tokens_mistral': 1673, 'n_tokens_neox': 1370, 'n_words': 284, 'path': 'plots/preprocessing/preprocessing_cifar_single_shot_grid.ipynb', 'repo_name': 'pps-lab/rofl-project-code', 'size': '3564'}