Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Leave TcgaPradDataset as an example
Browse files Browse the repository at this point in the history
  • Loading branch information
dccastro committed Dec 16, 2021
1 parent fa5ec34 commit f599e61
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 37 deletions.
5 changes: 3 additions & 2 deletions InnerEye/ML/Histopathology/datasets/tcga_prad_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(self, root: Union[str, Path],
from the dataset CSV file, e.g. after some filtering. If given, overrides `dataset_csv`.
"""
super().__init__(root, dataset_csv, dataset_df, validate_columns=False)
self.dataset_df[self.LABEL_COLUMN] = (self.dataset_df['label1_mutation']
| self.dataset_df['label2_mutation']).astype(int)
# Example of how to define a custom label column from existing columns:
self.dataset_df[self.LABEL_COLUMN] = (self.dataset_df['label1']
| self.dataset_df['label2']).astype(int)
self.validate_columns()
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ def main(slides_dataset: SlidesDataset, root_output_dir: Union[str, Path],
if __name__ == '__main__':
from InnerEye.ML.Histopathology.datasets.tcga_prad_dataset import TcgaPradDataset

# Example set up for an existing slides dataset:
main(slides_dataset=TcgaPradDataset("/tmp/datasets/TCGA-PRAD"),
root_output_dir="/datadrive/TCGA-PRAD_tiles",
n_slides=5,
Expand Down
35 changes: 0 additions & 35 deletions Tests/ML/histopathology/datasets/test_tcga_prad_dataset.py

This file was deleted.

0 comments on commit f599e61

Please sign in to comment.