Skip to content

Commit

Permalink
fixed dataset download for CMV with implanted signals;
Browse files Browse the repository at this point in the history
  • Loading branch information
widmi committed Dec 10, 2020
1 parent c70a17e commit d204ee3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Günter Klambauer<sup>1</sup>

**Will be added:**
- multiple attention heads/queries and integration of https://github.com/ml-jku/hopfield-layers,
- Integrated Gradients analysis (write me an [email](widrich at ml.jku.at) if you urgently need a preliminary version).
- Integrated Gradients analysis (write me an email (widrich at ml.jku.at) if you urgently need a preliminary version).

## Installation
### pip
Expand Down Expand Up @@ -69,7 +69,7 @@ You can use `tensorboard --logdir [results_directory] --port=6060` and
open `http://localhost:6060/` in your web-browser to view the performance.

##### Real-world data with implanted signals
This is category has the smallest dataset files and is a good starting point.
This is category has the smallest dataset files and is a **good starting point**.
Training a binary DeepRC classifier on dataset "0" of category "real-world data with implanted signals":
```bash
python3 -m deeprc.examples.examples_from_paper.cmv_with_implanted_signals 0 --n_updates 10000 --evaluate_at 2000
Expand Down Expand Up @@ -149,7 +149,7 @@ deeprc
We are currently cleaning up and uploading the code for the paper.
There might be (and probably are) some bugs which will be fixed soon.
If you need help with running DeepRC in the meantime,
feel free to write me an [email](widrich at ml.jku.at).
feel free to write me an email (widrich at ml.jku.at).

Best wishes,

Expand Down
6 changes: 4 additions & 2 deletions deeprc/predefined_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ def cmv_implanted_dataset(dataset_path: str = None, dataset_id: int = 0, task_de
# Download metadata file
if not os.path.exists(metadata_file):
user_confirmation(f"File {metadata_file} not found. It will be downloaded now. Continue?", 'y', 'n')
url_get(f"https://ml.jku.at/research/DeepRC/datasets/CMV_data_with_implanted_signals/metadata/implanted_signals_{dataset_id}.tsv",
# url_get(f"https://ml.jku.at/research/DeepRC/datasets/CMV_data_with_implanted_signals/metadata/implanted_signals_{dataset_id}.csv",
# metadata_file)
url_get(f"https://cloud.ml.jku.at/s/KQDAdHjHpdn3pzg/download?path=/datasets/CMV_data_with_implanted_signals/metadata&files=implanted_signals_{dataset_id}.tsv",
metadata_file)

# Download repertoire file
Expand All @@ -296,7 +298,7 @@ def cmv_implanted_dataset(dataset_path: str = None, dataset_id: int = 0, task_de
cross_validation_fold=cross_validation_fold, n_worker_processes=n_worker_processes,
batch_size=batch_size, inputformat=inputformat, keep_dataset_in_ram=keep_dataset_in_ram,
sample_n_sequences=sample_n_sequences, sequence_counts_scaling_fn=no_sequence_count_scaling,
metadata_file_column_sep=',', verbose=verbose)
verbose=verbose)
return (task_definition, trainingset_dataloader, trainingset_eval_dataloader, validationset_eval_dataloader,
testset_eval_dataloader)

Expand Down
2 changes: 1 addition & 1 deletion deeprc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def user_confirmation(text: str = "Continue?", continue_if: str = 'y', abort_if:
if user_input == continue_if:
break
elif user_input == abort_if:
exit("Session terminated by user.")
exit()


def url_get(url: str, dst: str, verbose: bool = True):
Expand Down

0 comments on commit d204ee3

Please sign in to comment.