stages:
  download_dataset:
    foreach:
      - enron_spam
      - poleval
    do:
      wdir: .
      cmd: >-
        PYTHONPATH=. python experiments/scripts/download_dataset.py
        --dataset_name ${item}
        --output_dir data/datasets/${item}
      deps:
        - experiments/scripts/download_dataset.py
      outs:
        - data/datasets/${item}/
  preprocess_dataset:
    foreach:
      - enron_spam
      - poleval
      - 20_news
      - wiki_pl
    do:
       wdir: .
       cmd: >-
         PYTHONPATH=. python experiments/scripts/tag_dataset.py
         --dataset_name ${item}
       deps:
         - experiments/scripts/tag_dataset.py
         - data/datasets/${item}/
       outs:
         - data/preprocessed/${item}/
  get_model:
    foreach:
      - enron_spam
    do:
      wdir: .
      cmd: >-
        PYTHONPATH=. python experiments/scripts/get_model.py
        --dataset_name ${item}
        --output_dir data/models/${item}
      deps:
        - experiments/scripts/get_model.py
        - data/preprocessed/${item}
      outs:
        - data/models/${item}/
  classify:
    foreach:
      - enron_spam
      - 20_news
      - wiki_pl
    do:
      wdir: .
      cmd: >-
        PYTHONPATH=. python experiments/scripts/classify.py
        --dataset_name ${item}
        --output_dir data/classification/${item}
      deps:
        - experiments/scripts/classify.py
        - data/models/${item}/
        - data/preprocessed/${item}/
      outs:
        - data/classification/${item}
  explain:
    foreach:
      - enron_spam
      - 20_news
      - wiki_pl
    do:
      wdir: .
      cmd: >-
        PYTHONPATH=. python experiments/scripts/explain.py
        --dataset_name ${item}
        --output_dir data/explanations/${item}
      deps:
        - experiments/scripts/explain.py
        - data/models/${item}
        - data/preprocessed/${item}
      outs:
        - data/explanations/${item}/
  attack_basic:
    foreach:
      - enron_spam
        #- 20_news
        #- wiki_pl
    do:
      wdir: .
      cmd: >-
        PYTHONPATH=. python experiments/scripts/attack.py
        --dataset_name ${item}
      deps:
        - experiments/scripts/attack.py
        - data/models/${item}
        - data/preprocessed/${item}
      outs:
        - data/results/attack_basic/${item}/

