diff --git a/.dvc/.gitignore b/.dvc/.gitignore new file mode 100644 index 0000000..528f30c --- /dev/null +++ b/.dvc/.gitignore @@ -0,0 +1,3 @@ +/config.local +/tmp +/cache diff --git a/.dvc/config b/.dvc/config new file mode 100644 index 0000000..df8f9a9 --- /dev/null +++ b/.dvc/config @@ -0,0 +1,4 @@ +[core] + remote = gdrive +['remote "gdrive"'] + url = gdrive://155tBftKDG8VSAWojOWT3exax3hz0Xuwg diff --git a/.dvcignore b/.dvcignore new file mode 100644 index 0000000..5197305 --- /dev/null +++ b/.dvcignore @@ -0,0 +1,3 @@ +# Add patterns of files dvc should ignore, which could improve +# the performance. Learn more at +# https://dvc.org/doc/user-guide/dvcignore diff --git a/.github/workflows/clf.yml b/.github/workflows/clf.yml index 78c6d08..a7fac4d 100644 --- a/.github/workflows/clf.yml +++ b/.github/workflows/clf.yml @@ -4,10 +4,11 @@ on: branches: - master - 'V**' - pull_request: - branches: - - master - - 'V**' + - dev +env: + GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }} + REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: build: runs-on: ubuntu-latest @@ -18,13 +19,40 @@ jobs: with: python-version: '3.8' architecture: 'x64' + - uses: actions/setup-node@v3 + with: + node-version: '16' + - uses: iterative/setup-cml@v1 - name: Display Python version run: python -c "import sys; print(sys.version)" - name: Install dependencies run: | python -m pip install --upgrade pip pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu - pip install -e '.[cv,cv_classification]' + pip install -e '.[dev,cv,cv_classification]' + pip install dvc dvc-gdrive + npm install -g markdown-table-cli + - name: Download data + run: | + echo "$GDRIVE_CREDENTIALS_DATA" > credentials.json + dvc remote modify gdrive --local gdrive_user_credentials_file ./credentials.json + dvc pull + ls -la samples - name: Test with pytest run: | pytest tests/classification --capture=no + - name: Display report + run: | + echo "# Classification Report" > report.md + echo "#### Metrics" >> report.md + cat runs/pytest_clf/Validation/metrics.json | md-table >> report.md + echo "#### Confusion Matrix" >> report.md + echo "![Confusion Matrix](runs/pytest_clf/Validation/cfm.png)" >> report.md + echo "#### Errorcases" >> report.md + echo "![Confusion Matrix](runs/pytest_clf/Validation/errorcases.png)" >> report.md + echo "------------------" >> report.md + echo "#### Hyperparameters Tuning" >> report.md + echo "Leaderboard" >> report.md + cat runs/optuna/clf/overview/leaderboard.json | md-table >> report.md + echo >> report.md + cml comment create report.md diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..a2e0794 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,69 @@ +name: autobuild_docker +on: + pull_request: + branches: + - master + - 'V**' + - dev + +env: + REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }} + DOCKERHUB_TAG: kaylode/theseus:latest + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.8 + uses: actions/setup-python@v4 + with: + python-version: '3.8' + architecture: 'x64' + - uses: iterative/setup-cml@v1 + - uses: iterative/setup-dvc@v1 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Create credentials file + run: | + echo "$GDRIVE_CREDENTIALS_DATA" > credentials.json + - name: Build Dockerfile + uses: docker/build-push-action@v4 + with: + context: . + tags: ${{ env.DOCKERHUB_TAG }} + outputs: type=docker,dest=${{ github.workspace }}/image.tar + secret-files: | + credentials=./credentials.json + + - name: Free up space + run: | + docker system prune -f + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + - name: Docker name + run: | + docker load -i ${{ github.workspace }}/image.tar + docker image inspect ${{ env.DOCKERHUB_TAG }} + + - name: Create outputs folder + run: | + mkdir -p outputs + + - name: Test Docker + uses: addnab/docker-run-action@v3 + with: + image: ${{ env.DOCKERHUB_TAG }} + options: --rm -v ${{ github.workspace }}/outputs/:/workspace/runs/ + run: | + pytest tests --capture=no + + - name: where am I + run: | + pwd + ls -la + ls -la outputs diff --git a/.github/workflows/segm.yml b/.github/workflows/segm.yml index c908d4a..a955226 100644 --- a/.github/workflows/segm.yml +++ b/.github/workflows/segm.yml @@ -4,10 +4,11 @@ on: branches: - master - 'V**' - pull_request: - branches: - - master - - 'V**' + - dev +env: + GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }} + REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: build: runs-on: ubuntu-latest @@ -18,13 +19,34 @@ jobs: with: python-version: '3.8' architecture: 'x64' + - uses: actions/setup-node@v3 + with: + node-version: '16' + - uses: iterative/setup-cml@v1 - name: Display Python version run: python -c "import sys; print(sys.version)" - name: Install dependencies run: | python -m pip install --upgrade pip pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu - pip install -e '.[cv,cv_semantic]' + pip install -e '.[dev,cv,cv_semantic]' + pip install dvc dvc-gdrive + npm install -g markdown-table-cli + - name: Download data + run: | + echo "$GDRIVE_CREDENTIALS_DATA" > credentials.json + dvc remote modify gdrive --local gdrive_user_credentials_file ./credentials.json + dvc pull + ls -la samples - name: Test with pytest run: | pytest tests/semantic --capture=no + - name: Display report + run: | + echo "# Semantic Report" > report.md + echo "#### Metrics" >> report.md + cat runs/pytest_segm/Validation/metrics.json | md-table >> report.md + echo >> report.md + echo "#### Prediction" >> report.md + echo "![Prediction](runs/pytest_segm/Validation/prediction.png)" >> report.md + cml comment create report.md diff --git a/.github/workflows/tablr.yml b/.github/workflows/tablr.yml index f4f0c42..c05faee 100644 --- a/.github/workflows/tablr.yml +++ b/.github/workflows/tablr.yml @@ -4,10 +4,11 @@ on: branches: - master - 'V**' - pull_request: - branches: - - master - - 'V**' + - dev +env: + GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }} + REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: build: runs-on: ubuntu-latest @@ -18,13 +19,48 @@ jobs: with: python-version: '3.8' architecture: 'x64' + - uses: actions/setup-node@v3 + with: + node-version: '16' + - uses: iterative/setup-cml@v1 - name: Display Python version run: python -c "import sys; print(sys.version)" - name: Install dependencies run: | python -m pip install --upgrade pip pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu - pip install -e '.[tabular, tabular_classification]' + pip install -e '.[dev,tabular,tabular_classification]' + pip install dvc dvc-gdrive + npm install -g markdown-table-cli + - name: Download data + run: | + echo "$GDRIVE_CREDENTIALS_DATA" > credentials.json + dvc remote modify gdrive --local gdrive_user_credentials_file ./credentials.json + dvc pull + ls -la samples - name: Test with pytest run: | pytest tests/tabular --capture=no + - name: Display report + run: | + echo "# Tabular Classification Report" > report.md + echo "#### Metrics" >> report.md + cat runs/pytest_tablr/Validation/metrics.json | md-table >> report.md + echo "#### SHAP train" >> report.md + echo "![SHAP](runs/pytest_tablr/Importance/SHAP/train.png)" >> report.md + echo "#### SHAP val" >> report.md + echo "![SHAP](runs/pytest_tablr/Importance/SHAP/val.png)" >> report.md + echo "------------------" >> report.md + + echo "#### Hyperparameters Tuning" >> report.md + echo "Leaderboard" >> report.md + cat runs/optuna/tablr/overview/leaderboard.json | md-table >> report.md + echo >> report.md + echo "Figures" >> report.md + echo "![History](runs/optuna/tablr/overview/history.png)" >> report.md + echo "![Contour plot](runs/optuna/tablr/overview/contour.png)" >> report.md + echo "![Parallel](runs/optuna/tablr/overview/parallel_coordinate.png)" >> report.md + echo "![Importance](runs/optuna/tablr/overview/param_importances.png)" >> report.md + echo "![Slice](runs/optuna/tablr/overview/slice.png)" >> report.md + + cml comment create report.md diff --git a/Dockerfile b/Dockerfile index 1aebfd2..5611114 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,9 +10,8 @@ ARG BASE_IMAGE=ubuntu:18.04 # Instal basic utilities -ENV DEBIAN_FRONTEND noninteractiveee -RUN --mount=type=cache,id=apt-dev,target=/var/cache/apt \ - apt-get update && apt-get install -y --no-install-recommends \ +FROM ${BASE_IMAGE} as dev-base +RUN apt-get clean && apt-get update && apt-get upgrade && apt-get install -y --no-install-recommends \ build-essential \ ca-certificates \ ccache \ @@ -20,30 +19,53 @@ RUN --mount=type=cache,id=apt-dev,target=/var/cache/apt \ curl \ git \ gcc \ + wget \ libjpeg-dev \ + zip \ + swig python3-dev \ unzip bzip2 ffmpeg libsm6 libxext6 \ libpng-dev && \ rm -rf /var/lib/apt/lists/* - -RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ - chmod +x ~/miniconda.sh && \ - ~/miniconda.sh -b -p /opt/conda && \ - rm ~/miniconda.sh && \ - /opt/conda/bin/conda install -c pytorch -c nvidia -y \ - python=${PYTHON_VERSION} \ - pytorch=${PYTORCH_VERSION} torchvision "pytorch-cuda=${CUDA_VERSION}" && \ - /opt/conda/bin/conda clean -ya - RUN /usr/sbin/update-ccache-symlinks RUN mkdir /opt/ccache && ccache --set-config=cache_dir=/opt/ccache - ENV PATH /opt/conda/bin:$PATH + +# Instal environment +FROM dev-base as conda-installs +ARG PYTHON_VERSION=3.9 +ARG CUDA_VERSION=11.3 +ARG PYTORCH_VERSION=1.12.1 +ARG CUDA_CHANNEL=nvidia +ARG INSTALL_CHANNEL=pytorch +ENV CONDA_OVERRIDE_CUDA=${CUDA_VERSION} +RUN curl -fsSL -v -o ~/mambaforge.sh -O https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh && \ + chmod +x ~/mambaforge.sh && \ + ~/mambaforge.sh -b -p /opt/mamba && \ + rm ~/mambaforge.sh && \ + /opt/mamba/bin/mamba install -c "${INSTALL_CHANNEL}" -c "${CUDA_CHANNEL}" -y \ + python=${PYTHON_VERSION} \ + pytorch=${PYTORCH_VERSION} torchvision "cudatoolkit=${CUDA_VERSION}" && \ + /opt/mamba/bin/mamba clean -ya + +ENV PATH /opt/mamba/bin:$PATH ENV NVIDIA_VISIBLE_DEVICES all ENV NVIDIA_DRIVER_CAPABILITIES compute,utility ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 ENV PYTORCH_VERSION ${PYTORCH_VERSION} -# Install +# Install dependencies COPY ./ /workspace/ WORKDIR /workspace/ -RUN /opt/conda/bin/python -m pip install -e . +RUN /opt/mamba/bin/python -m pip install --upgrade pip && \ + /opt/mamba/bin/python -m pip install -e .[cv,cv_classification,cv_semantic,cv_detection,nlp,nlp_retrieval,tabular,tabular_classification,dev] && \ + /opt/mamba/bin/python -m pip install dvc dvc-gdrive && \ + /opt/mamba/bin/python -m pip install -U timm + +# Pull data from GDrive +RUN --mount=type=secret,id=credentials \ + CREDENTIALS=$(cat /run/secrets/credentials) \ + && echo "$CREDENTIALS" > /workspace/credentials.json +RUN dvc remote modify gdrive --local gdrive_user_credentials_file /workspace/credentials.json +RUN dvc pull + +ENTRYPOINT ["/bin/bash"] diff --git a/configs/base/globals.yaml b/configs/base/globals.yaml new file mode 100644 index 0000000..79370ae --- /dev/null +++ b/configs/base/globals.yaml @@ -0,0 +1,15 @@ +global: + exp_name: null + exist_ok: false + debug: false + save_dir: runs + device: cuda:0 + pretrained: null + resume: null +trainer: + name: SupervisedTrainer + args: + num_iterations: 10000 + clip_grad: 1.0 + evaluate_interval: 1 + use_fp16: true diff --git a/configs/base/optimizer.yaml b/configs/base/optimizer.yaml new file mode 100644 index 0000000..73e4f17 --- /dev/null +++ b/configs/base/optimizer.yaml @@ -0,0 +1,16 @@ +optimizer: + name: AdamW + args: + lr: 0.001 + weight_decay: 0.0005 + betas: + - 0.937 + - 0.999 +scheduler: + name: SchedulerWrapper + args: + scheduler_name: cosine2 + t_initial: 7 + t_mul: 0.9 + eta_mul: 0.9 + eta_min: 1.0e-06 diff --git a/configs/classification/optuna/pipeline.yaml b/configs/classification/optuna/pipeline.yaml new file mode 100644 index 0000000..e4e1415 --- /dev/null +++ b/configs/classification/optuna/pipeline.yaml @@ -0,0 +1,24 @@ +includes: + - configs/base/globals.yaml + - configs/base/optimizer.yaml + - configs/classification/transform.yaml + - configs/classification/pipeline.yaml + +trainer: + name: SupervisedTrainer + args: + num_iterations: 10 + clip_grad: null + evaluate_interval: 0 + use_fp16: false + +callbacks: [] + +optimizer: + name: AdamW + args: + lr: [0.0001, 0.001] + +optuna: + float: + - optimizer.args.lr diff --git a/configs/classification/pipeline.yaml b/configs/classification/pipeline.yaml index 3b0ea8d..27d86d4 100644 --- a/configs/classification/pipeline.yaml +++ b/configs/classification/pipeline.yaml @@ -1,21 +1,8 @@ -global: - exp_name: null - exist_ok: false - debug: false - cfg_transform: configs/classification/transform.yaml - save_dir: runs - device: cuda:0 - pretrained: null - resume: null -trainer: - name: SupervisedTrainer - args: - num_iterations: 10000 - clip_grad: 1.0 - evaluate_interval: 1 - print_interval: 100 - save_interval: 2000 - use_fp16: true +includes: + - configs/base/globals.yaml + - configs/base/optimizer.yaml + - configs/classification/transform.yaml + callbacks: - name: TorchCheckpointCallbacks args: @@ -25,7 +12,7 @@ callbacks: model: name: BaseTimmModel args: - model_name: convnext_base + model_name: efficientnet_b0 from_pretrained: true loss: name: ClassificationCELoss @@ -37,22 +24,6 @@ metrics: average: weighted - name: ConfusionMatrix - name: ErrorCases -optimizer: - name: AdamW - args: - lr: 0.001 - weight_decay: 0.0005 - betas: - - 0.937 - - 0.999 -scheduler: - name: SchedulerWrapper - args: - scheduler_name: cosine2 - t_initial: 7 - t_mul: 0.9 - eta_mul: 0.9 - eta_min: 1.0e-06 data: dataset: train: diff --git a/configs/classification/test.yaml b/configs/classification/test.yaml index 1188035..6c4d133 100644 --- a/configs/classification/test.yaml +++ b/configs/classification/test.yaml @@ -1,8 +1,9 @@ +includes: + - configs/classification/transform.yaml global: exp_name: null exist_ok: false debug: True - cfg_transform: configs/classification/transform.yaml save_dir: runs device: cuda:0 weights: null diff --git a/configs/classification/transform.yaml b/configs/classification/transform.yaml index 5456d2b..4f898dd 100644 --- a/configs/classification/transform.yaml +++ b/configs/classification/transform.yaml @@ -1,32 +1,33 @@ -train: - name: TVCompose - args: - transforms: - - name: TVResize - args: - size: [256, 256] - - name: TVRandomResizedCrop - args: - size: [224, 224] - - name: TVRandAugment - args: - num_ops: 2 - magnitude: 9 - num_magnitude_bins: 31 - - name: TVToTensor - - name: TVNormalize - args: - mean: [0.485, 0.456, 0.406] - std: [0.229, 0.224, 0.225] -val: - name: TVCompose - args: - transforms: - - name: TVResize - args: - size: [256, 256] - - name: TVToTensor - - name: TVNormalize - args: - mean: [0.485, 0.456, 0.406] - std: [0.229, 0.224, 0.225] +augmentations: + train: + name: TVCompose + args: + transforms: + - name: TVResize + args: + size: [256, 256] + - name: TVRandomResizedCrop + args: + size: [224, 224] + - name: TVRandAugment + args: + num_ops: 2 + magnitude: 9 + num_magnitude_bins: 31 + - name: TVToTensor + - name: TVNormalize + args: + mean: [0.485, 0.456, 0.406] + std: [0.229, 0.224, 0.225] + val: + name: TVCompose + args: + transforms: + - name: TVResize + args: + size: [256, 256] + - name: TVToTensor + - name: TVNormalize + args: + mean: [0.485, 0.456, 0.406] + std: [0.229, 0.224, 0.225] diff --git a/configs/detection/pipeline.yaml b/configs/detection/pipeline.yaml index ce3b19f..d138d53 100644 --- a/configs/detection/pipeline.yaml +++ b/configs/detection/pipeline.yaml @@ -1,21 +1,8 @@ -global: - exp_name: null - exist_ok: false - debug: true - cfg_transform: ./configs/detection/transform.yaml - save_dir: /runs - device: cuda:0 - pretrained: null - resume: null -trainer: - name: SupervisedTrainer - args: - num_iterations: 100000 - clip_grad: 0.1 - evaluate_interval: 1 - print_interval: 20 - save_interval: 1000 - use_fp16: false +includes: + - configs/base/globals.yaml + - configs/base/optimizer.yaml + - configs/detection/transform.yaml + callbacks: - name: TorchCheckpointCallbacks - name: DetectionVisualizerCallbacks @@ -56,17 +43,6 @@ metrics: min_conf: 0.2 min_iou: 0.5 eps: 1e-6 -optimizer: - name: AdamW - args: - lr: 0.00001 - weight_decay: 0.0001 -scheduler: - name: SchedulerWrapper - args: - scheduler_name: multistep - milestones: [20000, 50000] - gamma: 0.1 data: dataset: train: diff --git a/configs/detection/transform.yaml b/configs/detection/transform.yaml index 8db1598..c1b2fca 100644 --- a/configs/detection/transform.yaml +++ b/configs/detection/transform.yaml @@ -1,68 +1,69 @@ -train: - name: DetCompose - args: - transforms: - - name: DetCompose - args: - transforms: - - name: BoxOrder +augmentations: + train: + name: DetCompose + args: + transforms: + - name: DetCompose + args: + transforms: + - name: BoxOrder + args: + order: xywh2cxcywh + - name: BoxNormalize + args: + order: cxcywh + - name: AlbCompose + args: + bbox_params: + name: AlbBboxParams args: - order: xywh2cxcywh - - name: BoxNormalize + format: 'yolo' + min_area: 0 + min_visibility: 0 + label_fields: ['class_labels'] + transforms: + - name: AlbResize + args: + width: 640 + height: 640 + - name: AlbNormalize + args: + mean: [0.485, 0.456, 0.406] + std: [0.229, 0.224, 0.225] + max_pixel_value: 1.0 + p: 1.0 + - name: AlbToTensorV2 + val: + name: DetCompose + args: + transforms: + - name: DetCompose + args: + transforms: + - name: BoxOrder + args: + order: xywh2cxcywh + - name: BoxNormalize + args: + order: cxcywh + - name: AlbCompose + args: + bbox_params: + name: AlbBboxParams args: - order: cxcywh - - name: AlbCompose - args: - bbox_params: - name: AlbBboxParams - args: - format: 'yolo' - min_area: 0 - min_visibility: 0 - label_fields: ['class_labels'] - transforms: - - name: AlbResize - args: - width: 640 - height: 640 - - name: AlbNormalize - args: - mean: [0.485, 0.456, 0.406] - std: [0.229, 0.224, 0.225] - max_pixel_value: 1.0 - p: 1.0 - - name: AlbToTensorV2 -val: - name: DetCompose - args: - transforms: - - name: DetCompose - args: - transforms: - - name: BoxOrder - args: - order: xywh2cxcywh - - name: BoxNormalize - args: - order: cxcywh - - name: AlbCompose - args: - bbox_params: - name: AlbBboxParams - args: - format: 'yolo' - min_area: 0 - min_visibility: 0 - label_fields: ['class_labels'] - transforms: - - name: AlbResize - args: - width: 640 - height: 640 - - name: AlbNormalize - args: - mean: [0.485, 0.456, 0.406] - std: [0.229, 0.224, 0.225] - max_pixel_value: 1.0 - p: 1.0 - - name: AlbToTensorV2 + format: 'yolo' + min_area: 0 + min_visibility: 0 + label_fields: ['class_labels'] + transforms: + - name: AlbResize + args: + width: 640 + height: 640 + - name: AlbNormalize + args: + mean: [0.485, 0.456, 0.406] + std: [0.229, 0.224, 0.225] + max_pixel_value: 1.0 + p: 1.0 + - name: AlbToTensorV2 diff --git a/configs/semantic/pipeline.yaml b/configs/semantic/pipeline.yaml index b68e163..7efff83 100644 --- a/configs/semantic/pipeline.yaml +++ b/configs/semantic/pipeline.yaml @@ -1,21 +1,7 @@ -global: - exp_name: null - exist_ok: false - debug: true - cfg_transform: configs/semantic/transform.yaml - save_dir: runs - device: cuda:0 - pretrained: null - resume: null -trainer: - name: SupervisedTrainer - args: - num_iterations: 10000 - clip_grad: 10.0 - evaluate_interval: 1 - print_interval: 20 - save_interval: 1000 - use_fp16: true +includes: + - configs/base/globals.yaml + - configs/base/optimizer.yaml + - configs/semantic/transform.yaml callbacks: - name: TorchCheckpointCallbacks args: @@ -45,22 +31,6 @@ metrics: args: ignore_index: 0 thresh: 0.5 -optimizer: - name: AdamW - args: - lr: 0.001 - weight_decay: 0.0005 - betas: - - 0.937 - - 0.999 -scheduler: - name: SchedulerWrapper - args: - scheduler_name: cosine2 - t_initial: 7 - t_mul: 0.9 - eta_mul: 0.9 - eta_min: 1.0e-06 data: dataset: train: diff --git a/configs/semantic/test.yaml b/configs/semantic/test.yaml index 51d70dc..b50fd43 100644 --- a/configs/semantic/test.yaml +++ b/configs/semantic/test.yaml @@ -1,8 +1,9 @@ +includes: + - configs/semantic/transform.yaml global: exp_name: null exist_ok: false debug: True - cfg_transform: configs/semantic/transform.yaml save_dir: runs device: cuda:0 weights: null diff --git a/configs/semantic/transform.yaml b/configs/semantic/transform.yaml index 5cc39c4..f83fe4e 100644 --- a/configs/semantic/transform.yaml +++ b/configs/semantic/transform.yaml @@ -1,45 +1,46 @@ -train: - name: AlbCompose - args: - transforms: - - name: AlbResize - args: - width: 640 - height: 640 - - name: AlbHorizontalFlip - args: - - name: AlbGaussianBlur - args: - - name: AlbHueSaturationValue - args: - hue_shift_limit: 0.2 - sat_shift_limit: 0.2 - val_shift_limit: 0.2 - - name: AlbRandomBrightnessContrast - args: - brightness_limit: 0.3 - contrast_limit: 0.3 - # - name: AlbRandomRotate90 - # args: - # - name: AlbShiftScaleRotate - # args: - # border_mode: 0 - # value: 0 - - name: AlbNormalize - args: - mean: [0.485, 0.456, 0.406] - std: [0.229, 0.224, 0.225] - - name: AlbToTensorV2 -val: - name: AlbCompose - args: - transforms: - - name: AlbResize - args: - width: 640 - height: 640 - - name: AlbNormalize - args: - mean: [0.485, 0.456, 0.406] - std: [0.229, 0.224, 0.225] - - name: AlbToTensorV2 +augmentations: + train: + name: AlbCompose + args: + transforms: + - name: AlbResize + args: + width: 640 + height: 640 + - name: AlbHorizontalFlip + args: + - name: AlbGaussianBlur + args: + - name: AlbHueSaturationValue + args: + hue_shift_limit: 0.2 + sat_shift_limit: 0.2 + val_shift_limit: 0.2 + - name: AlbRandomBrightnessContrast + args: + brightness_limit: 0.3 + contrast_limit: 0.3 + # - name: AlbRandomRotate90 + # args: + # - name: AlbShiftScaleRotate + # args: + # border_mode: 0 + # value: 0 + - name: AlbNormalize + args: + mean: [0.485, 0.456, 0.406] + std: [0.229, 0.224, 0.225] + - name: AlbToTensorV2 + val: + name: AlbCompose + args: + transforms: + - name: AlbResize + args: + width: 640 + height: 640 + - name: AlbNormalize + args: + mean: [0.485, 0.456, 0.406] + std: [0.229, 0.224, 0.225] + - name: AlbToTensorV2 diff --git a/configs/tabular/base/data.yaml b/configs/tabular/base/data.yaml new file mode 100644 index 0000000..8e4bfb6 --- /dev/null +++ b/configs/tabular/base/data.yaml @@ -0,0 +1,14 @@ +data: + dataset: + train: + name: TabularCSVDataset + args: + data_path: samples/titanic/train.csv + target_column: Survived + txt_classnames: samples/titanic/classnames.txt + val: + name: TabularCSVDataset + args: + data_path: samples/titanic/val.csv + target_column: Survived + txt_classnames: samples/titanic/classnames.txt diff --git a/configs/tabular/base/globals.yaml b/configs/tabular/base/globals.yaml new file mode 100644 index 0000000..53094c9 --- /dev/null +++ b/configs/tabular/base/globals.yaml @@ -0,0 +1,25 @@ +global: + exp_name: null + exist_ok: false + debug: False + save_dir: runs + pretrained: null + resume: null + device: cpu +trainer: + name: MLTrainer + args: +callbacks: + - name: SKLearnCheckpointCallbacks + - name: ShapValueExplainer + args: + plot_type: bar + check_additivity: False + # - name: PermutationImportance + - name: TensorboardCallbacks +metrics: + - name: SKLAccuracy + - name: SKLBalancedAccuracyMetric + - name: SKLF1ScoreMetric + - name: SKLPrecisionRecall + - name: SKLEmbeddingProjection diff --git a/configs/tabular/base/transform.yaml b/configs/tabular/base/transform.yaml new file mode 100644 index 0000000..88f09dd --- /dev/null +++ b/configs/tabular/base/transform.yaml @@ -0,0 +1,38 @@ +augmentations: + train: + name: PreprocessCompose + args: + preproc_list: + - name: FillNaN + args: + column_names: ['Embarked', 'Cabin'] + fill_with: None + - name: FillNaN + args: + column_names: ['Age'] + fill_with: 0 + - name: LabelEncode + - name: Standardize + args: + method: minmax + column_names: ["*"] + exclude_columns: ["Survived"] + + val: + name: PreprocessCompose + args: + preproc_list: + - name: FillNaN + args: + column_names: ['Embarked', 'Cabin'] + fill_with: None + - name: FillNaN + args: + column_names: ['Age'] + fill_with: 0 + - name: LabelEncode + - name: Standardize + args: + method: minmax + column_names: ["*"] + exclude_columns: ["Survived"] diff --git a/configs/tabular/catboost.yaml b/configs/tabular/catboost.yaml index a404d84..5ec509f 100644 --- a/configs/tabular/catboost.yaml +++ b/configs/tabular/catboost.yaml @@ -1,28 +1,7 @@ -global: - exp_name: null - exist_ok: false - debug: False - save_dir: runs - pretrained: null - resume: null - cfg_transform: configs/tabular/transform.yaml - device: cpu -trainer: - name: MLTrainer - args: -callbacks: - - name: SKLearnCheckpointCallbacks - - name: ShapValueExplainer - args: - plot_type: bar - - name: PermutationImportance - - name: TensorboardCallbacks -metrics: - - name: SKLAccuracy - - name: SKLBalancedAccuracyMetric - - name: SKLF1ScoreMetric - - name: SKLPrecisionRecall - - name: SKLEmbeddingProjection +includes: + - configs/tabular/base/globals.yaml + - configs/tabular/base/data.yaml + - configs/tabular/base/transform.yaml model: name: GBClassifiers args: @@ -36,17 +15,3 @@ model: od_type: "Iter" metric_period: 50 od_wait: 20 -data: - dataset: - train: - name: TabularCSVDataset - args: - data_path: samples/titanic/train.csv - target_column: Survived - txt_classnames: samples/titanic/classnames.txt - val: - name: TabularCSVDataset - args: - data_path: samples/titanic/val.csv - target_column: Survived - txt_classnames: samples/titanic/classnames.txt diff --git a/configs/tabular/lightgbm.yaml b/configs/tabular/lightgbm.yaml index 2399c08..fc22d1f 100644 --- a/configs/tabular/lightgbm.yaml +++ b/configs/tabular/lightgbm.yaml @@ -1,51 +1,18 @@ -global: - exp_name: null - exist_ok: false - debug: False - save_dir: runs - pretrained: null - resume: null - cfg_transform: configs/tabular/transform.yaml - device: cpu -trainer: - name: MLTrainer - args: -callbacks: - - name: SKLearnCheckpointCallbacks - - name: ShapValueExplainer - args: - plot_type: bar - - name: LIMEExplainer - - name: TensorboardCallbacks -metrics: - - name: SKLAccuracy - - name: SKLBalancedAccuracyMetric - - name: SKLF1ScoreMetric - - name: SKLPrecisionRecall - - name: SKLEmbeddingProjection +includes: + - configs/tabular/base/globals.yaml + - configs/tabular/base/data.yaml + - configs/tabular/base/transform.yaml model: name: GBClassifiers args: model_name: lightgbm model_config: - n_estimators: 10 #The number of sequential trees to be modeled - max_depth: 7 # The maximum depth of a tree.higher depth will allow model to learn relations very specific to a particular sample. Should be tuned - learning_rate: 0.1 # impact of each tree on the final outcome - reg_alpha: 0 #This will anyways be tuned later. - reg_lambda: 1 #This will anyways be tuned later. - early_stopping_rounds: 30 - objective: "multiclass" -data: - dataset: - train: - name: TabularCSVDataset - args: - data_path: samples/titanic/train.csv - target_column: Survived - txt_classnames: samples/titanic/classnames.txt - val: - name: TabularCSVDataset - args: - data_path: samples/titanic/val.csv - target_column: Survived - txt_classnames: samples/titanic/classnames.txt + objective: multiclass + lambda_l1: 0.001 + lambda_l2: 0.001 + num_leaves: 128 + feature_fraction: 0.1 + bagging_fraction: 0.1 + bagging_freq: 7 + min_child_samples: 50 + learning_rate: 0.01 diff --git a/configs/tabular/optuna/catboost_tune.yaml b/configs/tabular/optuna/catboost_tune.yaml new file mode 100644 index 0000000..186767a --- /dev/null +++ b/configs/tabular/optuna/catboost_tune.yaml @@ -0,0 +1,32 @@ +includes: + - configs/tabular/base/globals.yaml + - configs/tabular/base/data.yaml + - configs/tabular/base/transform.yaml + - configs/tabular/optuna/optuna.yaml +model: + name: GBClassifiers + args: + model_name: catboost + model_config: + iterations: [100, 1000] + learning_rate: [0.001, 0.1] + depth: [4, 12] + loss_function: MultiClass + bagging_temperature: [0.0, 10.0] + od_type: ["IncToDec", "Iter"] + metric_period: 50 + od_wait: [10, 50] + l2_leaf_reg: [0.00001, 100.0] + random_strength: [0.00001, 100.0] +optuna: + int: + - model.args.model_config.iterations + - model.args.model_config.depth + - model.args.model_config.od_wait + float: + - model.args.model_config.learning_rate + - model.args.model_config.l2_leaf_reg + - model.args.model_config.random_strength + - model.args.model_config.bagging_temperature + categorical: + - model.args.model_config.od_type diff --git a/configs/tabular/optuna/lightgbm_tune.yaml b/configs/tabular/optuna/lightgbm_tune.yaml new file mode 100644 index 0000000..5ec5c32 --- /dev/null +++ b/configs/tabular/optuna/lightgbm_tune.yaml @@ -0,0 +1,30 @@ +includes: + - configs/tabular/base/globals.yaml + - configs/tabular/base/data.yaml + - configs/tabular/base/transform.yaml + - configs/tabular/optuna/optuna.yaml +model: + name: GBClassifiers + args: + model_name: lightgbm + model_config: + objective: multiclass + lambda_l1: [0.000001, 10.0] + lambda_l2: [0.000001, 10.0] + num_leaves: [2, 512] + feature_fraction: [0.1, 1.0] + bagging_fraction: [0.1, 1.0] + bagging_freq: [0, 15] + min_child_samples: [1, 100] + learning_rate: [0.00001, 0.1] +optuna: + int: + - model.args.model_config.num_leaves + - model.args.model_config.bagging_freq + - model.args.model_config.min_child_samples + float: + - model.args.model_config.learning_rate + - model.args.model_config.lambda_l1 + - model.args.model_config.lambda_l2 + - model.args.model_config.feature_fraction + - model.args.model_config.bagging_fraction diff --git a/configs/tabular/optuna/optuna.yaml b/configs/tabular/optuna/optuna.yaml new file mode 100644 index 0000000..7ec13ce --- /dev/null +++ b/configs/tabular/optuna/optuna.yaml @@ -0,0 +1,3 @@ +callbacks: [] +metrics: + - name: SKLBalancedAccuracyMetric diff --git a/configs/tabular/optuna/tune.py b/configs/tabular/optuna/tune.py new file mode 100644 index 0000000..6b94435 --- /dev/null +++ b/configs/tabular/optuna/tune.py @@ -0,0 +1,16 @@ +from theseus.base.utilities.optuna_tuner import OptunaWrapper +from theseus.opt import Config +from theseus.tabular.classification.pipeline import TabularPipeline + +if __name__ == "__main__": + config = Config("configs/tabular/optuna.yaml") + tuner = OptunaWrapper() + + tuner.tune( + config=config, + pipeline_class=TabularPipeline, + best_key="bl_acc", + n_trials=5, + direction="maximize", + save_dir="runs/optuna/", + ) diff --git a/configs/tabular/optuna/xgboost_tune.yaml b/configs/tabular/optuna/xgboost_tune.yaml new file mode 100644 index 0000000..063978f --- /dev/null +++ b/configs/tabular/optuna/xgboost_tune.yaml @@ -0,0 +1,28 @@ +includes: + - configs/tabular/base/globals.yaml + - configs/tabular/base/data.yaml + - configs/tabular/base/transform.yaml + - configs/tabular/optuna/optuna.yaml +model: + name: GBClassifiers + args: + model_name: xgboost + model_config: + n_estimators: [100, 500] #The number of sequential trees to be modeled + max_depth: [1, 9] # The maximum depth of a tree.higher depth will allow model to learn relations very specific to a particular sample. Should be tuned + learning_rate: [0.01, 1.0] # impact of each tree on the final outcome + gamma: [0.001, 1.0] #This will anyways be tuned later. + reg_alpha: [0.001, 1.0] #This will anyways be tuned later. + reg_lambda: [0.001, 1.0] #This will anyways be tuned later. + early_stopping_rounds: 30 + eval_metric: ['auc'] + objective: "multi:softprob" +optuna: + int: + - model.args.model_config.n_estimators + - model.args.model_config.max_depth + float: + - model.args.model_config.learning_rate + - model.args.model_config.gamma + - model.args.model_config.reg_alpha + - model.args.model_config.reg_lambda diff --git a/configs/tabular/transform.yaml b/configs/tabular/transform.yaml deleted file mode 100644 index 1dd9dc2..0000000 --- a/configs/tabular/transform.yaml +++ /dev/null @@ -1,37 +0,0 @@ -train: - name: PreprocessCompose - args: - preproc_list: - - name: FillNaN - args: - column_names: ['Embarked', 'Cabin'] - fill_with: None - - name: FillNaN - args: - column_names: ['Age'] - fill_with: 0 - - name: LabelEncode - - name: Standardize - args: - method: minmax - column_names: ["*"] - exclude_columns: ["Survived"] - -val: - name: PreprocessCompose - args: - preproc_list: - - name: FillNaN - args: - column_names: ['Embarked', 'Cabin'] - fill_with: None - - name: FillNaN - args: - column_names: ['Age'] - fill_with: 0 - - name: LabelEncode - - name: Standardize - args: - method: minmax - column_names: ["*"] - exclude_columns: ["Survived"] diff --git a/configs/tabular/xgboost.yaml b/configs/tabular/xgboost.yaml index 2fa09e3..b0632b9 100644 --- a/configs/tabular/xgboost.yaml +++ b/configs/tabular/xgboost.yaml @@ -1,29 +1,7 @@ -global: - exp_name: null - exist_ok: false - debug: False - save_dir: runs - pretrained: null - resume: null - cfg_transform: configs/tabular/transform.yaml - device: cpu -trainer: - name: MLTrainer - args: -callbacks: - - name: SKLearnCheckpointCallbacks - - name: ShapValueExplainer - args: - plot_type: bar - check_additivity: False - - name: LIMEExplainer - - name: TensorboardCallbacks -metrics: - - name: SKLAccuracy - - name: SKLBalancedAccuracyMetric - - name: SKLF1ScoreMetric - - name: SKLPrecisionRecall - - name: SKLEmbeddingProjection +includes: + - configs/tabular/base/globals.yaml + - configs/tabular/base/data.yaml + - configs/tabular/base/transform.yaml model: name: GBClassifiers args: @@ -38,17 +16,3 @@ model: early_stopping_rounds: 30 eval_metric: ['auc'] objective: "multi:softprob" -data: - dataset: - train: - name: TabularCSVDataset - args: - data_path: samples/titanic/train.csv - target_column: Survived - txt_classnames: samples/titanic/classnames.txt - val: - name: TabularCSVDataset - args: - data_path: samples/titanic/val.csv - target_column: Survived - txt_classnames: samples/titanic/classnames.txt diff --git a/pyproject.toml b/pyproject.toml index 7ccda3c..0679c95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,61 +30,72 @@ classifiers = [ "Programming Language :: Python :: 3", ] dependencies = [ - "pre-commit>=2.21.0", - "seaborn==0.12.0", - "plotly==5.10.0", - "matplotlib==3.4.3", - "webcolors==1.12", - "wandb==0.13.3", - "tensorboard==2.10.0", - "pyyaml==6.0", - "tqdm==4.64.1", - "gdown==4.5.1", - "tabulate==0.8.10", - "loguru==0.6.0", - "pytest-order==1.0.1", + "seaborn>=0.12.0", + "plotly>=5.10.0", + "matplotlib>=3.4.3", + "webcolors>=1.12", + "wandb>=0.13.3", + "tensorboard>=2.10.0", + "pyyaml>=6.0", + "tqdm>=4.64.1", + "gdown>=4.5.1", + "tabulate>=0.8.10", + "loguru>=0.6.0", + "kaleido>=0.2.1", + "optuna>=3.0.5", + "deepdiff>=6.2.3" ] [project.optional-dependencies] +dev=[ + "pytest>=7.2.0", + "pytest-order>=1.0.1", + "pre-commit>=2.21.0", +] cv = [ - "albumentations==1.1.0", - "omegaconf==2.2.3" + "albumentations>=1.1.0", + "omegaconf>=2.2.3" ] cv_classification = [ "timm", - "grad-cam==1.4.5" + "grad-cam>=1.4.5" ] cv_semantic = [ - "segmentation-models-pytorch==0.3.0" + "segmentation-models-pytorch>=0.3.0" ] cv_detection = [ - "ensemble_boxes==1.0.9", - "pycocotools==2.0.6", + "ensemble_boxes>=1.0.9", + "pycocotools>=2.0.6", ] nlp = [ - "pyvi==0.1.1", - "py_vncorenlp==0.1.3", - "spacy==3.4.2", - "transformers==4.25.1", - "nltk==3.7" + "pyvi>=0.1.1", + "py_vncorenlp>=0.1.3", + "spacy>=3.4.2", + "transformers>=4.25.1", + "nltk>=3.7", + "captum>=0.4.1" ] nlp_retrieval = [ - "sentence_transformers==2.2.2", - "rank_bm25==0.2.2", - "elasticsearch==7.17.7" + "sentence_transformers>=2.2.2", + "rank_bm25>=0.2.2", + "elasticsearch>=7.17.7" ] tabular = [ - "pandas==1.5.1", - "numpy==1.23.4", - "scikit-learn==1.1.3", - "scipy==1.9.3" + "pandas>=1.5.1", + "pandarallel>=1.6.3", + "numpy>=1.23.4", + "scikit-learn>=1.0.0", + "scipy>=1.7.0", + "optuna>=3.0.5", + "psycopg2-binary>=2.9.5", + "gunicorn>=20.1.0" ] tabular_classification = [ - "lightgbm==3.3.3", - "xgboost==1.7.1", - "catboost==1.1.1", - "shap==0.41.0", - "lime==0.2.0.1" + "lightgbm>=3.3.3", + "xgboost>=1.7.1", + "catboost", + "shap>=0.41.0", + "lime>=0.2.0.1" ] all = [ "theseus[cv,cv_classification,cv_semantic,cv_detection,nlp,nlp_retrieval,tabular,tabular_classification]", diff --git a/samples/.gitignore b/samples/.gitignore new file mode 100644 index 0000000..a9b9d8c --- /dev/null +++ b/samples/.gitignore @@ -0,0 +1,3 @@ +/carvana-masking +/dog-vs-cats +/titanic diff --git a/samples/carvana-masking.dvc b/samples/carvana-masking.dvc new file mode 100644 index 0000000..a0bef50 --- /dev/null +++ b/samples/carvana-masking.dvc @@ -0,0 +1,5 @@ +outs: +- md5: 241466946cb5f3265989bfad43fd1f99.dir + size: 1375275 + nfiles: 16 + path: carvana-masking diff --git a/samples/carvana-masking/classnames.txt b/samples/carvana-masking/classnames.txt deleted file mode 100644 index 97ad33d..0000000 --- a/samples/carvana-masking/classnames.txt +++ /dev/null @@ -1,2 +0,0 @@ -background -car diff --git a/samples/carvana-masking/images/0cdf5b5d0ce1_01.jpg b/samples/carvana-masking/images/0cdf5b5d0ce1_01.jpg deleted file mode 100644 index 9334618..0000000 Binary files a/samples/carvana-masking/images/0cdf5b5d0ce1_01.jpg and /dev/null differ diff --git a/samples/carvana-masking/images/0cdf5b5d0ce1_02.jpg b/samples/carvana-masking/images/0cdf5b5d0ce1_02.jpg deleted file mode 100644 index 5da1b07..0000000 Binary files a/samples/carvana-masking/images/0cdf5b5d0ce1_02.jpg and /dev/null differ diff --git a/samples/carvana-masking/images/0cdf5b5d0ce1_03.jpg b/samples/carvana-masking/images/0cdf5b5d0ce1_03.jpg deleted file mode 100644 index 78fca24..0000000 Binary files a/samples/carvana-masking/images/0cdf5b5d0ce1_03.jpg and /dev/null differ diff --git a/samples/carvana-masking/images/0cdf5b5d0ce1_04.jpg b/samples/carvana-masking/images/0cdf5b5d0ce1_04.jpg deleted file mode 100644 index 206e3ce..0000000 Binary files a/samples/carvana-masking/images/0cdf5b5d0ce1_04.jpg and /dev/null differ diff --git a/samples/carvana-masking/images/0cdf5b5d0ce1_05.jpg b/samples/carvana-masking/images/0cdf5b5d0ce1_05.jpg deleted file mode 100644 index 248976c..0000000 Binary files a/samples/carvana-masking/images/0cdf5b5d0ce1_05.jpg and /dev/null differ diff --git a/samples/carvana-masking/masks/0cdf5b5d0ce1_01_mask.gif b/samples/carvana-masking/masks/0cdf5b5d0ce1_01_mask.gif deleted file mode 100644 index daf5274..0000000 Binary files a/samples/carvana-masking/masks/0cdf5b5d0ce1_01_mask.gif and /dev/null differ diff --git a/samples/carvana-masking/masks/0cdf5b5d0ce1_02_mask.gif b/samples/carvana-masking/masks/0cdf5b5d0ce1_02_mask.gif deleted file mode 100644 index dce9bb0..0000000 Binary files a/samples/carvana-masking/masks/0cdf5b5d0ce1_02_mask.gif and /dev/null differ diff --git a/samples/carvana-masking/masks/0cdf5b5d0ce1_03_mask.gif b/samples/carvana-masking/masks/0cdf5b5d0ce1_03_mask.gif deleted file mode 100644 index 261dbae..0000000 Binary files a/samples/carvana-masking/masks/0cdf5b5d0ce1_03_mask.gif and /dev/null differ diff --git a/samples/carvana-masking/masks/0cdf5b5d0ce1_04_mask.gif b/samples/carvana-masking/masks/0cdf5b5d0ce1_04_mask.gif deleted file mode 100644 index ea75b82..0000000 Binary files a/samples/carvana-masking/masks/0cdf5b5d0ce1_04_mask.gif and /dev/null differ diff --git a/samples/carvana-masking/masks/0cdf5b5d0ce1_05_mask.gif b/samples/carvana-masking/masks/0cdf5b5d0ce1_05_mask.gif deleted file mode 100644 index bffdc78..0000000 Binary files a/samples/carvana-masking/masks/0cdf5b5d0ce1_05_mask.gif and /dev/null differ diff --git a/samples/carvana-masking/test_images/fc9399fafb30_01.jpg b/samples/carvana-masking/test_images/fc9399fafb30_01.jpg deleted file mode 100644 index 9a6a69b..0000000 Binary files a/samples/carvana-masking/test_images/fc9399fafb30_01.jpg and /dev/null differ diff --git a/samples/carvana-masking/test_images/fcac2903b622_06.jpg b/samples/carvana-masking/test_images/fcac2903b622_06.jpg deleted file mode 100644 index 6f062ce..0000000 Binary files a/samples/carvana-masking/test_images/fcac2903b622_06.jpg and /dev/null differ diff --git a/samples/carvana-masking/test_images/fcac2903b622_11.jpg b/samples/carvana-masking/test_images/fcac2903b622_11.jpg deleted file mode 100644 index 522ff88..0000000 Binary files a/samples/carvana-masking/test_images/fcac2903b622_11.jpg and /dev/null differ diff --git a/samples/carvana-masking/train.csv b/samples/carvana-masking/train.csv deleted file mode 100644 index 8b0e168..0000000 --- a/samples/carvana-masking/train.csv +++ /dev/null @@ -1,3 +0,0 @@ -filename,label -0cdf5b5d0ce1_01.jpg,0cdf5b5d0ce1_01_mask.gif -0cdf5b5d0ce1_02.jpg,0cdf5b5d0ce1_02_mask.gif diff --git a/samples/carvana-masking/val.csv b/samples/carvana-masking/val.csv deleted file mode 100644 index ac073cb..0000000 --- a/samples/carvana-masking/val.csv +++ /dev/null @@ -1,3 +0,0 @@ -filename,label -0cdf5b5d0ce1_03.jpg,0cdf5b5d0ce1_03_mask.gif -0cdf5b5d0ce1_04.jpg,0cdf5b5d0ce1_04_mask.gif diff --git a/samples/dog-vs-cats.dvc b/samples/dog-vs-cats.dvc new file mode 100644 index 0000000..5345610 --- /dev/null +++ b/samples/dog-vs-cats.dvc @@ -0,0 +1,5 @@ +outs: +- md5: 6df4a8f8d7de676ba18ece17214443b7.dir + size: 504034 + nfiles: 20 + path: dog-vs-cats diff --git a/samples/dog-vs-cats/classnames.txt b/samples/dog-vs-cats/classnames.txt deleted file mode 100644 index e94ad95..0000000 --- a/samples/dog-vs-cats/classnames.txt +++ /dev/null @@ -1,2 +0,0 @@ -dog -cat diff --git a/samples/dog-vs-cats/test/cat.11392.jpg b/samples/dog-vs-cats/test/cat.11392.jpg deleted file mode 100644 index 518e377..0000000 Binary files a/samples/dog-vs-cats/test/cat.11392.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/test/cat.11393.jpg b/samples/dog-vs-cats/test/cat.11393.jpg deleted file mode 100644 index fa944b9..0000000 Binary files a/samples/dog-vs-cats/test/cat.11393.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/test/cat.11394.jpg b/samples/dog-vs-cats/test/cat.11394.jpg deleted file mode 100644 index 1b8dfb1..0000000 Binary files a/samples/dog-vs-cats/test/cat.11394.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/test/cat.11396.jpg b/samples/dog-vs-cats/test/cat.11396.jpg deleted file mode 100644 index 7b29d80..0000000 Binary files a/samples/dog-vs-cats/test/cat.11396.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/test/cat.11397.jpg b/samples/dog-vs-cats/test/cat.11397.jpg deleted file mode 100644 index f48cfe4..0000000 Binary files a/samples/dog-vs-cats/test/cat.11397.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/train/cat/cat.9962.jpg b/samples/dog-vs-cats/train/cat/cat.9962.jpg deleted file mode 100644 index 87e091f..0000000 Binary files a/samples/dog-vs-cats/train/cat/cat.9962.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/train/cat/cat.9963.jpg b/samples/dog-vs-cats/train/cat/cat.9963.jpg deleted file mode 100644 index 371afbc..0000000 Binary files a/samples/dog-vs-cats/train/cat/cat.9963.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/train/cat/cat.997.jpg b/samples/dog-vs-cats/train/cat/cat.997.jpg deleted file mode 100644 index 59ad614..0000000 Binary files a/samples/dog-vs-cats/train/cat/cat.997.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/train/cat/cat.998.jpg b/samples/dog-vs-cats/train/cat/cat.998.jpg deleted file mode 100644 index f8ab314..0000000 Binary files a/samples/dog-vs-cats/train/cat/cat.998.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/train/cat/cat.999.jpg b/samples/dog-vs-cats/train/cat/cat.999.jpg deleted file mode 100644 index 306272a..0000000 Binary files a/samples/dog-vs-cats/train/cat/cat.999.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/train/dog/dog.9975.jpg b/samples/dog-vs-cats/train/dog/dog.9975.jpg deleted file mode 100644 index 6b34ea4..0000000 Binary files a/samples/dog-vs-cats/train/dog/dog.9975.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/train/dog/dog.9976.jpg b/samples/dog-vs-cats/train/dog/dog.9976.jpg deleted file mode 100644 index 2ec1cd3..0000000 Binary files a/samples/dog-vs-cats/train/dog/dog.9976.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/train/dog/dog.9977.jpg b/samples/dog-vs-cats/train/dog/dog.9977.jpg deleted file mode 100644 index b2397b7..0000000 Binary files a/samples/dog-vs-cats/train/dog/dog.9977.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/train/dog/dog.998.jpg b/samples/dog-vs-cats/train/dog/dog.998.jpg deleted file mode 100644 index d70d269..0000000 Binary files a/samples/dog-vs-cats/train/dog/dog.998.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/train/dog/dog.999.jpg b/samples/dog-vs-cats/train/dog/dog.999.jpg deleted file mode 100644 index a4b4c2c..0000000 Binary files a/samples/dog-vs-cats/train/dog/dog.999.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/val/cat/cat.9920.jpg b/samples/dog-vs-cats/val/cat/cat.9920.jpg deleted file mode 100644 index 703986e..0000000 Binary files a/samples/dog-vs-cats/val/cat/cat.9920.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/val/cat/cat.9925.jpg b/samples/dog-vs-cats/val/cat/cat.9925.jpg deleted file mode 100644 index aa3c377..0000000 Binary files a/samples/dog-vs-cats/val/cat/cat.9925.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/val/dog/dog.960.jpg b/samples/dog-vs-cats/val/dog/dog.960.jpg deleted file mode 100644 index 7edbfcf..0000000 Binary files a/samples/dog-vs-cats/val/dog/dog.960.jpg and /dev/null differ diff --git a/samples/dog-vs-cats/val/dog/dog.961.jpg b/samples/dog-vs-cats/val/dog/dog.961.jpg deleted file mode 100644 index 94b35d7..0000000 Binary files a/samples/dog-vs-cats/val/dog/dog.961.jpg and /dev/null differ diff --git a/samples/titanic.dvc b/samples/titanic.dvc new file mode 100644 index 0000000..37c815a --- /dev/null +++ b/samples/titanic.dvc @@ -0,0 +1,5 @@ +outs: +- md5: 96131eb91f38351636782a9b2fad0b78.dir + size: 89732 + nfiles: 4 + path: titanic diff --git a/samples/titanic/classnames.txt b/samples/titanic/classnames.txt deleted file mode 100644 index 117bf2c..0000000 --- a/samples/titanic/classnames.txt +++ /dev/null @@ -1,2 +0,0 @@ -Survived -Not Survived diff --git a/samples/titanic/test.csv b/samples/titanic/test.csv deleted file mode 100644 index f705412..0000000 --- a/samples/titanic/test.csv +++ /dev/null @@ -1,419 +0,0 @@ -PassengerId,Pclass,Name,Sex,Age,SibSp,Parch,Ticket,Fare,Cabin,Embarked -892,3,"Kelly, Mr. James",male,34.5,0,0,330911,7.8292,,Q -893,3,"Wilkes, Mrs. James (Ellen Needs)",female,47,1,0,363272,7,,S -894,2,"Myles, Mr. Thomas Francis",male,62,0,0,240276,9.6875,,Q -895,3,"Wirz, Mr. Albert",male,27,0,0,315154,8.6625,,S -896,3,"Hirvonen, Mrs. Alexander (Helga E Lindqvist)",female,22,1,1,3101298,12.2875,,S -897,3,"Svensson, Mr. Johan Cervin",male,14,0,0,7538,9.225,,S -898,3,"Connolly, Miss. Kate",female,30,0,0,330972,7.6292,,Q -899,2,"Caldwell, Mr. Albert Francis",male,26,1,1,248738,29,,S -900,3,"Abrahim, Mrs. Joseph (Sophie Halaut Easu)",female,18,0,0,2657,7.2292,,C -901,3,"Davies, Mr. John Samuel",male,21,2,0,A/4 48871,24.15,,S -902,3,"Ilieff, Mr. Ylio",male,,0,0,349220,7.8958,,S -903,1,"Jones, Mr. Charles Cresson",male,46,0,0,694,26,,S -904,1,"Snyder, Mrs. John Pillsbury (Nelle Stevenson)",female,23,1,0,21228,82.2667,B45,S -905,2,"Howard, Mr. Benjamin",male,63,1,0,24065,26,,S -906,1,"Chaffee, Mrs. Herbert Fuller (Carrie Constance Toogood)",female,47,1,0,W.E.P. 5734,61.175,E31,S -907,2,"del Carlo, Mrs. Sebastiano (Argenia Genovesi)",female,24,1,0,SC/PARIS 2167,27.7208,,C -908,2,"Keane, Mr. Daniel",male,35,0,0,233734,12.35,,Q -909,3,"Assaf, Mr. Gerios",male,21,0,0,2692,7.225,,C -910,3,"Ilmakangas, Miss. Ida Livija",female,27,1,0,STON/O2. 3101270,7.925,,S -911,3,"Assaf Khalil, Mrs. Mariana (Miriam"")""",female,45,0,0,2696,7.225,,C -912,1,"Rothschild, Mr. Martin",male,55,1,0,PC 17603,59.4,,C -913,3,"Olsen, Master. Artur Karl",male,9,0,1,C 17368,3.1708,,S -914,1,"Flegenheim, Mrs. Alfred (Antoinette)",female,,0,0,PC 17598,31.6833,,S -915,1,"Williams, Mr. Richard Norris II",male,21,0,1,PC 17597,61.3792,,C -916,1,"Ryerson, Mrs. Arthur Larned (Emily Maria Borie)",female,48,1,3,PC 17608,262.375,B57 B59 B63 B66,C -917,3,"Robins, Mr. Alexander A",male,50,1,0,A/5. 3337,14.5,,S -918,1,"Ostby, Miss. Helene Ragnhild",female,22,0,1,113509,61.9792,B36,C -919,3,"Daher, Mr. Shedid",male,22.5,0,0,2698,7.225,,C -920,1,"Brady, Mr. John Bertram",male,41,0,0,113054,30.5,A21,S -921,3,"Samaan, Mr. Elias",male,,2,0,2662,21.6792,,C -922,2,"Louch, Mr. Charles Alexander",male,50,1,0,SC/AH 3085,26,,S -923,2,"Jefferys, Mr. Clifford Thomas",male,24,2,0,C.A. 31029,31.5,,S -924,3,"Dean, Mrs. Bertram (Eva Georgetta Light)",female,33,1,2,C.A. 2315,20.575,,S -925,3,"Johnston, Mrs. Andrew G (Elizabeth Lily"" Watson)""",female,,1,2,W./C. 6607,23.45,,S -926,1,"Mock, Mr. Philipp Edmund",male,30,1,0,13236,57.75,C78,C -927,3,"Katavelas, Mr. Vassilios (Catavelas Vassilios"")""",male,18.5,0,0,2682,7.2292,,C -928,3,"Roth, Miss. Sarah A",female,,0,0,342712,8.05,,S -929,3,"Cacic, Miss. Manda",female,21,0,0,315087,8.6625,,S -930,3,"Sap, Mr. Julius",male,25,0,0,345768,9.5,,S -931,3,"Hee, Mr. Ling",male,,0,0,1601,56.4958,,S -932,3,"Karun, Mr. Franz",male,39,0,1,349256,13.4167,,C -933,1,"Franklin, Mr. Thomas Parham",male,,0,0,113778,26.55,D34,S -934,3,"Goldsmith, Mr. Nathan",male,41,0,0,SOTON/O.Q. 3101263,7.85,,S -935,2,"Corbett, Mrs. Walter H (Irene Colvin)",female,30,0,0,237249,13,,S -936,1,"Kimball, Mrs. Edwin Nelson Jr (Gertrude Parsons)",female,45,1,0,11753,52.5542,D19,S -937,3,"Peltomaki, Mr. Nikolai Johannes",male,25,0,0,STON/O 2. 3101291,7.925,,S -938,1,"Chevre, Mr. Paul Romaine",male,45,0,0,PC 17594,29.7,A9,C -939,3,"Shaughnessy, Mr. Patrick",male,,0,0,370374,7.75,,Q -940,1,"Bucknell, Mrs. William Robert (Emma Eliza Ward)",female,60,0,0,11813,76.2917,D15,C -941,3,"Coutts, Mrs. William (Winnie Minnie"" Treanor)""",female,36,0,2,C.A. 37671,15.9,,S -942,1,"Smith, Mr. Lucien Philip",male,24,1,0,13695,60,C31,S -943,2,"Pulbaum, Mr. Franz",male,27,0,0,SC/PARIS 2168,15.0333,,C -944,2,"Hocking, Miss. Ellen Nellie""""",female,20,2,1,29105,23,,S -945,1,"Fortune, Miss. Ethel Flora",female,28,3,2,19950,263,C23 C25 C27,S -946,2,"Mangiavacchi, Mr. Serafino Emilio",male,,0,0,SC/A.3 2861,15.5792,,C -947,3,"Rice, Master. Albert",male,10,4,1,382652,29.125,,Q -948,3,"Cor, Mr. Bartol",male,35,0,0,349230,7.8958,,S -949,3,"Abelseth, Mr. Olaus Jorgensen",male,25,0,0,348122,7.65,F G63,S -950,3,"Davison, Mr. Thomas Henry",male,,1,0,386525,16.1,,S -951,1,"Chaudanson, Miss. Victorine",female,36,0,0,PC 17608,262.375,B61,C -952,3,"Dika, Mr. Mirko",male,17,0,0,349232,7.8958,,S -953,2,"McCrae, Mr. Arthur Gordon",male,32,0,0,237216,13.5,,S -954,3,"Bjorklund, Mr. Ernst Herbert",male,18,0,0,347090,7.75,,S -955,3,"Bradley, Miss. Bridget Delia",female,22,0,0,334914,7.725,,Q -956,1,"Ryerson, Master. John Borie",male,13,2,2,PC 17608,262.375,B57 B59 B63 B66,C -957,2,"Corey, Mrs. Percy C (Mary Phyllis Elizabeth Miller)",female,,0,0,F.C.C. 13534,21,,S -958,3,"Burns, Miss. Mary Delia",female,18,0,0,330963,7.8792,,Q -959,1,"Moore, Mr. Clarence Bloomfield",male,47,0,0,113796,42.4,,S -960,1,"Tucker, Mr. Gilbert Milligan Jr",male,31,0,0,2543,28.5375,C53,C -961,1,"Fortune, Mrs. Mark (Mary McDougald)",female,60,1,4,19950,263,C23 C25 C27,S -962,3,"Mulvihill, Miss. Bertha E",female,24,0,0,382653,7.75,,Q -963,3,"Minkoff, Mr. Lazar",male,21,0,0,349211,7.8958,,S -964,3,"Nieminen, Miss. Manta Josefina",female,29,0,0,3101297,7.925,,S -965,1,"Ovies y Rodriguez, Mr. Servando",male,28.5,0,0,PC 17562,27.7208,D43,C -966,1,"Geiger, Miss. Amalie",female,35,0,0,113503,211.5,C130,C -967,1,"Keeping, Mr. Edwin",male,32.5,0,0,113503,211.5,C132,C -968,3,"Miles, Mr. Frank",male,,0,0,359306,8.05,,S -969,1,"Cornell, Mrs. Robert Clifford (Malvina Helen Lamson)",female,55,2,0,11770,25.7,C101,S -970,2,"Aldworth, Mr. Charles Augustus",male,30,0,0,248744,13,,S -971,3,"Doyle, Miss. Elizabeth",female,24,0,0,368702,7.75,,Q -972,3,"Boulos, Master. Akar",male,6,1,1,2678,15.2458,,C -973,1,"Straus, Mr. Isidor",male,67,1,0,PC 17483,221.7792,C55 C57,S -974,1,"Case, Mr. Howard Brown",male,49,0,0,19924,26,,S -975,3,"Demetri, Mr. Marinko",male,,0,0,349238,7.8958,,S -976,2,"Lamb, Mr. John Joseph",male,,0,0,240261,10.7083,,Q -977,3,"Khalil, Mr. Betros",male,,1,0,2660,14.4542,,C -978,3,"Barry, Miss. Julia",female,27,0,0,330844,7.8792,,Q -979,3,"Badman, Miss. Emily Louisa",female,18,0,0,A/4 31416,8.05,,S -980,3,"O'Donoghue, Ms. Bridget",female,,0,0,364856,7.75,,Q -981,2,"Wells, Master. Ralph Lester",male,2,1,1,29103,23,,S -982,3,"Dyker, Mrs. Adolf Fredrik (Anna Elisabeth Judith Andersson)",female,22,1,0,347072,13.9,,S -983,3,"Pedersen, Mr. Olaf",male,,0,0,345498,7.775,,S -984,1,"Davidson, Mrs. Thornton (Orian Hays)",female,27,1,2,F.C. 12750,52,B71,S -985,3,"Guest, Mr. Robert",male,,0,0,376563,8.05,,S -986,1,"Birnbaum, Mr. Jakob",male,25,0,0,13905,26,,C -987,3,"Tenglin, Mr. Gunnar Isidor",male,25,0,0,350033,7.7958,,S -988,1,"Cavendish, Mrs. Tyrell William (Julia Florence Siegel)",female,76,1,0,19877,78.85,C46,S -989,3,"Makinen, Mr. Kalle Edvard",male,29,0,0,STON/O 2. 3101268,7.925,,S -990,3,"Braf, Miss. Elin Ester Maria",female,20,0,0,347471,7.8542,,S -991,3,"Nancarrow, Mr. William Henry",male,33,0,0,A./5. 3338,8.05,,S -992,1,"Stengel, Mrs. Charles Emil Henry (Annie May Morris)",female,43,1,0,11778,55.4417,C116,C -993,2,"Weisz, Mr. Leopold",male,27,1,0,228414,26,,S -994,3,"Foley, Mr. William",male,,0,0,365235,7.75,,Q -995,3,"Johansson Palmquist, Mr. Oskar Leander",male,26,0,0,347070,7.775,,S -996,3,"Thomas, Mrs. Alexander (Thamine Thelma"")""",female,16,1,1,2625,8.5167,,C -997,3,"Holthen, Mr. Johan Martin",male,28,0,0,C 4001,22.525,,S -998,3,"Buckley, Mr. Daniel",male,21,0,0,330920,7.8208,,Q -999,3,"Ryan, Mr. Edward",male,,0,0,383162,7.75,,Q -1000,3,"Willer, Mr. Aaron (Abi Weller"")""",male,,0,0,3410,8.7125,,S -1001,2,"Swane, Mr. George",male,18.5,0,0,248734,13,F,S -1002,2,"Stanton, Mr. Samuel Ward",male,41,0,0,237734,15.0458,,C -1003,3,"Shine, Miss. Ellen Natalia",female,,0,0,330968,7.7792,,Q -1004,1,"Evans, Miss. Edith Corse",female,36,0,0,PC 17531,31.6792,A29,C -1005,3,"Buckley, Miss. Katherine",female,18.5,0,0,329944,7.2833,,Q -1006,1,"Straus, Mrs. Isidor (Rosalie Ida Blun)",female,63,1,0,PC 17483,221.7792,C55 C57,S -1007,3,"Chronopoulos, Mr. Demetrios",male,18,1,0,2680,14.4542,,C -1008,3,"Thomas, Mr. John",male,,0,0,2681,6.4375,,C -1009,3,"Sandstrom, Miss. Beatrice Irene",female,1,1,1,PP 9549,16.7,G6,S -1010,1,"Beattie, Mr. Thomson",male,36,0,0,13050,75.2417,C6,C -1011,2,"Chapman, Mrs. John Henry (Sara Elizabeth Lawry)",female,29,1,0,SC/AH 29037,26,,S -1012,2,"Watt, Miss. Bertha J",female,12,0,0,C.A. 33595,15.75,,S -1013,3,"Kiernan, Mr. John",male,,1,0,367227,7.75,,Q -1014,1,"Schabert, Mrs. Paul (Emma Mock)",female,35,1,0,13236,57.75,C28,C -1015,3,"Carver, Mr. Alfred John",male,28,0,0,392095,7.25,,S -1016,3,"Kennedy, Mr. John",male,,0,0,368783,7.75,,Q -1017,3,"Cribb, Miss. Laura Alice",female,17,0,1,371362,16.1,,S -1018,3,"Brobeck, Mr. Karl Rudolf",male,22,0,0,350045,7.7958,,S -1019,3,"McCoy, Miss. Alicia",female,,2,0,367226,23.25,,Q -1020,2,"Bowenur, Mr. Solomon",male,42,0,0,211535,13,,S -1021,3,"Petersen, Mr. Marius",male,24,0,0,342441,8.05,,S -1022,3,"Spinner, Mr. Henry John",male,32,0,0,STON/OQ. 369943,8.05,,S -1023,1,"Gracie, Col. Archibald IV",male,53,0,0,113780,28.5,C51,C -1024,3,"Lefebre, Mrs. Frank (Frances)",female,,0,4,4133,25.4667,,S -1025,3,"Thomas, Mr. Charles P",male,,1,0,2621,6.4375,,C -1026,3,"Dintcheff, Mr. Valtcho",male,43,0,0,349226,7.8958,,S -1027,3,"Carlsson, Mr. Carl Robert",male,24,0,0,350409,7.8542,,S -1028,3,"Zakarian, Mr. Mapriededer",male,26.5,0,0,2656,7.225,,C -1029,2,"Schmidt, Mr. August",male,26,0,0,248659,13,,S -1030,3,"Drapkin, Miss. Jennie",female,23,0,0,SOTON/OQ 392083,8.05,,S -1031,3,"Goodwin, Mr. Charles Frederick",male,40,1,6,CA 2144,46.9,,S -1032,3,"Goodwin, Miss. Jessie Allis",female,10,5,2,CA 2144,46.9,,S -1033,1,"Daniels, Miss. Sarah",female,33,0,0,113781,151.55,,S -1034,1,"Ryerson, Mr. Arthur Larned",male,61,1,3,PC 17608,262.375,B57 B59 B63 B66,C -1035,2,"Beauchamp, Mr. Henry James",male,28,0,0,244358,26,,S -1036,1,"Lindeberg-Lind, Mr. Erik Gustaf (Mr Edward Lingrey"")""",male,42,0,0,17475,26.55,,S -1037,3,"Vander Planke, Mr. Julius",male,31,3,0,345763,18,,S -1038,1,"Hilliard, Mr. Herbert Henry",male,,0,0,17463,51.8625,E46,S -1039,3,"Davies, Mr. Evan",male,22,0,0,SC/A4 23568,8.05,,S -1040,1,"Crafton, Mr. John Bertram",male,,0,0,113791,26.55,,S -1041,2,"Lahtinen, Rev. William",male,30,1,1,250651,26,,S -1042,1,"Earnshaw, Mrs. Boulton (Olive Potter)",female,23,0,1,11767,83.1583,C54,C -1043,3,"Matinoff, Mr. Nicola",male,,0,0,349255,7.8958,,C -1044,3,"Storey, Mr. Thomas",male,60.5,0,0,3701,,,S -1045,3,"Klasen, Mrs. (Hulda Kristina Eugenia Lofqvist)",female,36,0,2,350405,12.1833,,S -1046,3,"Asplund, Master. Filip Oscar",male,13,4,2,347077,31.3875,,S -1047,3,"Duquemin, Mr. Joseph",male,24,0,0,S.O./P.P. 752,7.55,,S -1048,1,"Bird, Miss. Ellen",female,29,0,0,PC 17483,221.7792,C97,S -1049,3,"Lundin, Miss. Olga Elida",female,23,0,0,347469,7.8542,,S -1050,1,"Borebank, Mr. John James",male,42,0,0,110489,26.55,D22,S -1051,3,"Peacock, Mrs. Benjamin (Edith Nile)",female,26,0,2,SOTON/O.Q. 3101315,13.775,,S -1052,3,"Smyth, Miss. Julia",female,,0,0,335432,7.7333,,Q -1053,3,"Touma, Master. Georges Youssef",male,7,1,1,2650,15.2458,,C -1054,2,"Wright, Miss. Marion",female,26,0,0,220844,13.5,,S -1055,3,"Pearce, Mr. Ernest",male,,0,0,343271,7,,S -1056,2,"Peruschitz, Rev. Joseph Maria",male,41,0,0,237393,13,,S -1057,3,"Kink-Heilmann, Mrs. Anton (Luise Heilmann)",female,26,1,1,315153,22.025,,S -1058,1,"Brandeis, Mr. Emil",male,48,0,0,PC 17591,50.4958,B10,C -1059,3,"Ford, Mr. Edward Watson",male,18,2,2,W./C. 6608,34.375,,S -1060,1,"Cassebeer, Mrs. Henry Arthur Jr (Eleanor Genevieve Fosdick)",female,,0,0,17770,27.7208,,C -1061,3,"Hellstrom, Miss. Hilda Maria",female,22,0,0,7548,8.9625,,S -1062,3,"Lithman, Mr. Simon",male,,0,0,S.O./P.P. 251,7.55,,S -1063,3,"Zakarian, Mr. Ortin",male,27,0,0,2670,7.225,,C -1064,3,"Dyker, Mr. Adolf Fredrik",male,23,1,0,347072,13.9,,S -1065,3,"Torfa, Mr. Assad",male,,0,0,2673,7.2292,,C -1066,3,"Asplund, Mr. Carl Oscar Vilhelm Gustafsson",male,40,1,5,347077,31.3875,,S -1067,2,"Brown, Miss. Edith Eileen",female,15,0,2,29750,39,,S -1068,2,"Sincock, Miss. Maude",female,20,0,0,C.A. 33112,36.75,,S -1069,1,"Stengel, Mr. Charles Emil Henry",male,54,1,0,11778,55.4417,C116,C -1070,2,"Becker, Mrs. Allen Oliver (Nellie E Baumgardner)",female,36,0,3,230136,39,F4,S -1071,1,"Compton, Mrs. Alexander Taylor (Mary Eliza Ingersoll)",female,64,0,2,PC 17756,83.1583,E45,C -1072,2,"McCrie, Mr. James Matthew",male,30,0,0,233478,13,,S -1073,1,"Compton, Mr. Alexander Taylor Jr",male,37,1,1,PC 17756,83.1583,E52,C -1074,1,"Marvin, Mrs. Daniel Warner (Mary Graham Carmichael Farquarson)",female,18,1,0,113773,53.1,D30,S -1075,3,"Lane, Mr. Patrick",male,,0,0,7935,7.75,,Q -1076,1,"Douglas, Mrs. Frederick Charles (Mary Helene Baxter)",female,27,1,1,PC 17558,247.5208,B58 B60,C -1077,2,"Maybery, Mr. Frank Hubert",male,40,0,0,239059,16,,S -1078,2,"Phillips, Miss. Alice Frances Louisa",female,21,0,1,S.O./P.P. 2,21,,S -1079,3,"Davies, Mr. Joseph",male,17,2,0,A/4 48873,8.05,,S -1080,3,"Sage, Miss. Ada",female,,8,2,CA. 2343,69.55,,S -1081,2,"Veal, Mr. James",male,40,0,0,28221,13,,S -1082,2,"Angle, Mr. William A",male,34,1,0,226875,26,,S -1083,1,"Salomon, Mr. Abraham L",male,,0,0,111163,26,,S -1084,3,"van Billiard, Master. Walter John",male,11.5,1,1,A/5. 851,14.5,,S -1085,2,"Lingane, Mr. John",male,61,0,0,235509,12.35,,Q -1086,2,"Drew, Master. Marshall Brines",male,8,0,2,28220,32.5,,S -1087,3,"Karlsson, Mr. Julius Konrad Eugen",male,33,0,0,347465,7.8542,,S -1088,1,"Spedden, Master. Robert Douglas",male,6,0,2,16966,134.5,E34,C -1089,3,"Nilsson, Miss. Berta Olivia",female,18,0,0,347066,7.775,,S -1090,2,"Baimbrigge, Mr. Charles Robert",male,23,0,0,C.A. 31030,10.5,,S -1091,3,"Rasmussen, Mrs. (Lena Jacobsen Solvang)",female,,0,0,65305,8.1125,,S -1092,3,"Murphy, Miss. Nora",female,,0,0,36568,15.5,,Q -1093,3,"Danbom, Master. Gilbert Sigvard Emanuel",male,0.33,0,2,347080,14.4,,S -1094,1,"Astor, Col. John Jacob",male,47,1,0,PC 17757,227.525,C62 C64,C -1095,2,"Quick, Miss. Winifred Vera",female,8,1,1,26360,26,,S -1096,2,"Andrew, Mr. Frank Thomas",male,25,0,0,C.A. 34050,10.5,,S -1097,1,"Omont, Mr. Alfred Fernand",male,,0,0,F.C. 12998,25.7417,,C -1098,3,"McGowan, Miss. Katherine",female,35,0,0,9232,7.75,,Q -1099,2,"Collett, Mr. Sidney C Stuart",male,24,0,0,28034,10.5,,S -1100,1,"Rosenbaum, Miss. Edith Louise",female,33,0,0,PC 17613,27.7208,A11,C -1101,3,"Delalic, Mr. Redjo",male,25,0,0,349250,7.8958,,S -1102,3,"Andersen, Mr. Albert Karvin",male,32,0,0,C 4001,22.525,,S -1103,3,"Finoli, Mr. Luigi",male,,0,0,SOTON/O.Q. 3101308,7.05,,S -1104,2,"Deacon, Mr. Percy William",male,17,0,0,S.O.C. 14879,73.5,,S -1105,2,"Howard, Mrs. Benjamin (Ellen Truelove Arman)",female,60,1,0,24065,26,,S -1106,3,"Andersson, Miss. Ida Augusta Margareta",female,38,4,2,347091,7.775,,S -1107,1,"Head, Mr. Christopher",male,42,0,0,113038,42.5,B11,S -1108,3,"Mahon, Miss. Bridget Delia",female,,0,0,330924,7.8792,,Q -1109,1,"Wick, Mr. George Dennick",male,57,1,1,36928,164.8667,,S -1110,1,"Widener, Mrs. George Dunton (Eleanor Elkins)",female,50,1,1,113503,211.5,C80,C -1111,3,"Thomson, Mr. Alexander Morrison",male,,0,0,32302,8.05,,S -1112,2,"Duran y More, Miss. Florentina",female,30,1,0,SC/PARIS 2148,13.8583,,C -1113,3,"Reynolds, Mr. Harold J",male,21,0,0,342684,8.05,,S -1114,2,"Cook, Mrs. (Selena Rogers)",female,22,0,0,W./C. 14266,10.5,F33,S -1115,3,"Karlsson, Mr. Einar Gervasius",male,21,0,0,350053,7.7958,,S -1116,1,"Candee, Mrs. Edward (Helen Churchill Hungerford)",female,53,0,0,PC 17606,27.4458,,C -1117,3,"Moubarek, Mrs. George (Omine Amenia"" Alexander)""",female,,0,2,2661,15.2458,,C -1118,3,"Asplund, Mr. Johan Charles",male,23,0,0,350054,7.7958,,S -1119,3,"McNeill, Miss. Bridget",female,,0,0,370368,7.75,,Q -1120,3,"Everett, Mr. Thomas James",male,40.5,0,0,C.A. 6212,15.1,,S -1121,2,"Hocking, Mr. Samuel James Metcalfe",male,36,0,0,242963,13,,S -1122,2,"Sweet, Mr. George Frederick",male,14,0,0,220845,65,,S -1123,1,"Willard, Miss. Constance",female,21,0,0,113795,26.55,,S -1124,3,"Wiklund, Mr. Karl Johan",male,21,1,0,3101266,6.4958,,S -1125,3,"Linehan, Mr. Michael",male,,0,0,330971,7.8792,,Q -1126,1,"Cumings, Mr. John Bradley",male,39,1,0,PC 17599,71.2833,C85,C -1127,3,"Vendel, Mr. Olof Edvin",male,20,0,0,350416,7.8542,,S -1128,1,"Warren, Mr. Frank Manley",male,64,1,0,110813,75.25,D37,C -1129,3,"Baccos, Mr. Raffull",male,20,0,0,2679,7.225,,C -1130,2,"Hiltunen, Miss. Marta",female,18,1,1,250650,13,,S -1131,1,"Douglas, Mrs. Walter Donald (Mahala Dutton)",female,48,1,0,PC 17761,106.425,C86,C -1132,1,"Lindstrom, Mrs. Carl Johan (Sigrid Posse)",female,55,0,0,112377,27.7208,,C -1133,2,"Christy, Mrs. (Alice Frances)",female,45,0,2,237789,30,,S -1134,1,"Spedden, Mr. Frederic Oakley",male,45,1,1,16966,134.5,E34,C -1135,3,"Hyman, Mr. Abraham",male,,0,0,3470,7.8875,,S -1136,3,"Johnston, Master. William Arthur Willie""""",male,,1,2,W./C. 6607,23.45,,S -1137,1,"Kenyon, Mr. Frederick R",male,41,1,0,17464,51.8625,D21,S -1138,2,"Karnes, Mrs. J Frank (Claire Bennett)",female,22,0,0,F.C.C. 13534,21,,S -1139,2,"Drew, Mr. James Vivian",male,42,1,1,28220,32.5,,S -1140,2,"Hold, Mrs. Stephen (Annie Margaret Hill)",female,29,1,0,26707,26,,S -1141,3,"Khalil, Mrs. Betros (Zahie Maria"" Elias)""",female,,1,0,2660,14.4542,,C -1142,2,"West, Miss. Barbara J",female,0.92,1,2,C.A. 34651,27.75,,S -1143,3,"Abrahamsson, Mr. Abraham August Johannes",male,20,0,0,SOTON/O2 3101284,7.925,,S -1144,1,"Clark, Mr. Walter Miller",male,27,1,0,13508,136.7792,C89,C -1145,3,"Salander, Mr. Karl Johan",male,24,0,0,7266,9.325,,S -1146,3,"Wenzel, Mr. Linhart",male,32.5,0,0,345775,9.5,,S -1147,3,"MacKay, Mr. George William",male,,0,0,C.A. 42795,7.55,,S -1148,3,"Mahon, Mr. John",male,,0,0,AQ/4 3130,7.75,,Q -1149,3,"Niklasson, Mr. Samuel",male,28,0,0,363611,8.05,,S -1150,2,"Bentham, Miss. Lilian W",female,19,0,0,28404,13,,S -1151,3,"Midtsjo, Mr. Karl Albert",male,21,0,0,345501,7.775,,S -1152,3,"de Messemaeker, Mr. Guillaume Joseph",male,36.5,1,0,345572,17.4,,S -1153,3,"Nilsson, Mr. August Ferdinand",male,21,0,0,350410,7.8542,,S -1154,2,"Wells, Mrs. Arthur Henry (Addie"" Dart Trevaskis)""",female,29,0,2,29103,23,,S -1155,3,"Klasen, Miss. Gertrud Emilia",female,1,1,1,350405,12.1833,,S -1156,2,"Portaluppi, Mr. Emilio Ilario Giuseppe",male,30,0,0,C.A. 34644,12.7375,,C -1157,3,"Lyntakoff, Mr. Stanko",male,,0,0,349235,7.8958,,S -1158,1,"Chisholm, Mr. Roderick Robert Crispin",male,,0,0,112051,0,,S -1159,3,"Warren, Mr. Charles William",male,,0,0,C.A. 49867,7.55,,S -1160,3,"Howard, Miss. May Elizabeth",female,,0,0,A. 2. 39186,8.05,,S -1161,3,"Pokrnic, Mr. Mate",male,17,0,0,315095,8.6625,,S -1162,1,"McCaffry, Mr. Thomas Francis",male,46,0,0,13050,75.2417,C6,C -1163,3,"Fox, Mr. Patrick",male,,0,0,368573,7.75,,Q -1164,1,"Clark, Mrs. Walter Miller (Virginia McDowell)",female,26,1,0,13508,136.7792,C89,C -1165,3,"Lennon, Miss. Mary",female,,1,0,370371,15.5,,Q -1166,3,"Saade, Mr. Jean Nassr",male,,0,0,2676,7.225,,C -1167,2,"Bryhl, Miss. Dagmar Jenny Ingeborg ",female,20,1,0,236853,26,,S -1168,2,"Parker, Mr. Clifford Richard",male,28,0,0,SC 14888,10.5,,S -1169,2,"Faunthorpe, Mr. Harry",male,40,1,0,2926,26,,S -1170,2,"Ware, Mr. John James",male,30,1,0,CA 31352,21,,S -1171,2,"Oxenham, Mr. Percy Thomas",male,22,0,0,W./C. 14260,10.5,,S -1172,3,"Oreskovic, Miss. Jelka",female,23,0,0,315085,8.6625,,S -1173,3,"Peacock, Master. Alfred Edward",male,0.75,1,1,SOTON/O.Q. 3101315,13.775,,S -1174,3,"Fleming, Miss. Honora",female,,0,0,364859,7.75,,Q -1175,3,"Touma, Miss. Maria Youssef",female,9,1,1,2650,15.2458,,C -1176,3,"Rosblom, Miss. Salli Helena",female,2,1,1,370129,20.2125,,S -1177,3,"Dennis, Mr. William",male,36,0,0,A/5 21175,7.25,,S -1178,3,"Franklin, Mr. Charles (Charles Fardon)",male,,0,0,SOTON/O.Q. 3101314,7.25,,S -1179,1,"Snyder, Mr. John Pillsbury",male,24,1,0,21228,82.2667,B45,S -1180,3,"Mardirosian, Mr. Sarkis",male,,0,0,2655,7.2292,F E46,C -1181,3,"Ford, Mr. Arthur",male,,0,0,A/5 1478,8.05,,S -1182,1,"Rheims, Mr. George Alexander Lucien",male,,0,0,PC 17607,39.6,,S -1183,3,"Daly, Miss. Margaret Marcella Maggie""""",female,30,0,0,382650,6.95,,Q -1184,3,"Nasr, Mr. Mustafa",male,,0,0,2652,7.2292,,C -1185,1,"Dodge, Dr. Washington",male,53,1,1,33638,81.8583,A34,S -1186,3,"Wittevrongel, Mr. Camille",male,36,0,0,345771,9.5,,S -1187,3,"Angheloff, Mr. Minko",male,26,0,0,349202,7.8958,,S -1188,2,"Laroche, Miss. Louise",female,1,1,2,SC/Paris 2123,41.5792,,C -1189,3,"Samaan, Mr. Hanna",male,,2,0,2662,21.6792,,C -1190,1,"Loring, Mr. Joseph Holland",male,30,0,0,113801,45.5,,S -1191,3,"Johansson, Mr. Nils",male,29,0,0,347467,7.8542,,S -1192,3,"Olsson, Mr. Oscar Wilhelm",male,32,0,0,347079,7.775,,S -1193,2,"Malachard, Mr. Noel",male,,0,0,237735,15.0458,D,C -1194,2,"Phillips, Mr. Escott Robert",male,43,0,1,S.O./P.P. 2,21,,S -1195,3,"Pokrnic, Mr. Tome",male,24,0,0,315092,8.6625,,S -1196,3,"McCarthy, Miss. Catherine Katie""""",female,,0,0,383123,7.75,,Q -1197,1,"Crosby, Mrs. Edward Gifford (Catherine Elizabeth Halstead)",female,64,1,1,112901,26.55,B26,S -1198,1,"Allison, Mr. Hudson Joshua Creighton",male,30,1,2,113781,151.55,C22 C26,S -1199,3,"Aks, Master. Philip Frank",male,0.83,0,1,392091,9.35,,S -1200,1,"Hays, Mr. Charles Melville",male,55,1,1,12749,93.5,B69,S -1201,3,"Hansen, Mrs. Claus Peter (Jennie L Howard)",female,45,1,0,350026,14.1083,,S -1202,3,"Cacic, Mr. Jego Grga",male,18,0,0,315091,8.6625,,S -1203,3,"Vartanian, Mr. David",male,22,0,0,2658,7.225,,C -1204,3,"Sadowitz, Mr. Harry",male,,0,0,LP 1588,7.575,,S -1205,3,"Carr, Miss. Jeannie",female,37,0,0,368364,7.75,,Q -1206,1,"White, Mrs. John Stuart (Ella Holmes)",female,55,0,0,PC 17760,135.6333,C32,C -1207,3,"Hagardon, Miss. Kate",female,17,0,0,AQ/3. 30631,7.7333,,Q -1208,1,"Spencer, Mr. William Augustus",male,57,1,0,PC 17569,146.5208,B78,C -1209,2,"Rogers, Mr. Reginald Harry",male,19,0,0,28004,10.5,,S -1210,3,"Jonsson, Mr. Nils Hilding",male,27,0,0,350408,7.8542,,S -1211,2,"Jefferys, Mr. Ernest Wilfred",male,22,2,0,C.A. 31029,31.5,,S -1212,3,"Andersson, Mr. Johan Samuel",male,26,0,0,347075,7.775,,S -1213,3,"Krekorian, Mr. Neshan",male,25,0,0,2654,7.2292,F E57,C -1214,2,"Nesson, Mr. Israel",male,26,0,0,244368,13,F2,S -1215,1,"Rowe, Mr. Alfred G",male,33,0,0,113790,26.55,,S -1216,1,"Kreuchen, Miss. Emilie",female,39,0,0,24160,211.3375,,S -1217,3,"Assam, Mr. Ali",male,23,0,0,SOTON/O.Q. 3101309,7.05,,S -1218,2,"Becker, Miss. Ruth Elizabeth",female,12,2,1,230136,39,F4,S -1219,1,"Rosenshine, Mr. George (Mr George Thorne"")""",male,46,0,0,PC 17585,79.2,,C -1220,2,"Clarke, Mr. Charles Valentine",male,29,1,0,2003,26,,S -1221,2,"Enander, Mr. Ingvar",male,21,0,0,236854,13,,S -1222,2,"Davies, Mrs. John Morgan (Elizabeth Agnes Mary White) ",female,48,0,2,C.A. 33112,36.75,,S -1223,1,"Dulles, Mr. William Crothers",male,39,0,0,PC 17580,29.7,A18,C -1224,3,"Thomas, Mr. Tannous",male,,0,0,2684,7.225,,C -1225,3,"Nakid, Mrs. Said (Waika Mary"" Mowad)""",female,19,1,1,2653,15.7417,,C -1226,3,"Cor, Mr. Ivan",male,27,0,0,349229,7.8958,,S -1227,1,"Maguire, Mr. John Edward",male,30,0,0,110469,26,C106,S -1228,2,"de Brito, Mr. Jose Joaquim",male,32,0,0,244360,13,,S -1229,3,"Elias, Mr. Joseph",male,39,0,2,2675,7.2292,,C -1230,2,"Denbury, Mr. Herbert",male,25,0,0,C.A. 31029,31.5,,S -1231,3,"Betros, Master. Seman",male,,0,0,2622,7.2292,,C -1232,2,"Fillbrook, Mr. Joseph Charles",male,18,0,0,C.A. 15185,10.5,,S -1233,3,"Lundstrom, Mr. Thure Edvin",male,32,0,0,350403,7.5792,,S -1234,3,"Sage, Mr. John George",male,,1,9,CA. 2343,69.55,,S -1235,1,"Cardeza, Mrs. James Warburton Martinez (Charlotte Wardle Drake)",female,58,0,1,PC 17755,512.3292,B51 B53 B55,C -1236,3,"van Billiard, Master. James William",male,,1,1,A/5. 851,14.5,,S -1237,3,"Abelseth, Miss. Karen Marie",female,16,0,0,348125,7.65,,S -1238,2,"Botsford, Mr. William Hull",male,26,0,0,237670,13,,S -1239,3,"Whabee, Mrs. George Joseph (Shawneene Abi-Saab)",female,38,0,0,2688,7.2292,,C -1240,2,"Giles, Mr. Ralph",male,24,0,0,248726,13.5,,S -1241,2,"Walcroft, Miss. Nellie",female,31,0,0,F.C.C. 13528,21,,S -1242,1,"Greenfield, Mrs. Leo David (Blanche Strouse)",female,45,0,1,PC 17759,63.3583,D10 D12,C -1243,2,"Stokes, Mr. Philip Joseph",male,25,0,0,F.C.C. 13540,10.5,,S -1244,2,"Dibden, Mr. William",male,18,0,0,S.O.C. 14879,73.5,,S -1245,2,"Herman, Mr. Samuel",male,49,1,2,220845,65,,S -1246,3,"Dean, Miss. Elizabeth Gladys Millvina""""",female,0.17,1,2,C.A. 2315,20.575,,S -1247,1,"Julian, Mr. Henry Forbes",male,50,0,0,113044,26,E60,S -1248,1,"Brown, Mrs. John Murray (Caroline Lane Lamson)",female,59,2,0,11769,51.4792,C101,S -1249,3,"Lockyer, Mr. Edward",male,,0,0,1222,7.8792,,S -1250,3,"O'Keefe, Mr. Patrick",male,,0,0,368402,7.75,,Q -1251,3,"Lindell, Mrs. Edvard Bengtsson (Elin Gerda Persson)",female,30,1,0,349910,15.55,,S -1252,3,"Sage, Master. William Henry",male,14.5,8,2,CA. 2343,69.55,,S -1253,2,"Mallet, Mrs. Albert (Antoinette Magnin)",female,24,1,1,S.C./PARIS 2079,37.0042,,C -1254,2,"Ware, Mrs. John James (Florence Louise Long)",female,31,0,0,CA 31352,21,,S -1255,3,"Strilic, Mr. Ivan",male,27,0,0,315083,8.6625,,S -1256,1,"Harder, Mrs. George Achilles (Dorothy Annan)",female,25,1,0,11765,55.4417,E50,C -1257,3,"Sage, Mrs. John (Annie Bullen)",female,,1,9,CA. 2343,69.55,,S -1258,3,"Caram, Mr. Joseph",male,,1,0,2689,14.4583,,C -1259,3,"Riihivouri, Miss. Susanna Juhantytar Sanni""""",female,22,0,0,3101295,39.6875,,S -1260,1,"Gibson, Mrs. Leonard (Pauline C Boeson)",female,45,0,1,112378,59.4,,C -1261,2,"Pallas y Castello, Mr. Emilio",male,29,0,0,SC/PARIS 2147,13.8583,,C -1262,2,"Giles, Mr. Edgar",male,21,1,0,28133,11.5,,S -1263,1,"Wilson, Miss. Helen Alice",female,31,0,0,16966,134.5,E39 E41,C -1264,1,"Ismay, Mr. Joseph Bruce",male,49,0,0,112058,0,B52 B54 B56,S -1265,2,"Harbeck, Mr. William H",male,44,0,0,248746,13,,S -1266,1,"Dodge, Mrs. Washington (Ruth Vidaver)",female,54,1,1,33638,81.8583,A34,S -1267,1,"Bowen, Miss. Grace Scott",female,45,0,0,PC 17608,262.375,,C -1268,3,"Kink, Miss. Maria",female,22,2,0,315152,8.6625,,S -1269,2,"Cotterill, Mr. Henry Harry""""",male,21,0,0,29107,11.5,,S -1270,1,"Hipkins, Mr. William Edward",male,55,0,0,680,50,C39,S -1271,3,"Asplund, Master. Carl Edgar",male,5,4,2,347077,31.3875,,S -1272,3,"O'Connor, Mr. Patrick",male,,0,0,366713,7.75,,Q -1273,3,"Foley, Mr. Joseph",male,26,0,0,330910,7.8792,,Q -1274,3,"Risien, Mrs. Samuel (Emma)",female,,0,0,364498,14.5,,S -1275,3,"McNamee, Mrs. Neal (Eileen O'Leary)",female,19,1,0,376566,16.1,,S -1276,2,"Wheeler, Mr. Edwin Frederick""""",male,,0,0,SC/PARIS 2159,12.875,,S -1277,2,"Herman, Miss. Kate",female,24,1,2,220845,65,,S -1278,3,"Aronsson, Mr. Ernst Axel Algot",male,24,0,0,349911,7.775,,S -1279,2,"Ashby, Mr. John",male,57,0,0,244346,13,,S -1280,3,"Canavan, Mr. Patrick",male,21,0,0,364858,7.75,,Q -1281,3,"Palsson, Master. Paul Folke",male,6,3,1,349909,21.075,,S -1282,1,"Payne, Mr. Vivian Ponsonby",male,23,0,0,12749,93.5,B24,S -1283,1,"Lines, Mrs. Ernest H (Elizabeth Lindsey James)",female,51,0,1,PC 17592,39.4,D28,S -1284,3,"Abbott, Master. Eugene Joseph",male,13,0,2,C.A. 2673,20.25,,S -1285,2,"Gilbert, Mr. William",male,47,0,0,C.A. 30769,10.5,,S -1286,3,"Kink-Heilmann, Mr. Anton",male,29,3,1,315153,22.025,,S -1287,1,"Smith, Mrs. Lucien Philip (Mary Eloise Hughes)",female,18,1,0,13695,60,C31,S -1288,3,"Colbert, Mr. Patrick",male,24,0,0,371109,7.25,,Q -1289,1,"Frolicher-Stehli, Mrs. Maxmillian (Margaretha Emerentia Stehli)",female,48,1,1,13567,79.2,B41,C -1290,3,"Larsson-Rondberg, Mr. Edvard A",male,22,0,0,347065,7.775,,S -1291,3,"Conlon, Mr. Thomas Henry",male,31,0,0,21332,7.7333,,Q -1292,1,"Bonnell, Miss. Caroline",female,30,0,0,36928,164.8667,C7,S -1293,2,"Gale, Mr. Harry",male,38,1,0,28664,21,,S -1294,1,"Gibson, Miss. Dorothy Winifred",female,22,0,1,112378,59.4,,C -1295,1,"Carrau, Mr. Jose Pedro",male,17,0,0,113059,47.1,,S -1296,1,"Frauenthal, Mr. Isaac Gerald",male,43,1,0,17765,27.7208,D40,C -1297,2,"Nourney, Mr. Alfred (Baron von Drachstedt"")""",male,20,0,0,SC/PARIS 2166,13.8625,D38,C -1298,2,"Ware, Mr. William Jeffery",male,23,1,0,28666,10.5,,S -1299,1,"Widener, Mr. George Dunton",male,50,1,1,113503,211.5,C80,C -1300,3,"Riordan, Miss. Johanna Hannah""""",female,,0,0,334915,7.7208,,Q -1301,3,"Peacock, Miss. Treasteall",female,3,1,1,SOTON/O.Q. 3101315,13.775,,S -1302,3,"Naughton, Miss. Hannah",female,,0,0,365237,7.75,,Q -1303,1,"Minahan, Mrs. William Edward (Lillian E Thorpe)",female,37,1,0,19928,90,C78,Q -1304,3,"Henriksson, Miss. Jenny Lovisa",female,28,0,0,347086,7.775,,S -1305,3,"Spector, Mr. Woolf",male,,0,0,A.5. 3236,8.05,,S -1306,1,"Oliva y Ocana, Dona. Fermina",female,39,0,0,PC 17758,108.9,C105,C -1307,3,"Saether, Mr. Simon Sivertsen",male,38.5,0,0,SOTON/O.Q. 3101262,7.25,,S -1308,3,"Ware, Mr. Frederick",male,,0,0,359309,8.05,,S -1309,3,"Peter, Master. Michael J",male,,1,1,2668,22.3583,,C diff --git a/samples/titanic/train.csv b/samples/titanic/train.csv deleted file mode 100644 index 796a537..0000000 --- a/samples/titanic/train.csv +++ /dev/null @@ -1,700 +0,0 @@ -PassengerId,Survived,Pclass,Name,Sex,Age,SibSp,Parch,Ticket,Fare,Cabin,Embarked -1,0,3,"Braund, Mr. Owen Harris",male,22,1,0,A/5 21171,7.25,,S -2,1,1,"Cumings, Mrs. John Bradley (Florence Briggs Thayer)",female,38,1,0,PC 17599,71.2833,C85,C -3,1,3,"Heikkinen, Miss. Laina",female,26,0,0,STON/O2. 3101282,7.925,,S -4,1,1,"Futrelle, Mrs. Jacques Heath (Lily May Peel)",female,35,1,0,113803,53.1,C123,S -5,0,3,"Allen, Mr. William Henry",male,35,0,0,373450,8.05,,S -6,0,3,"Moran, Mr. James",male,,0,0,330877,8.4583,,Q -7,0,1,"McCarthy, Mr. Timothy J",male,54,0,0,17463,51.8625,E46,S -8,0,3,"Palsson, Master. Gosta Leonard",male,2,3,1,349909,21.075,,S -9,1,3,"Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg)",female,27,0,2,347742,11.1333,,S -10,1,2,"Nasser, Mrs. Nicholas (Adele Achem)",female,14,1,0,237736,30.0708,,C -11,1,3,"Sandstrom, Miss. Marguerite Rut",female,4,1,1,PP 9549,16.7,G6,S -12,1,1,"Bonnell, Miss. Elizabeth",female,58,0,0,113783,26.55,C103,S -13,0,3,"Saundercock, Mr. William Henry",male,20,0,0,A/5. 2151,8.05,,S -14,0,3,"Andersson, Mr. Anders Johan",male,39,1,5,347082,31.275,,S -15,0,3,"Vestrom, Miss. Hulda Amanda Adolfina",female,14,0,0,350406,7.8542,,S -16,1,2,"Hewlett, Mrs. (Mary D Kingcome) ",female,55,0,0,248706,16,,S -17,0,3,"Rice, Master. Eugene",male,2,4,1,382652,29.125,,Q -18,1,2,"Williams, Mr. Charles Eugene",male,,0,0,244373,13,,S -19,0,3,"Vander Planke, Mrs. Julius (Emelia Maria Vandemoortele)",female,31,1,0,345763,18,,S -20,1,3,"Masselmani, Mrs. Fatima",female,,0,0,2649,7.225,,C -21,0,2,"Fynney, Mr. Joseph J",male,35,0,0,239865,26,,S -22,1,2,"Beesley, Mr. Lawrence",male,34,0,0,248698,13,D56,S -23,1,3,"McGowan, Miss. Anna ""Annie""",female,15,0,0,330923,8.0292,,Q -24,1,1,"Sloper, Mr. William Thompson",male,28,0,0,113788,35.5,A6,S -25,0,3,"Palsson, Miss. Torborg Danira",female,8,3,1,349909,21.075,,S -26,1,3,"Asplund, Mrs. Carl Oscar (Selma Augusta Emilia Johansson)",female,38,1,5,347077,31.3875,,S -27,0,3,"Emir, Mr. Farred Chehab",male,,0,0,2631,7.225,,C -28,0,1,"Fortune, Mr. Charles Alexander",male,19,3,2,19950,263,C23 C25 C27,S -29,1,3,"O'Dwyer, Miss. Ellen ""Nellie""",female,,0,0,330959,7.8792,,Q -30,0,3,"Todoroff, Mr. Lalio",male,,0,0,349216,7.8958,,S -31,0,1,"Uruchurtu, Don. Manuel E",male,40,0,0,PC 17601,27.7208,,C -32,1,1,"Spencer, Mrs. William Augustus (Marie Eugenie)",female,,1,0,PC 17569,146.5208,B78,C -33,1,3,"Glynn, Miss. Mary Agatha",female,,0,0,335677,7.75,,Q -34,0,2,"Wheadon, Mr. Edward H",male,66,0,0,C.A. 24579,10.5,,S -35,0,1,"Meyer, Mr. Edgar Joseph",male,28,1,0,PC 17604,82.1708,,C -36,0,1,"Holverson, Mr. Alexander Oskar",male,42,1,0,113789,52,,S -37,1,3,"Mamee, Mr. Hanna",male,,0,0,2677,7.2292,,C -38,0,3,"Cann, Mr. Ernest Charles",male,21,0,0,A./5. 2152,8.05,,S -39,0,3,"Vander Planke, Miss. Augusta Maria",female,18,2,0,345764,18,,S -40,1,3,"Nicola-Yarred, Miss. Jamila",female,14,1,0,2651,11.2417,,C -41,0,3,"Ahlin, Mrs. Johan (Johanna Persdotter Larsson)",female,40,1,0,7546,9.475,,S -42,0,2,"Turpin, Mrs. William John Robert (Dorothy Ann Wonnacott)",female,27,1,0,11668,21,,S -43,0,3,"Kraeff, Mr. Theodor",male,,0,0,349253,7.8958,,C -44,1,2,"Laroche, Miss. Simonne Marie Anne Andree",female,3,1,2,SC/Paris 2123,41.5792,,C -45,1,3,"Devaney, Miss. Margaret Delia",female,19,0,0,330958,7.8792,,Q -46,0,3,"Rogers, Mr. William John",male,,0,0,S.C./A.4. 23567,8.05,,S -47,0,3,"Lennon, Mr. Denis",male,,1,0,370371,15.5,,Q -48,1,3,"O'Driscoll, Miss. Bridget",female,,0,0,14311,7.75,,Q -49,0,3,"Samaan, Mr. Youssef",male,,2,0,2662,21.6792,,C -50,0,3,"Arnold-Franchi, Mrs. Josef (Josefine Franchi)",female,18,1,0,349237,17.8,,S -51,0,3,"Panula, Master. Juha Niilo",male,7,4,1,3101295,39.6875,,S -52,0,3,"Nosworthy, Mr. Richard Cater",male,21,0,0,A/4. 39886,7.8,,S -53,1,1,"Harper, Mrs. Henry Sleeper (Myna Haxtun)",female,49,1,0,PC 17572,76.7292,D33,C -54,1,2,"Faunthorpe, Mrs. Lizzie (Elizabeth Anne Wilkinson)",female,29,1,0,2926,26,,S -55,0,1,"Ostby, Mr. Engelhart Cornelius",male,65,0,1,113509,61.9792,B30,C -56,1,1,"Woolner, Mr. Hugh",male,,0,0,19947,35.5,C52,S -57,1,2,"Rugg, Miss. Emily",female,21,0,0,C.A. 31026,10.5,,S -58,0,3,"Novel, Mr. Mansouer",male,28.5,0,0,2697,7.2292,,C -59,1,2,"West, Miss. Constance Mirium",female,5,1,2,C.A. 34651,27.75,,S -60,0,3,"Goodwin, Master. William Frederick",male,11,5,2,CA 2144,46.9,,S -61,0,3,"Sirayanian, Mr. Orsen",male,22,0,0,2669,7.2292,,C -62,1,1,"Icard, Miss. Amelie",female,38,0,0,113572,80,B28, -63,0,1,"Harris, Mr. Henry Birkhardt",male,45,1,0,36973,83.475,C83,S -64,0,3,"Skoog, Master. Harald",male,4,3,2,347088,27.9,,S -65,0,1,"Stewart, Mr. Albert A",male,,0,0,PC 17605,27.7208,,C -66,1,3,"Moubarek, Master. Gerios",male,,1,1,2661,15.2458,,C -67,1,2,"Nye, Mrs. (Elizabeth Ramell)",female,29,0,0,C.A. 29395,10.5,F33,S -68,0,3,"Crease, Mr. Ernest James",male,19,0,0,S.P. 3464,8.1583,,S -69,1,3,"Andersson, Miss. Erna Alexandra",female,17,4,2,3101281,7.925,,S -70,0,3,"Kink, Mr. Vincenz",male,26,2,0,315151,8.6625,,S -71,0,2,"Jenkin, Mr. Stephen Curnow",male,32,0,0,C.A. 33111,10.5,,S -72,0,3,"Goodwin, Miss. Lillian Amy",female,16,5,2,CA 2144,46.9,,S -73,0,2,"Hood, Mr. Ambrose Jr",male,21,0,0,S.O.C. 14879,73.5,,S -74,0,3,"Chronopoulos, Mr. Apostolos",male,26,1,0,2680,14.4542,,C -75,1,3,"Bing, Mr. Lee",male,32,0,0,1601,56.4958,,S -76,0,3,"Moen, Mr. Sigurd Hansen",male,25,0,0,348123,7.65,F G73,S -77,0,3,"Staneff, Mr. Ivan",male,,0,0,349208,7.8958,,S -78,0,3,"Moutal, Mr. Rahamin Haim",male,,0,0,374746,8.05,,S -79,1,2,"Caldwell, Master. Alden Gates",male,0.83,0,2,248738,29,,S -80,1,3,"Dowdell, Miss. Elizabeth",female,30,0,0,364516,12.475,,S -81,0,3,"Waelens, Mr. Achille",male,22,0,0,345767,9,,S -82,1,3,"Sheerlinck, Mr. Jan Baptist",male,29,0,0,345779,9.5,,S -83,1,3,"McDermott, Miss. Brigdet Delia",female,,0,0,330932,7.7875,,Q -84,0,1,"Carrau, Mr. Francisco M",male,28,0,0,113059,47.1,,S -85,1,2,"Ilett, Miss. Bertha",female,17,0,0,SO/C 14885,10.5,,S -86,1,3,"Backstrom, Mrs. Karl Alfred (Maria Mathilda Gustafsson)",female,33,3,0,3101278,15.85,,S -87,0,3,"Ford, Mr. William Neal",male,16,1,3,W./C. 6608,34.375,,S -88,0,3,"Slocovski, Mr. Selman Francis",male,,0,0,SOTON/OQ 392086,8.05,,S -89,1,1,"Fortune, Miss. Mabel Helen",female,23,3,2,19950,263,C23 C25 C27,S -90,0,3,"Celotti, Mr. Francesco",male,24,0,0,343275,8.05,,S -91,0,3,"Christmann, Mr. Emil",male,29,0,0,343276,8.05,,S -92,0,3,"Andreasson, Mr. Paul Edvin",male,20,0,0,347466,7.8542,,S -93,0,1,"Chaffee, Mr. Herbert Fuller",male,46,1,0,W.E.P. 5734,61.175,E31,S -94,0,3,"Dean, Mr. Bertram Frank",male,26,1,2,C.A. 2315,20.575,,S -95,0,3,"Coxon, Mr. Daniel",male,59,0,0,364500,7.25,,S -96,0,3,"Shorney, Mr. Charles Joseph",male,,0,0,374910,8.05,,S -97,0,1,"Goldschmidt, Mr. George B",male,71,0,0,PC 17754,34.6542,A5,C -98,1,1,"Greenfield, Mr. William Bertram",male,23,0,1,PC 17759,63.3583,D10 D12,C -99,1,2,"Doling, Mrs. John T (Ada Julia Bone)",female,34,0,1,231919,23,,S -100,0,2,"Kantor, Mr. Sinai",male,34,1,0,244367,26,,S -101,0,3,"Petranec, Miss. Matilda",female,28,0,0,349245,7.8958,,S -102,0,3,"Petroff, Mr. Pastcho (""Pentcho"")",male,,0,0,349215,7.8958,,S -103,0,1,"White, Mr. Richard Frasar",male,21,0,1,35281,77.2875,D26,S -104,0,3,"Johansson, Mr. Gustaf Joel",male,33,0,0,7540,8.6542,,S -105,0,3,"Gustafsson, Mr. Anders Vilhelm",male,37,2,0,3101276,7.925,,S -106,0,3,"Mionoff, Mr. Stoytcho",male,28,0,0,349207,7.8958,,S -107,1,3,"Salkjelsvik, Miss. Anna Kristine",female,21,0,0,343120,7.65,,S -108,1,3,"Moss, Mr. Albert Johan",male,,0,0,312991,7.775,,S -109,0,3,"Rekic, Mr. Tido",male,38,0,0,349249,7.8958,,S -110,1,3,"Moran, Miss. Bertha",female,,1,0,371110,24.15,,Q -111,0,1,"Porter, Mr. Walter Chamberlain",male,47,0,0,110465,52,C110,S -112,0,3,"Zabour, Miss. Hileni",female,14.5,1,0,2665,14.4542,,C -113,0,3,"Barton, Mr. David John",male,22,0,0,324669,8.05,,S -114,0,3,"Jussila, Miss. Katriina",female,20,1,0,4136,9.825,,S -115,0,3,"Attalah, Miss. Malake",female,17,0,0,2627,14.4583,,C -116,0,3,"Pekoniemi, Mr. Edvard",male,21,0,0,STON/O 2. 3101294,7.925,,S -117,0,3,"Connors, Mr. Patrick",male,70.5,0,0,370369,7.75,,Q -118,0,2,"Turpin, Mr. William John Robert",male,29,1,0,11668,21,,S -119,0,1,"Baxter, Mr. Quigg Edmond",male,24,0,1,PC 17558,247.5208,B58 B60,C -120,0,3,"Andersson, Miss. Ellis Anna Maria",female,2,4,2,347082,31.275,,S -121,0,2,"Hickman, Mr. Stanley George",male,21,2,0,S.O.C. 14879,73.5,,S -122,0,3,"Moore, Mr. Leonard Charles",male,,0,0,A4. 54510,8.05,,S -123,0,2,"Nasser, Mr. Nicholas",male,32.5,1,0,237736,30.0708,,C -124,1,2,"Webber, Miss. Susan",female,32.5,0,0,27267,13,E101,S -125,0,1,"White, Mr. Percival Wayland",male,54,0,1,35281,77.2875,D26,S -126,1,3,"Nicola-Yarred, Master. Elias",male,12,1,0,2651,11.2417,,C -127,0,3,"McMahon, Mr. Martin",male,,0,0,370372,7.75,,Q -128,1,3,"Madsen, Mr. Fridtjof Arne",male,24,0,0,C 17369,7.1417,,S -129,1,3,"Peter, Miss. Anna",female,,1,1,2668,22.3583,F E69,C -130,0,3,"Ekstrom, Mr. Johan",male,45,0,0,347061,6.975,,S -131,0,3,"Drazenoic, Mr. Jozef",male,33,0,0,349241,7.8958,,C -132,0,3,"Coelho, Mr. Domingos Fernandeo",male,20,0,0,SOTON/O.Q. 3101307,7.05,,S -133,0,3,"Robins, Mrs. Alexander A (Grace Charity Laury)",female,47,1,0,A/5. 3337,14.5,,S -134,1,2,"Weisz, Mrs. Leopold (Mathilde Francoise Pede)",female,29,1,0,228414,26,,S -135,0,2,"Sobey, Mr. Samuel James Hayden",male,25,0,0,C.A. 29178,13,,S -136,0,2,"Richard, Mr. Emile",male,23,0,0,SC/PARIS 2133,15.0458,,C -137,1,1,"Newsom, Miss. Helen Monypeny",female,19,0,2,11752,26.2833,D47,S -138,0,1,"Futrelle, Mr. Jacques Heath",male,37,1,0,113803,53.1,C123,S -139,0,3,"Osen, Mr. Olaf Elon",male,16,0,0,7534,9.2167,,S -140,0,1,"Giglio, Mr. Victor",male,24,0,0,PC 17593,79.2,B86,C -141,0,3,"Boulos, Mrs. Joseph (Sultana)",female,,0,2,2678,15.2458,,C -142,1,3,"Nysten, Miss. Anna Sofia",female,22,0,0,347081,7.75,,S -143,1,3,"Hakkarainen, Mrs. Pekka Pietari (Elin Matilda Dolck)",female,24,1,0,STON/O2. 3101279,15.85,,S -144,0,3,"Burke, Mr. Jeremiah",male,19,0,0,365222,6.75,,Q -145,0,2,"Andrew, Mr. Edgardo Samuel",male,18,0,0,231945,11.5,,S -146,0,2,"Nicholls, Mr. Joseph Charles",male,19,1,1,C.A. 33112,36.75,,S -147,1,3,"Andersson, Mr. August Edvard (""Wennerstrom"")",male,27,0,0,350043,7.7958,,S -148,0,3,"Ford, Miss. Robina Maggie ""Ruby""",female,9,2,2,W./C. 6608,34.375,,S -149,0,2,"Navratil, Mr. Michel (""Louis M Hoffman"")",male,36.5,0,2,230080,26,F2,S -150,0,2,"Byles, Rev. Thomas Roussel Davids",male,42,0,0,244310,13,,S -151,0,2,"Bateman, Rev. Robert James",male,51,0,0,S.O.P. 1166,12.525,,S -152,1,1,"Pears, Mrs. Thomas (Edith Wearne)",female,22,1,0,113776,66.6,C2,S -153,0,3,"Meo, Mr. Alfonzo",male,55.5,0,0,A.5. 11206,8.05,,S -154,0,3,"van Billiard, Mr. Austin Blyler",male,40.5,0,2,A/5. 851,14.5,,S -155,0,3,"Olsen, Mr. Ole Martin",male,,0,0,Fa 265302,7.3125,,S -156,0,1,"Williams, Mr. Charles Duane",male,51,0,1,PC 17597,61.3792,,C -157,1,3,"Gilnagh, Miss. Katherine ""Katie""",female,16,0,0,35851,7.7333,,Q -158,0,3,"Corn, Mr. Harry",male,30,0,0,SOTON/OQ 392090,8.05,,S -159,0,3,"Smiljanic, Mr. Mile",male,,0,0,315037,8.6625,,S -160,0,3,"Sage, Master. Thomas Henry",male,,8,2,CA. 2343,69.55,,S -161,0,3,"Cribb, Mr. John Hatfield",male,44,0,1,371362,16.1,,S -162,1,2,"Watt, Mrs. James (Elizabeth ""Bessie"" Inglis Milne)",female,40,0,0,C.A. 33595,15.75,,S -163,0,3,"Bengtsson, Mr. John Viktor",male,26,0,0,347068,7.775,,S -164,0,3,"Calic, Mr. Jovo",male,17,0,0,315093,8.6625,,S -165,0,3,"Panula, Master. Eino Viljami",male,1,4,1,3101295,39.6875,,S -166,1,3,"Goldsmith, Master. Frank John William ""Frankie""",male,9,0,2,363291,20.525,,S -167,1,1,"Chibnall, Mrs. (Edith Martha Bowerman)",female,,0,1,113505,55,E33,S -168,0,3,"Skoog, Mrs. William (Anna Bernhardina Karlsson)",female,45,1,4,347088,27.9,,S -169,0,1,"Baumann, Mr. John D",male,,0,0,PC 17318,25.925,,S -170,0,3,"Ling, Mr. Lee",male,28,0,0,1601,56.4958,,S -171,0,1,"Van der hoef, Mr. Wyckoff",male,61,0,0,111240,33.5,B19,S -172,0,3,"Rice, Master. Arthur",male,4,4,1,382652,29.125,,Q -173,1,3,"Johnson, Miss. Eleanor Ileen",female,1,1,1,347742,11.1333,,S -174,0,3,"Sivola, Mr. Antti Wilhelm",male,21,0,0,STON/O 2. 3101280,7.925,,S -175,0,1,"Smith, Mr. James Clinch",male,56,0,0,17764,30.6958,A7,C -176,0,3,"Klasen, Mr. Klas Albin",male,18,1,1,350404,7.8542,,S -177,0,3,"Lefebre, Master. Henry Forbes",male,,3,1,4133,25.4667,,S -178,0,1,"Isham, Miss. Ann Elizabeth",female,50,0,0,PC 17595,28.7125,C49,C -179,0,2,"Hale, Mr. Reginald",male,30,0,0,250653,13,,S -180,0,3,"Leonard, Mr. Lionel",male,36,0,0,LINE,0,,S -181,0,3,"Sage, Miss. Constance Gladys",female,,8,2,CA. 2343,69.55,,S -182,0,2,"Pernot, Mr. Rene",male,,0,0,SC/PARIS 2131,15.05,,C -183,0,3,"Asplund, Master. Clarence Gustaf Hugo",male,9,4,2,347077,31.3875,,S -184,1,2,"Becker, Master. Richard F",male,1,2,1,230136,39,F4,S -185,1,3,"Kink-Heilmann, Miss. Luise Gretchen",female,4,0,2,315153,22.025,,S -186,0,1,"Rood, Mr. Hugh Roscoe",male,,0,0,113767,50,A32,S -187,1,3,"O'Brien, Mrs. Thomas (Johanna ""Hannah"" Godfrey)",female,,1,0,370365,15.5,,Q -188,1,1,"Romaine, Mr. Charles Hallace (""Mr C Rolmane"")",male,45,0,0,111428,26.55,,S -189,0,3,"Bourke, Mr. John",male,40,1,1,364849,15.5,,Q -190,0,3,"Turcin, Mr. Stjepan",male,36,0,0,349247,7.8958,,S -191,1,2,"Pinsky, Mrs. (Rosa)",female,32,0,0,234604,13,,S -192,0,2,"Carbines, Mr. William",male,19,0,0,28424,13,,S -193,1,3,"Andersen-Jensen, Miss. Carla Christine Nielsine",female,19,1,0,350046,7.8542,,S -194,1,2,"Navratil, Master. Michel M",male,3,1,1,230080,26,F2,S -195,1,1,"Brown, Mrs. James Joseph (Margaret Tobin)",female,44,0,0,PC 17610,27.7208,B4,C -196,1,1,"Lurette, Miss. Elise",female,58,0,0,PC 17569,146.5208,B80,C -197,0,3,"Mernagh, Mr. Robert",male,,0,0,368703,7.75,,Q -198,0,3,"Olsen, Mr. Karl Siegwart Andreas",male,42,0,1,4579,8.4042,,S -199,1,3,"Madigan, Miss. Margaret ""Maggie""",female,,0,0,370370,7.75,,Q -200,0,2,"Yrois, Miss. Henriette (""Mrs Harbeck"")",female,24,0,0,248747,13,,S -201,0,3,"Vande Walle, Mr. Nestor Cyriel",male,28,0,0,345770,9.5,,S -202,0,3,"Sage, Mr. Frederick",male,,8,2,CA. 2343,69.55,,S -203,0,3,"Johanson, Mr. Jakob Alfred",male,34,0,0,3101264,6.4958,,S -204,0,3,"Youseff, Mr. Gerious",male,45.5,0,0,2628,7.225,,C -205,1,3,"Cohen, Mr. Gurshon ""Gus""",male,18,0,0,A/5 3540,8.05,,S -206,0,3,"Strom, Miss. Telma Matilda",female,2,0,1,347054,10.4625,G6,S -207,0,3,"Backstrom, Mr. Karl Alfred",male,32,1,0,3101278,15.85,,S -208,1,3,"Albimona, Mr. Nassef Cassem",male,26,0,0,2699,18.7875,,C -209,1,3,"Carr, Miss. Helen ""Ellen""",female,16,0,0,367231,7.75,,Q -210,1,1,"Blank, Mr. Henry",male,40,0,0,112277,31,A31,C -211,0,3,"Ali, Mr. Ahmed",male,24,0,0,SOTON/O.Q. 3101311,7.05,,S -212,1,2,"Cameron, Miss. Clear Annie",female,35,0,0,F.C.C. 13528,21,,S -213,0,3,"Perkin, Mr. John Henry",male,22,0,0,A/5 21174,7.25,,S -214,0,2,"Givard, Mr. Hans Kristensen",male,30,0,0,250646,13,,S -215,0,3,"Kiernan, Mr. Philip",male,,1,0,367229,7.75,,Q -216,1,1,"Newell, Miss. Madeleine",female,31,1,0,35273,113.275,D36,C -217,1,3,"Honkanen, Miss. Eliina",female,27,0,0,STON/O2. 3101283,7.925,,S -218,0,2,"Jacobsohn, Mr. Sidney Samuel",male,42,1,0,243847,27,,S -219,1,1,"Bazzani, Miss. Albina",female,32,0,0,11813,76.2917,D15,C -220,0,2,"Harris, Mr. Walter",male,30,0,0,W/C 14208,10.5,,S -221,1,3,"Sunderland, Mr. Victor Francis",male,16,0,0,SOTON/OQ 392089,8.05,,S -222,0,2,"Bracken, Mr. James H",male,27,0,0,220367,13,,S -223,0,3,"Green, Mr. George Henry",male,51,0,0,21440,8.05,,S -224,0,3,"Nenkoff, Mr. Christo",male,,0,0,349234,7.8958,,S -225,1,1,"Hoyt, Mr. Frederick Maxfield",male,38,1,0,19943,90,C93,S -226,0,3,"Berglund, Mr. Karl Ivar Sven",male,22,0,0,PP 4348,9.35,,S -227,1,2,"Mellors, Mr. William John",male,19,0,0,SW/PP 751,10.5,,S -228,0,3,"Lovell, Mr. John Hall (""Henry"")",male,20.5,0,0,A/5 21173,7.25,,S -229,0,2,"Fahlstrom, Mr. Arne Jonas",male,18,0,0,236171,13,,S -230,0,3,"Lefebre, Miss. Mathilde",female,,3,1,4133,25.4667,,S -231,1,1,"Harris, Mrs. Henry Birkhardt (Irene Wallach)",female,35,1,0,36973,83.475,C83,S -232,0,3,"Larsson, Mr. Bengt Edvin",male,29,0,0,347067,7.775,,S -233,0,2,"Sjostedt, Mr. Ernst Adolf",male,59,0,0,237442,13.5,,S -234,1,3,"Asplund, Miss. Lillian Gertrud",female,5,4,2,347077,31.3875,,S -235,0,2,"Leyson, Mr. Robert William Norman",male,24,0,0,C.A. 29566,10.5,,S -236,0,3,"Harknett, Miss. Alice Phoebe",female,,0,0,W./C. 6609,7.55,,S -237,0,2,"Hold, Mr. Stephen",male,44,1,0,26707,26,,S -238,1,2,"Collyer, Miss. Marjorie ""Lottie""",female,8,0,2,C.A. 31921,26.25,,S -239,0,2,"Pengelly, Mr. Frederick William",male,19,0,0,28665,10.5,,S -240,0,2,"Hunt, Mr. George Henry",male,33,0,0,SCO/W 1585,12.275,,S -241,0,3,"Zabour, Miss. Thamine",female,,1,0,2665,14.4542,,C -242,1,3,"Murphy, Miss. Katherine ""Kate""",female,,1,0,367230,15.5,,Q -243,0,2,"Coleridge, Mr. Reginald Charles",male,29,0,0,W./C. 14263,10.5,,S -244,0,3,"Maenpaa, Mr. Matti Alexanteri",male,22,0,0,STON/O 2. 3101275,7.125,,S -245,0,3,"Attalah, Mr. Sleiman",male,30,0,0,2694,7.225,,C -246,0,1,"Minahan, Dr. William Edward",male,44,2,0,19928,90,C78,Q -247,0,3,"Lindahl, Miss. Agda Thorilda Viktoria",female,25,0,0,347071,7.775,,S -248,1,2,"Hamalainen, Mrs. William (Anna)",female,24,0,2,250649,14.5,,S -249,1,1,"Beckwith, Mr. Richard Leonard",male,37,1,1,11751,52.5542,D35,S -250,0,2,"Carter, Rev. Ernest Courtenay",male,54,1,0,244252,26,,S -251,0,3,"Reed, Mr. James George",male,,0,0,362316,7.25,,S -252,0,3,"Strom, Mrs. Wilhelm (Elna Matilda Persson)",female,29,1,1,347054,10.4625,G6,S -253,0,1,"Stead, Mr. William Thomas",male,62,0,0,113514,26.55,C87,S -254,0,3,"Lobb, Mr. William Arthur",male,30,1,0,A/5. 3336,16.1,,S -255,0,3,"Rosblom, Mrs. Viktor (Helena Wilhelmina)",female,41,0,2,370129,20.2125,,S -256,1,3,"Touma, Mrs. Darwis (Hanne Youssef Razi)",female,29,0,2,2650,15.2458,,C -257,1,1,"Thorne, Mrs. Gertrude Maybelle",female,,0,0,PC 17585,79.2,,C -258,1,1,"Cherry, Miss. Gladys",female,30,0,0,110152,86.5,B77,S -259,1,1,"Ward, Miss. Anna",female,35,0,0,PC 17755,512.3292,,C -260,1,2,"Parrish, Mrs. (Lutie Davis)",female,50,0,1,230433,26,,S -261,0,3,"Smith, Mr. Thomas",male,,0,0,384461,7.75,,Q -262,1,3,"Asplund, Master. Edvin Rojj Felix",male,3,4,2,347077,31.3875,,S -263,0,1,"Taussig, Mr. Emil",male,52,1,1,110413,79.65,E67,S -264,0,1,"Harrison, Mr. William",male,40,0,0,112059,0,B94,S -265,0,3,"Henry, Miss. Delia",female,,0,0,382649,7.75,,Q -266,0,2,"Reeves, Mr. David",male,36,0,0,C.A. 17248,10.5,,S -267,0,3,"Panula, Mr. Ernesti Arvid",male,16,4,1,3101295,39.6875,,S -268,1,3,"Persson, Mr. Ernst Ulrik",male,25,1,0,347083,7.775,,S -269,1,1,"Graham, Mrs. William Thompson (Edith Junkins)",female,58,0,1,PC 17582,153.4625,C125,S -270,1,1,"Bissette, Miss. Amelia",female,35,0,0,PC 17760,135.6333,C99,S -271,0,1,"Cairns, Mr. Alexander",male,,0,0,113798,31,,S -272,1,3,"Tornquist, Mr. William Henry",male,25,0,0,LINE,0,,S -273,1,2,"Mellinger, Mrs. (Elizabeth Anne Maidment)",female,41,0,1,250644,19.5,,S -274,0,1,"Natsch, Mr. Charles H",male,37,0,1,PC 17596,29.7,C118,C -275,1,3,"Healy, Miss. Hanora ""Nora""",female,,0,0,370375,7.75,,Q -276,1,1,"Andrews, Miss. Kornelia Theodosia",female,63,1,0,13502,77.9583,D7,S -277,0,3,"Lindblom, Miss. Augusta Charlotta",female,45,0,0,347073,7.75,,S -278,0,2,"Parkes, Mr. Francis ""Frank""",male,,0,0,239853,0,,S -279,0,3,"Rice, Master. Eric",male,7,4,1,382652,29.125,,Q -280,1,3,"Abbott, Mrs. Stanton (Rosa Hunt)",female,35,1,1,C.A. 2673,20.25,,S -281,0,3,"Duane, Mr. Frank",male,65,0,0,336439,7.75,,Q -282,0,3,"Olsson, Mr. Nils Johan Goransson",male,28,0,0,347464,7.8542,,S -283,0,3,"de Pelsmaeker, Mr. Alfons",male,16,0,0,345778,9.5,,S -284,1,3,"Dorking, Mr. Edward Arthur",male,19,0,0,A/5. 10482,8.05,,S -285,0,1,"Smith, Mr. Richard William",male,,0,0,113056,26,A19,S -286,0,3,"Stankovic, Mr. Ivan",male,33,0,0,349239,8.6625,,C -287,1,3,"de Mulder, Mr. Theodore",male,30,0,0,345774,9.5,,S -288,0,3,"Naidenoff, Mr. Penko",male,22,0,0,349206,7.8958,,S -289,1,2,"Hosono, Mr. Masabumi",male,42,0,0,237798,13,,S -290,1,3,"Connolly, Miss. Kate",female,22,0,0,370373,7.75,,Q -291,1,1,"Barber, Miss. Ellen ""Nellie""",female,26,0,0,19877,78.85,,S -292,1,1,"Bishop, Mrs. Dickinson H (Helen Walton)",female,19,1,0,11967,91.0792,B49,C -293,0,2,"Levy, Mr. Rene Jacques",male,36,0,0,SC/Paris 2163,12.875,D,C -294,0,3,"Haas, Miss. Aloisia",female,24,0,0,349236,8.85,,S -295,0,3,"Mineff, Mr. Ivan",male,24,0,0,349233,7.8958,,S -296,0,1,"Lewy, Mr. Ervin G",male,,0,0,PC 17612,27.7208,,C -297,0,3,"Hanna, Mr. Mansour",male,23.5,0,0,2693,7.2292,,C -298,0,1,"Allison, Miss. Helen Loraine",female,2,1,2,113781,151.55,C22 C26,S -299,1,1,"Saalfeld, Mr. Adolphe",male,,0,0,19988,30.5,C106,S -300,1,1,"Baxter, Mrs. James (Helene DeLaudeniere Chaput)",female,50,0,1,PC 17558,247.5208,B58 B60,C -301,1,3,"Kelly, Miss. Anna Katherine ""Annie Kate""",female,,0,0,9234,7.75,,Q -302,1,3,"McCoy, Mr. Bernard",male,,2,0,367226,23.25,,Q -303,0,3,"Johnson, Mr. William Cahoone Jr",male,19,0,0,LINE,0,,S -304,1,2,"Keane, Miss. Nora A",female,,0,0,226593,12.35,E101,Q -305,0,3,"Williams, Mr. Howard Hugh ""Harry""",male,,0,0,A/5 2466,8.05,,S -306,1,1,"Allison, Master. Hudson Trevor",male,0.92,1,2,113781,151.55,C22 C26,S -307,1,1,"Fleming, Miss. Margaret",female,,0,0,17421,110.8833,,C -308,1,1,"Penasco y Castellana, Mrs. Victor de Satode (Maria Josefa Perez de Soto y Vallejo)",female,17,1,0,PC 17758,108.9,C65,C -309,0,2,"Abelson, Mr. Samuel",male,30,1,0,P/PP 3381,24,,C -310,1,1,"Francatelli, Miss. Laura Mabel",female,30,0,0,PC 17485,56.9292,E36,C -311,1,1,"Hays, Miss. Margaret Bechstein",female,24,0,0,11767,83.1583,C54,C -312,1,1,"Ryerson, Miss. Emily Borie",female,18,2,2,PC 17608,262.375,B57 B59 B63 B66,C -313,0,2,"Lahtinen, Mrs. William (Anna Sylfven)",female,26,1,1,250651,26,,S -314,0,3,"Hendekovic, Mr. Ignjac",male,28,0,0,349243,7.8958,,S -315,0,2,"Hart, Mr. Benjamin",male,43,1,1,F.C.C. 13529,26.25,,S -316,1,3,"Nilsson, Miss. Helmina Josefina",female,26,0,0,347470,7.8542,,S -317,1,2,"Kantor, Mrs. Sinai (Miriam Sternin)",female,24,1,0,244367,26,,S -318,0,2,"Moraweck, Dr. Ernest",male,54,0,0,29011,14,,S -319,1,1,"Wick, Miss. Mary Natalie",female,31,0,2,36928,164.8667,C7,S -320,1,1,"Spedden, Mrs. Frederic Oakley (Margaretta Corning Stone)",female,40,1,1,16966,134.5,E34,C -321,0,3,"Dennis, Mr. Samuel",male,22,0,0,A/5 21172,7.25,,S -322,0,3,"Danoff, Mr. Yoto",male,27,0,0,349219,7.8958,,S -323,1,2,"Slayter, Miss. Hilda Mary",female,30,0,0,234818,12.35,,Q -324,1,2,"Caldwell, Mrs. Albert Francis (Sylvia Mae Harbaugh)",female,22,1,1,248738,29,,S -325,0,3,"Sage, Mr. George John Jr",male,,8,2,CA. 2343,69.55,,S -326,1,1,"Young, Miss. Marie Grice",female,36,0,0,PC 17760,135.6333,C32,C -327,0,3,"Nysveen, Mr. Johan Hansen",male,61,0,0,345364,6.2375,,S -328,1,2,"Ball, Mrs. (Ada E Hall)",female,36,0,0,28551,13,D,S -329,1,3,"Goldsmith, Mrs. Frank John (Emily Alice Brown)",female,31,1,1,363291,20.525,,S -330,1,1,"Hippach, Miss. Jean Gertrude",female,16,0,1,111361,57.9792,B18,C -331,1,3,"McCoy, Miss. Agnes",female,,2,0,367226,23.25,,Q -332,0,1,"Partner, Mr. Austen",male,45.5,0,0,113043,28.5,C124,S -333,0,1,"Graham, Mr. George Edward",male,38,0,1,PC 17582,153.4625,C91,S -334,0,3,"Vander Planke, Mr. Leo Edmondus",male,16,2,0,345764,18,,S -335,1,1,"Frauenthal, Mrs. Henry William (Clara Heinsheimer)",female,,1,0,PC 17611,133.65,,S -336,0,3,"Denkoff, Mr. Mitto",male,,0,0,349225,7.8958,,S -337,0,1,"Pears, Mr. Thomas Clinton",male,29,1,0,113776,66.6,C2,S -338,1,1,"Burns, Miss. Elizabeth Margaret",female,41,0,0,16966,134.5,E40,C -339,1,3,"Dahl, Mr. Karl Edwart",male,45,0,0,7598,8.05,,S -340,0,1,"Blackwell, Mr. Stephen Weart",male,45,0,0,113784,35.5,T,S -341,1,2,"Navratil, Master. Edmond Roger",male,2,1,1,230080,26,F2,S -342,1,1,"Fortune, Miss. Alice Elizabeth",female,24,3,2,19950,263,C23 C25 C27,S -343,0,2,"Collander, Mr. Erik Gustaf",male,28,0,0,248740,13,,S -344,0,2,"Sedgwick, Mr. Charles Frederick Waddington",male,25,0,0,244361,13,,S -345,0,2,"Fox, Mr. Stanley Hubert",male,36,0,0,229236,13,,S -346,1,2,"Brown, Miss. Amelia ""Mildred""",female,24,0,0,248733,13,F33,S -347,1,2,"Smith, Miss. Marion Elsie",female,40,0,0,31418,13,,S -348,1,3,"Davison, Mrs. Thomas Henry (Mary E Finck)",female,,1,0,386525,16.1,,S -349,1,3,"Coutts, Master. William Loch ""William""",male,3,1,1,C.A. 37671,15.9,,S -350,0,3,"Dimic, Mr. Jovan",male,42,0,0,315088,8.6625,,S -351,0,3,"Odahl, Mr. Nils Martin",male,23,0,0,7267,9.225,,S -352,0,1,"Williams-Lambert, Mr. Fletcher Fellows",male,,0,0,113510,35,C128,S -353,0,3,"Elias, Mr. Tannous",male,15,1,1,2695,7.2292,,C -354,0,3,"Arnold-Franchi, Mr. Josef",male,25,1,0,349237,17.8,,S -355,0,3,"Yousif, Mr. Wazli",male,,0,0,2647,7.225,,C -356,0,3,"Vanden Steen, Mr. Leo Peter",male,28,0,0,345783,9.5,,S -357,1,1,"Bowerman, Miss. Elsie Edith",female,22,0,1,113505,55,E33,S -358,0,2,"Funk, Miss. Annie Clemmer",female,38,0,0,237671,13,,S -359,1,3,"McGovern, Miss. Mary",female,,0,0,330931,7.8792,,Q -360,1,3,"Mockler, Miss. Helen Mary ""Ellie""",female,,0,0,330980,7.8792,,Q -361,0,3,"Skoog, Mr. Wilhelm",male,40,1,4,347088,27.9,,S -362,0,2,"del Carlo, Mr. Sebastiano",male,29,1,0,SC/PARIS 2167,27.7208,,C -363,0,3,"Barbara, Mrs. (Catherine David)",female,45,0,1,2691,14.4542,,C -364,0,3,"Asim, Mr. Adola",male,35,0,0,SOTON/O.Q. 3101310,7.05,,S -365,0,3,"O'Brien, Mr. Thomas",male,,1,0,370365,15.5,,Q -366,0,3,"Adahl, Mr. Mauritz Nils Martin",male,30,0,0,C 7076,7.25,,S -367,1,1,"Warren, Mrs. Frank Manley (Anna Sophia Atkinson)",female,60,1,0,110813,75.25,D37,C -368,1,3,"Moussa, Mrs. (Mantoura Boulos)",female,,0,0,2626,7.2292,,C -369,1,3,"Jermyn, Miss. Annie",female,,0,0,14313,7.75,,Q -370,1,1,"Aubart, Mme. Leontine Pauline",female,24,0,0,PC 17477,69.3,B35,C -371,1,1,"Harder, Mr. George Achilles",male,25,1,0,11765,55.4417,E50,C -372,0,3,"Wiklund, Mr. Jakob Alfred",male,18,1,0,3101267,6.4958,,S -373,0,3,"Beavan, Mr. William Thomas",male,19,0,0,323951,8.05,,S -374,0,1,"Ringhini, Mr. Sante",male,22,0,0,PC 17760,135.6333,,C -375,0,3,"Palsson, Miss. Stina Viola",female,3,3,1,349909,21.075,,S -376,1,1,"Meyer, Mrs. Edgar Joseph (Leila Saks)",female,,1,0,PC 17604,82.1708,,C -377,1,3,"Landergren, Miss. Aurora Adelia",female,22,0,0,C 7077,7.25,,S -378,0,1,"Widener, Mr. Harry Elkins",male,27,0,2,113503,211.5,C82,C -379,0,3,"Betros, Mr. Tannous",male,20,0,0,2648,4.0125,,C -380,0,3,"Gustafsson, Mr. Karl Gideon",male,19,0,0,347069,7.775,,S -381,1,1,"Bidois, Miss. Rosalie",female,42,0,0,PC 17757,227.525,,C -382,1,3,"Nakid, Miss. Maria (""Mary"")",female,1,0,2,2653,15.7417,,C -383,0,3,"Tikkanen, Mr. Juho",male,32,0,0,STON/O 2. 3101293,7.925,,S -384,1,1,"Holverson, Mrs. Alexander Oskar (Mary Aline Towner)",female,35,1,0,113789,52,,S -385,0,3,"Plotcharsky, Mr. Vasil",male,,0,0,349227,7.8958,,S -386,0,2,"Davies, Mr. Charles Henry",male,18,0,0,S.O.C. 14879,73.5,,S -387,0,3,"Goodwin, Master. Sidney Leonard",male,1,5,2,CA 2144,46.9,,S -388,1,2,"Buss, Miss. Kate",female,36,0,0,27849,13,,S -389,0,3,"Sadlier, Mr. Matthew",male,,0,0,367655,7.7292,,Q -390,1,2,"Lehmann, Miss. Bertha",female,17,0,0,SC 1748,12,,C -391,1,1,"Carter, Mr. William Ernest",male,36,1,2,113760,120,B96 B98,S -392,1,3,"Jansson, Mr. Carl Olof",male,21,0,0,350034,7.7958,,S -393,0,3,"Gustafsson, Mr. Johan Birger",male,28,2,0,3101277,7.925,,S -394,1,1,"Newell, Miss. Marjorie",female,23,1,0,35273,113.275,D36,C -395,1,3,"Sandstrom, Mrs. Hjalmar (Agnes Charlotta Bengtsson)",female,24,0,2,PP 9549,16.7,G6,S -396,0,3,"Johansson, Mr. Erik",male,22,0,0,350052,7.7958,,S -397,0,3,"Olsson, Miss. Elina",female,31,0,0,350407,7.8542,,S -398,0,2,"McKane, Mr. Peter David",male,46,0,0,28403,26,,S -399,0,2,"Pain, Dr. Alfred",male,23,0,0,244278,10.5,,S -400,1,2,"Trout, Mrs. William H (Jessie L)",female,28,0,0,240929,12.65,,S -401,1,3,"Niskanen, Mr. Juha",male,39,0,0,STON/O 2. 3101289,7.925,,S -402,0,3,"Adams, Mr. John",male,26,0,0,341826,8.05,,S -403,0,3,"Jussila, Miss. Mari Aina",female,21,1,0,4137,9.825,,S -404,0,3,"Hakkarainen, Mr. Pekka Pietari",male,28,1,0,STON/O2. 3101279,15.85,,S -405,0,3,"Oreskovic, Miss. Marija",female,20,0,0,315096,8.6625,,S -406,0,2,"Gale, Mr. Shadrach",male,34,1,0,28664,21,,S -407,0,3,"Widegren, Mr. Carl/Charles Peter",male,51,0,0,347064,7.75,,S -408,1,2,"Richards, Master. William Rowe",male,3,1,1,29106,18.75,,S -409,0,3,"Birkeland, Mr. Hans Martin Monsen",male,21,0,0,312992,7.775,,S -410,0,3,"Lefebre, Miss. Ida",female,,3,1,4133,25.4667,,S -411,0,3,"Sdycoff, Mr. Todor",male,,0,0,349222,7.8958,,S -412,0,3,"Hart, Mr. Henry",male,,0,0,394140,6.8583,,Q -413,1,1,"Minahan, Miss. Daisy E",female,33,1,0,19928,90,C78,Q -414,0,2,"Cunningham, Mr. Alfred Fleming",male,,0,0,239853,0,,S -415,1,3,"Sundman, Mr. Johan Julian",male,44,0,0,STON/O 2. 3101269,7.925,,S -416,0,3,"Meek, Mrs. Thomas (Annie Louise Rowley)",female,,0,0,343095,8.05,,S -417,1,2,"Drew, Mrs. James Vivian (Lulu Thorne Christian)",female,34,1,1,28220,32.5,,S -418,1,2,"Silven, Miss. Lyyli Karoliina",female,18,0,2,250652,13,,S -419,0,2,"Matthews, Mr. William John",male,30,0,0,28228,13,,S -420,0,3,"Van Impe, Miss. Catharina",female,10,0,2,345773,24.15,,S -421,0,3,"Gheorgheff, Mr. Stanio",male,,0,0,349254,7.8958,,C -422,0,3,"Charters, Mr. David",male,21,0,0,A/5. 13032,7.7333,,Q -423,0,3,"Zimmerman, Mr. Leo",male,29,0,0,315082,7.875,,S -424,0,3,"Danbom, Mrs. Ernst Gilbert (Anna Sigrid Maria Brogren)",female,28,1,1,347080,14.4,,S -425,0,3,"Rosblom, Mr. Viktor Richard",male,18,1,1,370129,20.2125,,S -426,0,3,"Wiseman, Mr. Phillippe",male,,0,0,A/4. 34244,7.25,,S -427,1,2,"Clarke, Mrs. Charles V (Ada Maria Winfield)",female,28,1,0,2003,26,,S -428,1,2,"Phillips, Miss. Kate Florence (""Mrs Kate Louise Phillips Marshall"")",female,19,0,0,250655,26,,S -429,0,3,"Flynn, Mr. James",male,,0,0,364851,7.75,,Q -430,1,3,"Pickard, Mr. Berk (Berk Trembisky)",male,32,0,0,SOTON/O.Q. 392078,8.05,E10,S -431,1,1,"Bjornstrom-Steffansson, Mr. Mauritz Hakan",male,28,0,0,110564,26.55,C52,S -432,1,3,"Thorneycroft, Mrs. Percival (Florence Kate White)",female,,1,0,376564,16.1,,S -433,1,2,"Louch, Mrs. Charles Alexander (Alice Adelaide Slow)",female,42,1,0,SC/AH 3085,26,,S -434,0,3,"Kallio, Mr. Nikolai Erland",male,17,0,0,STON/O 2. 3101274,7.125,,S -435,0,1,"Silvey, Mr. William Baird",male,50,1,0,13507,55.9,E44,S -436,1,1,"Carter, Miss. Lucile Polk",female,14,1,2,113760,120,B96 B98,S -437,0,3,"Ford, Miss. Doolina Margaret ""Daisy""",female,21,2,2,W./C. 6608,34.375,,S -438,1,2,"Richards, Mrs. Sidney (Emily Hocking)",female,24,2,3,29106,18.75,,S -439,0,1,"Fortune, Mr. Mark",male,64,1,4,19950,263,C23 C25 C27,S -440,0,2,"Kvillner, Mr. Johan Henrik Johannesson",male,31,0,0,C.A. 18723,10.5,,S -441,1,2,"Hart, Mrs. Benjamin (Esther Ada Bloomfield)",female,45,1,1,F.C.C. 13529,26.25,,S -442,0,3,"Hampe, Mr. Leon",male,20,0,0,345769,9.5,,S -443,0,3,"Petterson, Mr. Johan Emil",male,25,1,0,347076,7.775,,S -444,1,2,"Reynaldo, Ms. Encarnacion",female,28,0,0,230434,13,,S -445,1,3,"Johannesen-Bratthammer, Mr. Bernt",male,,0,0,65306,8.1125,,S -446,1,1,"Dodge, Master. Washington",male,4,0,2,33638,81.8583,A34,S -447,1,2,"Mellinger, Miss. Madeleine Violet",female,13,0,1,250644,19.5,,S -448,1,1,"Seward, Mr. Frederic Kimber",male,34,0,0,113794,26.55,,S -449,1,3,"Baclini, Miss. Marie Catherine",female,5,2,1,2666,19.2583,,C -450,1,1,"Peuchen, Major. Arthur Godfrey",male,52,0,0,113786,30.5,C104,S -451,0,2,"West, Mr. Edwy Arthur",male,36,1,2,C.A. 34651,27.75,,S -452,0,3,"Hagland, Mr. Ingvald Olai Olsen",male,,1,0,65303,19.9667,,S -453,0,1,"Foreman, Mr. Benjamin Laventall",male,30,0,0,113051,27.75,C111,C -454,1,1,"Goldenberg, Mr. Samuel L",male,49,1,0,17453,89.1042,C92,C -455,0,3,"Peduzzi, Mr. Joseph",male,,0,0,A/5 2817,8.05,,S -456,1,3,"Jalsevac, Mr. Ivan",male,29,0,0,349240,7.8958,,C -457,0,1,"Millet, Mr. Francis Davis",male,65,0,0,13509,26.55,E38,S -458,1,1,"Kenyon, Mrs. Frederick R (Marion)",female,,1,0,17464,51.8625,D21,S -459,1,2,"Toomey, Miss. Ellen",female,50,0,0,F.C.C. 13531,10.5,,S -460,0,3,"O'Connor, Mr. Maurice",male,,0,0,371060,7.75,,Q -461,1,1,"Anderson, Mr. Harry",male,48,0,0,19952,26.55,E12,S -462,0,3,"Morley, Mr. William",male,34,0,0,364506,8.05,,S -463,0,1,"Gee, Mr. Arthur H",male,47,0,0,111320,38.5,E63,S -464,0,2,"Milling, Mr. Jacob Christian",male,48,0,0,234360,13,,S -465,0,3,"Maisner, Mr. Simon",male,,0,0,A/S 2816,8.05,,S -466,0,3,"Goncalves, Mr. Manuel Estanslas",male,38,0,0,SOTON/O.Q. 3101306,7.05,,S -467,0,2,"Campbell, Mr. William",male,,0,0,239853,0,,S -468,0,1,"Smart, Mr. John Montgomery",male,56,0,0,113792,26.55,,S -469,0,3,"Scanlan, Mr. James",male,,0,0,36209,7.725,,Q -470,1,3,"Baclini, Miss. Helene Barbara",female,0.75,2,1,2666,19.2583,,C -471,0,3,"Keefe, Mr. Arthur",male,,0,0,323592,7.25,,S -472,0,3,"Cacic, Mr. Luka",male,38,0,0,315089,8.6625,,S -473,1,2,"West, Mrs. Edwy Arthur (Ada Mary Worth)",female,33,1,2,C.A. 34651,27.75,,S -474,1,2,"Jerwan, Mrs. Amin S (Marie Marthe Thuillard)",female,23,0,0,SC/AH Basle 541,13.7917,D,C -475,0,3,"Strandberg, Miss. Ida Sofia",female,22,0,0,7553,9.8375,,S -476,0,1,"Clifford, Mr. George Quincy",male,,0,0,110465,52,A14,S -477,0,2,"Renouf, Mr. Peter Henry",male,34,1,0,31027,21,,S -478,0,3,"Braund, Mr. Lewis Richard",male,29,1,0,3460,7.0458,,S -479,0,3,"Karlsson, Mr. Nils August",male,22,0,0,350060,7.5208,,S -480,1,3,"Hirvonen, Miss. Hildur E",female,2,0,1,3101298,12.2875,,S -481,0,3,"Goodwin, Master. Harold Victor",male,9,5,2,CA 2144,46.9,,S -482,0,2,"Frost, Mr. Anthony Wood ""Archie""",male,,0,0,239854,0,,S -483,0,3,"Rouse, Mr. Richard Henry",male,50,0,0,A/5 3594,8.05,,S -484,1,3,"Turkula, Mrs. (Hedwig)",female,63,0,0,4134,9.5875,,S -485,1,1,"Bishop, Mr. Dickinson H",male,25,1,0,11967,91.0792,B49,C -486,0,3,"Lefebre, Miss. Jeannie",female,,3,1,4133,25.4667,,S -487,1,1,"Hoyt, Mrs. Frederick Maxfield (Jane Anne Forby)",female,35,1,0,19943,90,C93,S -488,0,1,"Kent, Mr. Edward Austin",male,58,0,0,11771,29.7,B37,C -489,0,3,"Somerton, Mr. Francis William",male,30,0,0,A.5. 18509,8.05,,S -490,1,3,"Coutts, Master. Eden Leslie ""Neville""",male,9,1,1,C.A. 37671,15.9,,S -491,0,3,"Hagland, Mr. Konrad Mathias Reiersen",male,,1,0,65304,19.9667,,S -492,0,3,"Windelov, Mr. Einar",male,21,0,0,SOTON/OQ 3101317,7.25,,S -493,0,1,"Molson, Mr. Harry Markland",male,55,0,0,113787,30.5,C30,S -494,0,1,"Artagaveytia, Mr. Ramon",male,71,0,0,PC 17609,49.5042,,C -495,0,3,"Stanley, Mr. Edward Roland",male,21,0,0,A/4 45380,8.05,,S -496,0,3,"Yousseff, Mr. Gerious",male,,0,0,2627,14.4583,,C -497,1,1,"Eustis, Miss. Elizabeth Mussey",female,54,1,0,36947,78.2667,D20,C -498,0,3,"Shellard, Mr. Frederick William",male,,0,0,C.A. 6212,15.1,,S -499,0,1,"Allison, Mrs. Hudson J C (Bessie Waldo Daniels)",female,25,1,2,113781,151.55,C22 C26,S -500,0,3,"Svensson, Mr. Olof",male,24,0,0,350035,7.7958,,S -501,0,3,"Calic, Mr. Petar",male,17,0,0,315086,8.6625,,S -502,0,3,"Canavan, Miss. Mary",female,21,0,0,364846,7.75,,Q -503,0,3,"O'Sullivan, Miss. Bridget Mary",female,,0,0,330909,7.6292,,Q -504,0,3,"Laitinen, Miss. Kristina Sofia",female,37,0,0,4135,9.5875,,S -505,1,1,"Maioni, Miss. Roberta",female,16,0,0,110152,86.5,B79,S -506,0,1,"Penasco y Castellana, Mr. Victor de Satode",male,18,1,0,PC 17758,108.9,C65,C -507,1,2,"Quick, Mrs. Frederick Charles (Jane Richards)",female,33,0,2,26360,26,,S -508,1,1,"Bradley, Mr. George (""George Arthur Brayton"")",male,,0,0,111427,26.55,,S -509,0,3,"Olsen, Mr. Henry Margido",male,28,0,0,C 4001,22.525,,S -510,1,3,"Lang, Mr. Fang",male,26,0,0,1601,56.4958,,S -511,1,3,"Daly, Mr. Eugene Patrick",male,29,0,0,382651,7.75,,Q -512,0,3,"Webber, Mr. James",male,,0,0,SOTON/OQ 3101316,8.05,,S -513,1,1,"McGough, Mr. James Robert",male,36,0,0,PC 17473,26.2875,E25,S -514,1,1,"Rothschild, Mrs. Martin (Elizabeth L. Barrett)",female,54,1,0,PC 17603,59.4,,C -515,0,3,"Coleff, Mr. Satio",male,24,0,0,349209,7.4958,,S -516,0,1,"Walker, Mr. William Anderson",male,47,0,0,36967,34.0208,D46,S -517,1,2,"Lemore, Mrs. (Amelia Milley)",female,34,0,0,C.A. 34260,10.5,F33,S -518,0,3,"Ryan, Mr. Patrick",male,,0,0,371110,24.15,,Q -519,1,2,"Angle, Mrs. William A (Florence ""Mary"" Agnes Hughes)",female,36,1,0,226875,26,,S -520,0,3,"Pavlovic, Mr. Stefo",male,32,0,0,349242,7.8958,,S -521,1,1,"Perreault, Miss. Anne",female,30,0,0,12749,93.5,B73,S -522,0,3,"Vovk, Mr. Janko",male,22,0,0,349252,7.8958,,S -523,0,3,"Lahoud, Mr. Sarkis",male,,0,0,2624,7.225,,C -524,1,1,"Hippach, Mrs. Louis Albert (Ida Sophia Fischer)",female,44,0,1,111361,57.9792,B18,C -525,0,3,"Kassem, Mr. Fared",male,,0,0,2700,7.2292,,C -526,0,3,"Farrell, Mr. James",male,40.5,0,0,367232,7.75,,Q -527,1,2,"Ridsdale, Miss. Lucy",female,50,0,0,W./C. 14258,10.5,,S -528,0,1,"Farthing, Mr. John",male,,0,0,PC 17483,221.7792,C95,S -529,0,3,"Salonen, Mr. Johan Werner",male,39,0,0,3101296,7.925,,S -530,0,2,"Hocking, Mr. Richard George",male,23,2,1,29104,11.5,,S -531,1,2,"Quick, Miss. Phyllis May",female,2,1,1,26360,26,,S -532,0,3,"Toufik, Mr. Nakli",male,,0,0,2641,7.2292,,C -533,0,3,"Elias, Mr. Joseph Jr",male,17,1,1,2690,7.2292,,C -534,1,3,"Peter, Mrs. Catherine (Catherine Rizk)",female,,0,2,2668,22.3583,,C -535,0,3,"Cacic, Miss. Marija",female,30,0,0,315084,8.6625,,S -536,1,2,"Hart, Miss. Eva Miriam",female,7,0,2,F.C.C. 13529,26.25,,S -537,0,1,"Butt, Major. Archibald Willingham",male,45,0,0,113050,26.55,B38,S -538,1,1,"LeRoy, Miss. Bertha",female,30,0,0,PC 17761,106.425,,C -539,0,3,"Risien, Mr. Samuel Beard",male,,0,0,364498,14.5,,S -540,1,1,"Frolicher, Miss. Hedwig Margaritha",female,22,0,2,13568,49.5,B39,C -541,1,1,"Crosby, Miss. Harriet R",female,36,0,2,WE/P 5735,71,B22,S -542,0,3,"Andersson, Miss. Ingeborg Constanzia",female,9,4,2,347082,31.275,,S -543,0,3,"Andersson, Miss. Sigrid Elisabeth",female,11,4,2,347082,31.275,,S -544,1,2,"Beane, Mr. Edward",male,32,1,0,2908,26,,S -545,0,1,"Douglas, Mr. Walter Donald",male,50,1,0,PC 17761,106.425,C86,C -546,0,1,"Nicholson, Mr. Arthur Ernest",male,64,0,0,693,26,,S -547,1,2,"Beane, Mrs. Edward (Ethel Clarke)",female,19,1,0,2908,26,,S -548,1,2,"Padro y Manent, Mr. Julian",male,,0,0,SC/PARIS 2146,13.8625,,C -549,0,3,"Goldsmith, Mr. Frank John",male,33,1,1,363291,20.525,,S -550,1,2,"Davies, Master. John Morgan Jr",male,8,1,1,C.A. 33112,36.75,,S -551,1,1,"Thayer, Mr. John Borland Jr",male,17,0,2,17421,110.8833,C70,C -552,0,2,"Sharp, Mr. Percival James R",male,27,0,0,244358,26,,S -553,0,3,"O'Brien, Mr. Timothy",male,,0,0,330979,7.8292,,Q -554,1,3,"Leeni, Mr. Fahim (""Philip Zenni"")",male,22,0,0,2620,7.225,,C -555,1,3,"Ohman, Miss. Velin",female,22,0,0,347085,7.775,,S -556,0,1,"Wright, Mr. George",male,62,0,0,113807,26.55,,S -557,1,1,"Duff Gordon, Lady. (Lucille Christiana Sutherland) (""Mrs Morgan"")",female,48,1,0,11755,39.6,A16,C -558,0,1,"Robbins, Mr. Victor",male,,0,0,PC 17757,227.525,,C -559,1,1,"Taussig, Mrs. Emil (Tillie Mandelbaum)",female,39,1,1,110413,79.65,E67,S -560,1,3,"de Messemaeker, Mrs. Guillaume Joseph (Emma)",female,36,1,0,345572,17.4,,S -561,0,3,"Morrow, Mr. Thomas Rowan",male,,0,0,372622,7.75,,Q -562,0,3,"Sivic, Mr. Husein",male,40,0,0,349251,7.8958,,S -563,0,2,"Norman, Mr. Robert Douglas",male,28,0,0,218629,13.5,,S -564,0,3,"Simmons, Mr. John",male,,0,0,SOTON/OQ 392082,8.05,,S -565,0,3,"Meanwell, Miss. (Marion Ogden)",female,,0,0,SOTON/O.Q. 392087,8.05,,S -566,0,3,"Davies, Mr. Alfred J",male,24,2,0,A/4 48871,24.15,,S -567,0,3,"Stoytcheff, Mr. Ilia",male,19,0,0,349205,7.8958,,S -568,0,3,"Palsson, Mrs. Nils (Alma Cornelia Berglund)",female,29,0,4,349909,21.075,,S -569,0,3,"Doharr, Mr. Tannous",male,,0,0,2686,7.2292,,C -570,1,3,"Jonsson, Mr. Carl",male,32,0,0,350417,7.8542,,S -571,1,2,"Harris, Mr. George",male,62,0,0,S.W./PP 752,10.5,,S -572,1,1,"Appleton, Mrs. Edward Dale (Charlotte Lamson)",female,53,2,0,11769,51.4792,C101,S -573,1,1,"Flynn, Mr. John Irwin (""Irving"")",male,36,0,0,PC 17474,26.3875,E25,S -574,1,3,"Kelly, Miss. Mary",female,,0,0,14312,7.75,,Q -575,0,3,"Rush, Mr. Alfred George John",male,16,0,0,A/4. 20589,8.05,,S -576,0,3,"Patchett, Mr. George",male,19,0,0,358585,14.5,,S -577,1,2,"Garside, Miss. Ethel",female,34,0,0,243880,13,,S -578,1,1,"Silvey, Mrs. William Baird (Alice Munger)",female,39,1,0,13507,55.9,E44,S -579,0,3,"Caram, Mrs. Joseph (Maria Elias)",female,,1,0,2689,14.4583,,C -580,1,3,"Jussila, Mr. Eiriik",male,32,0,0,STON/O 2. 3101286,7.925,,S -581,1,2,"Christy, Miss. Julie Rachel",female,25,1,1,237789,30,,S -582,1,1,"Thayer, Mrs. John Borland (Marian Longstreth Morris)",female,39,1,1,17421,110.8833,C68,C -583,0,2,"Downton, Mr. William James",male,54,0,0,28403,26,,S -584,0,1,"Ross, Mr. John Hugo",male,36,0,0,13049,40.125,A10,C -585,0,3,"Paulner, Mr. Uscher",male,,0,0,3411,8.7125,,C -586,1,1,"Taussig, Miss. Ruth",female,18,0,2,110413,79.65,E68,S -587,0,2,"Jarvis, Mr. John Denzil",male,47,0,0,237565,15,,S -588,1,1,"Frolicher-Stehli, Mr. Maxmillian",male,60,1,1,13567,79.2,B41,C -589,0,3,"Gilinski, Mr. Eliezer",male,22,0,0,14973,8.05,,S -590,0,3,"Murdlin, Mr. Joseph",male,,0,0,A./5. 3235,8.05,,S -591,0,3,"Rintamaki, Mr. Matti",male,35,0,0,STON/O 2. 3101273,7.125,,S -592,1,1,"Stephenson, Mrs. Walter Bertram (Martha Eustis)",female,52,1,0,36947,78.2667,D20,C -593,0,3,"Elsbury, Mr. William James",male,47,0,0,A/5 3902,7.25,,S -594,0,3,"Bourke, Miss. Mary",female,,0,2,364848,7.75,,Q -595,0,2,"Chapman, Mr. John Henry",male,37,1,0,SC/AH 29037,26,,S -596,0,3,"Van Impe, Mr. Jean Baptiste",male,36,1,1,345773,24.15,,S -597,1,2,"Leitch, Miss. Jessie Wills",female,,0,0,248727,33,,S -598,0,3,"Johnson, Mr. Alfred",male,49,0,0,LINE,0,,S -599,0,3,"Boulos, Mr. Hanna",male,,0,0,2664,7.225,,C -600,1,1,"Duff Gordon, Sir. Cosmo Edmund (""Mr Morgan"")",male,49,1,0,PC 17485,56.9292,A20,C -601,1,2,"Jacobsohn, Mrs. Sidney Samuel (Amy Frances Christy)",female,24,2,1,243847,27,,S -602,0,3,"Slabenoff, Mr. Petco",male,,0,0,349214,7.8958,,S -603,0,1,"Harrington, Mr. Charles H",male,,0,0,113796,42.4,,S -604,0,3,"Torber, Mr. Ernst William",male,44,0,0,364511,8.05,,S -605,1,1,"Homer, Mr. Harry (""Mr E Haven"")",male,35,0,0,111426,26.55,,C -606,0,3,"Lindell, Mr. Edvard Bengtsson",male,36,1,0,349910,15.55,,S -607,0,3,"Karaic, Mr. Milan",male,30,0,0,349246,7.8958,,S -608,1,1,"Daniel, Mr. Robert Williams",male,27,0,0,113804,30.5,,S -609,1,2,"Laroche, Mrs. Joseph (Juliette Marie Louise Lafargue)",female,22,1,2,SC/Paris 2123,41.5792,,C -610,1,1,"Shutes, Miss. Elizabeth W",female,40,0,0,PC 17582,153.4625,C125,S -611,0,3,"Andersson, Mrs. Anders Johan (Alfrida Konstantia Brogren)",female,39,1,5,347082,31.275,,S -612,0,3,"Jardin, Mr. Jose Neto",male,,0,0,SOTON/O.Q. 3101305,7.05,,S -613,1,3,"Murphy, Miss. Margaret Jane",female,,1,0,367230,15.5,,Q -614,0,3,"Horgan, Mr. John",male,,0,0,370377,7.75,,Q -615,0,3,"Brocklebank, Mr. William Alfred",male,35,0,0,364512,8.05,,S -616,1,2,"Herman, Miss. Alice",female,24,1,2,220845,65,,S -617,0,3,"Danbom, Mr. Ernst Gilbert",male,34,1,1,347080,14.4,,S -618,0,3,"Lobb, Mrs. William Arthur (Cordelia K Stanlick)",female,26,1,0,A/5. 3336,16.1,,S -619,1,2,"Becker, Miss. Marion Louise",female,4,2,1,230136,39,F4,S -620,0,2,"Gavey, Mr. Lawrence",male,26,0,0,31028,10.5,,S -621,0,3,"Yasbeck, Mr. Antoni",male,27,1,0,2659,14.4542,,C -622,1,1,"Kimball, Mr. Edwin Nelson Jr",male,42,1,0,11753,52.5542,D19,S -623,1,3,"Nakid, Mr. Sahid",male,20,1,1,2653,15.7417,,C -624,0,3,"Hansen, Mr. Henry Damsgaard",male,21,0,0,350029,7.8542,,S -625,0,3,"Bowen, Mr. David John ""Dai""",male,21,0,0,54636,16.1,,S -626,0,1,"Sutton, Mr. Frederick",male,61,0,0,36963,32.3208,D50,S -627,0,2,"Kirkland, Rev. Charles Leonard",male,57,0,0,219533,12.35,,Q -628,1,1,"Longley, Miss. Gretchen Fiske",female,21,0,0,13502,77.9583,D9,S -629,0,3,"Bostandyeff, Mr. Guentcho",male,26,0,0,349224,7.8958,,S -630,0,3,"O'Connell, Mr. Patrick D",male,,0,0,334912,7.7333,,Q -631,1,1,"Barkworth, Mr. Algernon Henry Wilson",male,80,0,0,27042,30,A23,S -632,0,3,"Lundahl, Mr. Johan Svensson",male,51,0,0,347743,7.0542,,S -633,1,1,"Stahelin-Maeglin, Dr. Max",male,32,0,0,13214,30.5,B50,C -634,0,1,"Parr, Mr. William Henry Marsh",male,,0,0,112052,0,,S -635,0,3,"Skoog, Miss. Mabel",female,9,3,2,347088,27.9,,S -636,1,2,"Davis, Miss. Mary",female,28,0,0,237668,13,,S -637,0,3,"Leinonen, Mr. Antti Gustaf",male,32,0,0,STON/O 2. 3101292,7.925,,S -638,0,2,"Collyer, Mr. Harvey",male,31,1,1,C.A. 31921,26.25,,S -639,0,3,"Panula, Mrs. Juha (Maria Emilia Ojala)",female,41,0,5,3101295,39.6875,,S -640,0,3,"Thorneycroft, Mr. Percival",male,,1,0,376564,16.1,,S -641,0,3,"Jensen, Mr. Hans Peder",male,20,0,0,350050,7.8542,,S -642,1,1,"Sagesser, Mlle. Emma",female,24,0,0,PC 17477,69.3,B35,C -643,0,3,"Skoog, Miss. Margit Elizabeth",female,2,3,2,347088,27.9,,S -644,1,3,"Foo, Mr. Choong",male,,0,0,1601,56.4958,,S -645,1,3,"Baclini, Miss. Eugenie",female,0.75,2,1,2666,19.2583,,C -646,1,1,"Harper, Mr. Henry Sleeper",male,48,1,0,PC 17572,76.7292,D33,C -647,0,3,"Cor, Mr. Liudevit",male,19,0,0,349231,7.8958,,S -648,1,1,"Simonius-Blumer, Col. Oberst Alfons",male,56,0,0,13213,35.5,A26,C -649,0,3,"Willey, Mr. Edward",male,,0,0,S.O./P.P. 751,7.55,,S -650,1,3,"Stanley, Miss. Amy Zillah Elsie",female,23,0,0,CA. 2314,7.55,,S -651,0,3,"Mitkoff, Mr. Mito",male,,0,0,349221,7.8958,,S -652,1,2,"Doling, Miss. Elsie",female,18,0,1,231919,23,,S -653,0,3,"Kalvik, Mr. Johannes Halvorsen",male,21,0,0,8475,8.4333,,S -654,1,3,"O'Leary, Miss. Hanora ""Norah""",female,,0,0,330919,7.8292,,Q -655,0,3,"Hegarty, Miss. Hanora ""Nora""",female,18,0,0,365226,6.75,,Q -656,0,2,"Hickman, Mr. Leonard Mark",male,24,2,0,S.O.C. 14879,73.5,,S -657,0,3,"Radeff, Mr. Alexander",male,,0,0,349223,7.8958,,S -658,0,3,"Bourke, Mrs. John (Catherine)",female,32,1,1,364849,15.5,,Q -659,0,2,"Eitemiller, Mr. George Floyd",male,23,0,0,29751,13,,S -660,0,1,"Newell, Mr. Arthur Webster",male,58,0,2,35273,113.275,D48,C -661,1,1,"Frauenthal, Dr. Henry William",male,50,2,0,PC 17611,133.65,,S -662,0,3,"Badt, Mr. Mohamed",male,40,0,0,2623,7.225,,C -663,0,1,"Colley, Mr. Edward Pomeroy",male,47,0,0,5727,25.5875,E58,S -664,0,3,"Coleff, Mr. Peju",male,36,0,0,349210,7.4958,,S -665,1,3,"Lindqvist, Mr. Eino William",male,20,1,0,STON/O 2. 3101285,7.925,,S -666,0,2,"Hickman, Mr. Lewis",male,32,2,0,S.O.C. 14879,73.5,,S -667,0,2,"Butler, Mr. Reginald Fenton",male,25,0,0,234686,13,,S -668,0,3,"Rommetvedt, Mr. Knud Paust",male,,0,0,312993,7.775,,S -669,0,3,"Cook, Mr. Jacob",male,43,0,0,A/5 3536,8.05,,S -670,1,1,"Taylor, Mrs. Elmer Zebley (Juliet Cummins Wright)",female,,1,0,19996,52,C126,S -671,1,2,"Brown, Mrs. Thomas William Solomon (Elizabeth Catherine Ford)",female,40,1,1,29750,39,,S -672,0,1,"Davidson, Mr. Thornton",male,31,1,0,F.C. 12750,52,B71,S -673,0,2,"Mitchell, Mr. Henry Michael",male,70,0,0,C.A. 24580,10.5,,S -674,1,2,"Wilhelms, Mr. Charles",male,31,0,0,244270,13,,S -675,0,2,"Watson, Mr. Ennis Hastings",male,,0,0,239856,0,,S -676,0,3,"Edvardsson, Mr. Gustaf Hjalmar",male,18,0,0,349912,7.775,,S -677,0,3,"Sawyer, Mr. Frederick Charles",male,24.5,0,0,342826,8.05,,S -678,1,3,"Turja, Miss. Anna Sofia",female,18,0,0,4138,9.8417,,S -679,0,3,"Goodwin, Mrs. Frederick (Augusta Tyler)",female,43,1,6,CA 2144,46.9,,S -680,1,1,"Cardeza, Mr. Thomas Drake Martinez",male,36,0,1,PC 17755,512.3292,B51 B53 B55,C -681,0,3,"Peters, Miss. Katie",female,,0,0,330935,8.1375,,Q -682,1,1,"Hassab, Mr. Hammad",male,27,0,0,PC 17572,76.7292,D49,C -683,0,3,"Olsvigen, Mr. Thor Anderson",male,20,0,0,6563,9.225,,S -684,0,3,"Goodwin, Mr. Charles Edward",male,14,5,2,CA 2144,46.9,,S -685,0,2,"Brown, Mr. Thomas William Solomon",male,60,1,1,29750,39,,S -686,0,2,"Laroche, Mr. Joseph Philippe Lemercier",male,25,1,2,SC/Paris 2123,41.5792,,C -687,0,3,"Panula, Mr. Jaako Arnold",male,14,4,1,3101295,39.6875,,S -688,0,3,"Dakic, Mr. Branko",male,19,0,0,349228,10.1708,,S -689,0,3,"Fischer, Mr. Eberhard Thelander",male,18,0,0,350036,7.7958,,S -690,1,1,"Madill, Miss. Georgette Alexandra",female,15,0,1,24160,211.3375,B5,S -691,1,1,"Dick, Mr. Albert Adrian",male,31,1,0,17474,57,B20,S -692,1,3,"Karun, Miss. Manca",female,4,0,1,349256,13.4167,,C -693,1,3,"Lam, Mr. Ali",male,,0,0,1601,56.4958,,S -694,0,3,"Saad, Mr. Khalil",male,25,0,0,2672,7.225,,C -695,0,1,"Weir, Col. John",male,60,0,0,113800,26.55,,S -696,0,2,"Chapman, Mr. Charles Henry",male,52,0,0,248731,13.5,,S -697,0,3,"Kelly, Mr. James",male,44,0,0,363592,8.05,,S -698,1,3,"Mullens, Miss. Katherine ""Katie""",female,,0,0,35852,7.7333,,Q -699,0,1,"Thayer, Mr. John Borland",male,49,1,1,17421,110.8833,C68,C diff --git a/samples/titanic/val.csv b/samples/titanic/val.csv deleted file mode 100644 index 8c41289..0000000 --- a/samples/titanic/val.csv +++ /dev/null @@ -1,193 +0,0 @@ -PassengerId,Survived,Pclass,Name,Sex,Age,SibSp,Parch,Ticket,Fare,Cabin,Embarked -700,0,3,"Humblen, Mr. Adolf Mathias Nicolai Olsen",male,42,0,0,348121,7.65,F G63,S -701,1,1,"Astor, Mrs. John Jacob (Madeleine Talmadge Force)",female,18,1,0,PC 17757,227.525,C62 C64,C -702,1,1,"Silverthorne, Mr. Spencer Victor",male,35,0,0,PC 17475,26.2875,E24,S -703,0,3,"Barbara, Miss. Saiide",female,18,0,1,2691,14.4542,,C -704,0,3,"Gallagher, Mr. Martin",male,25,0,0,36864,7.7417,,Q -705,0,3,"Hansen, Mr. Henrik Juul",male,26,1,0,350025,7.8542,,S -706,0,2,"Morley, Mr. Henry Samuel (""Mr Henry Marshall"")",male,39,0,0,250655,26,,S -707,1,2,"Kelly, Mrs. Florence ""Fannie""",female,45,0,0,223596,13.5,,S -708,1,1,"Calderhead, Mr. Edward Pennington",male,42,0,0,PC 17476,26.2875,E24,S -709,1,1,"Cleaver, Miss. Alice",female,22,0,0,113781,151.55,,S -710,1,3,"Moubarek, Master. Halim Gonios (""William George"")",male,,1,1,2661,15.2458,,C -711,1,1,"Mayne, Mlle. Berthe Antonine (""Mrs de Villiers"")",female,24,0,0,PC 17482,49.5042,C90,C -712,0,1,"Klaber, Mr. Herman",male,,0,0,113028,26.55,C124,S -713,1,1,"Taylor, Mr. Elmer Zebley",male,48,1,0,19996,52,C126,S -714,0,3,"Larsson, Mr. August Viktor",male,29,0,0,7545,9.4833,,S -715,0,2,"Greenberg, Mr. Samuel",male,52,0,0,250647,13,,S -716,0,3,"Soholt, Mr. Peter Andreas Lauritz Andersen",male,19,0,0,348124,7.65,F G73,S -717,1,1,"Endres, Miss. Caroline Louise",female,38,0,0,PC 17757,227.525,C45,C -718,1,2,"Troutt, Miss. Edwina Celia ""Winnie""",female,27,0,0,34218,10.5,E101,S -719,0,3,"McEvoy, Mr. Michael",male,,0,0,36568,15.5,,Q -720,0,3,"Johnson, Mr. Malkolm Joackim",male,33,0,0,347062,7.775,,S -721,1,2,"Harper, Miss. Annie Jessie ""Nina""",female,6,0,1,248727,33,,S -722,0,3,"Jensen, Mr. Svend Lauritz",male,17,1,0,350048,7.0542,,S -723,0,2,"Gillespie, Mr. William Henry",male,34,0,0,12233,13,,S -724,0,2,"Hodges, Mr. Henry Price",male,50,0,0,250643,13,,S -725,1,1,"Chambers, Mr. Norman Campbell",male,27,1,0,113806,53.1,E8,S -726,0,3,"Oreskovic, Mr. Luka",male,20,0,0,315094,8.6625,,S -727,1,2,"Renouf, Mrs. Peter Henry (Lillian Jefferys)",female,30,3,0,31027,21,,S -728,1,3,"Mannion, Miss. Margareth",female,,0,0,36866,7.7375,,Q -729,0,2,"Bryhl, Mr. Kurt Arnold Gottfrid",male,25,1,0,236853,26,,S -730,0,3,"Ilmakangas, Miss. Pieta Sofia",female,25,1,0,STON/O2. 3101271,7.925,,S -731,1,1,"Allen, Miss. Elisabeth Walton",female,29,0,0,24160,211.3375,B5,S -732,0,3,"Hassan, Mr. Houssein G N",male,11,0,0,2699,18.7875,,C -733,0,2,"Knight, Mr. Robert J",male,,0,0,239855,0,,S -734,0,2,"Berriman, Mr. William John",male,23,0,0,28425,13,,S -735,0,2,"Troupiansky, Mr. Moses Aaron",male,23,0,0,233639,13,,S -736,0,3,"Williams, Mr. Leslie",male,28.5,0,0,54636,16.1,,S -737,0,3,"Ford, Mrs. Edward (Margaret Ann Watson)",female,48,1,3,W./C. 6608,34.375,,S -738,1,1,"Lesurer, Mr. Gustave J",male,35,0,0,PC 17755,512.3292,B101,C -739,0,3,"Ivanoff, Mr. Kanio",male,,0,0,349201,7.8958,,S -740,0,3,"Nankoff, Mr. Minko",male,,0,0,349218,7.8958,,S -741,1,1,"Hawksford, Mr. Walter James",male,,0,0,16988,30,D45,S -742,0,1,"Cavendish, Mr. Tyrell William",male,36,1,0,19877,78.85,C46,S -743,1,1,"Ryerson, Miss. Susan Parker ""Suzette""",female,21,2,2,PC 17608,262.375,B57 B59 B63 B66,C -744,0,3,"McNamee, Mr. Neal",male,24,1,0,376566,16.1,,S -745,1,3,"Stranden, Mr. Juho",male,31,0,0,STON/O 2. 3101288,7.925,,S -746,0,1,"Crosby, Capt. Edward Gifford",male,70,1,1,WE/P 5735,71,B22,S -747,0,3,"Abbott, Mr. Rossmore Edward",male,16,1,1,C.A. 2673,20.25,,S -748,1,2,"Sinkkonen, Miss. Anna",female,30,0,0,250648,13,,S -749,0,1,"Marvin, Mr. Daniel Warner",male,19,1,0,113773,53.1,D30,S -750,0,3,"Connaghton, Mr. Michael",male,31,0,0,335097,7.75,,Q -751,1,2,"Wells, Miss. Joan",female,4,1,1,29103,23,,S -752,1,3,"Moor, Master. Meier",male,6,0,1,392096,12.475,E121,S -753,0,3,"Vande Velde, Mr. Johannes Joseph",male,33,0,0,345780,9.5,,S -754,0,3,"Jonkoff, Mr. Lalio",male,23,0,0,349204,7.8958,,S -755,1,2,"Herman, Mrs. Samuel (Jane Laver)",female,48,1,2,220845,65,,S -756,1,2,"Hamalainen, Master. Viljo",male,0.67,1,1,250649,14.5,,S -757,0,3,"Carlsson, Mr. August Sigfrid",male,28,0,0,350042,7.7958,,S -758,0,2,"Bailey, Mr. Percy Andrew",male,18,0,0,29108,11.5,,S -759,0,3,"Theobald, Mr. Thomas Leonard",male,34,0,0,363294,8.05,,S -760,1,1,"Rothes, the Countess. of (Lucy Noel Martha Dyer-Edwards)",female,33,0,0,110152,86.5,B77,S -761,0,3,"Garfirth, Mr. John",male,,0,0,358585,14.5,,S -762,0,3,"Nirva, Mr. Iisakki Antino Aijo",male,41,0,0,SOTON/O2 3101272,7.125,,S -763,1,3,"Barah, Mr. Hanna Assi",male,20,0,0,2663,7.2292,,C -764,1,1,"Carter, Mrs. William Ernest (Lucile Polk)",female,36,1,2,113760,120,B96 B98,S -765,0,3,"Eklund, Mr. Hans Linus",male,16,0,0,347074,7.775,,S -766,1,1,"Hogeboom, Mrs. John C (Anna Andrews)",female,51,1,0,13502,77.9583,D11,S -767,0,1,"Brewe, Dr. Arthur Jackson",male,,0,0,112379,39.6,,C -768,0,3,"Mangan, Miss. Mary",female,30.5,0,0,364850,7.75,,Q -769,0,3,"Moran, Mr. Daniel J",male,,1,0,371110,24.15,,Q -770,0,3,"Gronnestad, Mr. Daniel Danielsen",male,32,0,0,8471,8.3625,,S -771,0,3,"Lievens, Mr. Rene Aime",male,24,0,0,345781,9.5,,S -772,0,3,"Jensen, Mr. Niels Peder",male,48,0,0,350047,7.8542,,S -773,0,2,"Mack, Mrs. (Mary)",female,57,0,0,S.O./P.P. 3,10.5,E77,S -774,0,3,"Elias, Mr. Dibo",male,,0,0,2674,7.225,,C -775,1,2,"Hocking, Mrs. Elizabeth (Eliza Needs)",female,54,1,3,29105,23,,S -776,0,3,"Myhrman, Mr. Pehr Fabian Oliver Malkolm",male,18,0,0,347078,7.75,,S -777,0,3,"Tobin, Mr. Roger",male,,0,0,383121,7.75,F38,Q -778,1,3,"Emanuel, Miss. Virginia Ethel",female,5,0,0,364516,12.475,,S -779,0,3,"Kilgannon, Mr. Thomas J",male,,0,0,36865,7.7375,,Q -780,1,1,"Robert, Mrs. Edward Scott (Elisabeth Walton McMillan)",female,43,0,1,24160,211.3375,B3,S -781,1,3,"Ayoub, Miss. Banoura",female,13,0,0,2687,7.2292,,C -782,1,1,"Dick, Mrs. Albert Adrian (Vera Gillespie)",female,17,1,0,17474,57,B20,S -783,0,1,"Long, Mr. Milton Clyde",male,29,0,0,113501,30,D6,S -784,0,3,"Johnston, Mr. Andrew G",male,,1,2,W./C. 6607,23.45,,S -785,0,3,"Ali, Mr. William",male,25,0,0,SOTON/O.Q. 3101312,7.05,,S -786,0,3,"Harmer, Mr. Abraham (David Lishin)",male,25,0,0,374887,7.25,,S -787,1,3,"Sjoblom, Miss. Anna Sofia",female,18,0,0,3101265,7.4958,,S -788,0,3,"Rice, Master. George Hugh",male,8,4,1,382652,29.125,,Q -789,1,3,"Dean, Master. Bertram Vere",male,1,1,2,C.A. 2315,20.575,,S -790,0,1,"Guggenheim, Mr. Benjamin",male,46,0,0,PC 17593,79.2,B82 B84,C -791,0,3,"Keane, Mr. Andrew ""Andy""",male,,0,0,12460,7.75,,Q -792,0,2,"Gaskell, Mr. Alfred",male,16,0,0,239865,26,,S -793,0,3,"Sage, Miss. Stella Anna",female,,8,2,CA. 2343,69.55,,S -794,0,1,"Hoyt, Mr. William Fisher",male,,0,0,PC 17600,30.6958,,C -795,0,3,"Dantcheff, Mr. Ristiu",male,25,0,0,349203,7.8958,,S -796,0,2,"Otter, Mr. Richard",male,39,0,0,28213,13,,S -797,1,1,"Leader, Dr. Alice (Farnham)",female,49,0,0,17465,25.9292,D17,S -798,1,3,"Osman, Mrs. Mara",female,31,0,0,349244,8.6833,,S -799,0,3,"Ibrahim Shawah, Mr. Yousseff",male,30,0,0,2685,7.2292,,C -800,0,3,"Van Impe, Mrs. Jean Baptiste (Rosalie Paula Govaert)",female,30,1,1,345773,24.15,,S -801,0,2,"Ponesell, Mr. Martin",male,34,0,0,250647,13,,S -802,1,2,"Collyer, Mrs. Harvey (Charlotte Annie Tate)",female,31,1,1,C.A. 31921,26.25,,S -803,1,1,"Carter, Master. William Thornton II",male,11,1,2,113760,120,B96 B98,S -804,1,3,"Thomas, Master. Assad Alexander",male,0.42,0,1,2625,8.5167,,C -805,1,3,"Hedman, Mr. Oskar Arvid",male,27,0,0,347089,6.975,,S -806,0,3,"Johansson, Mr. Karl Johan",male,31,0,0,347063,7.775,,S -807,0,1,"Andrews, Mr. Thomas Jr",male,39,0,0,112050,0,A36,S -808,0,3,"Pettersson, Miss. Ellen Natalia",female,18,0,0,347087,7.775,,S -809,0,2,"Meyer, Mr. August",male,39,0,0,248723,13,,S -810,1,1,"Chambers, Mrs. Norman Campbell (Bertha Griggs)",female,33,1,0,113806,53.1,E8,S -811,0,3,"Alexander, Mr. William",male,26,0,0,3474,7.8875,,S -812,0,3,"Lester, Mr. James",male,39,0,0,A/4 48871,24.15,,S -813,0,2,"Slemen, Mr. Richard James",male,35,0,0,28206,10.5,,S -814,0,3,"Andersson, Miss. Ebba Iris Alfrida",female,6,4,2,347082,31.275,,S -815,0,3,"Tomlin, Mr. Ernest Portage",male,30.5,0,0,364499,8.05,,S -816,0,1,"Fry, Mr. Richard",male,,0,0,112058,0,B102,S -817,0,3,"Heininen, Miss. Wendla Maria",female,23,0,0,STON/O2. 3101290,7.925,,S -818,0,2,"Mallet, Mr. Albert",male,31,1,1,S.C./PARIS 2079,37.0042,,C -819,0,3,"Holm, Mr. John Fredrik Alexander",male,43,0,0,C 7075,6.45,,S -820,0,3,"Skoog, Master. Karl Thorsten",male,10,3,2,347088,27.9,,S -821,1,1,"Hays, Mrs. Charles Melville (Clara Jennings Gregg)",female,52,1,1,12749,93.5,B69,S -822,1,3,"Lulic, Mr. Nikola",male,27,0,0,315098,8.6625,,S -823,0,1,"Reuchlin, Jonkheer. John George",male,38,0,0,19972,0,,S -824,1,3,"Moor, Mrs. (Beila)",female,27,0,1,392096,12.475,E121,S -825,0,3,"Panula, Master. Urho Abraham",male,2,4,1,3101295,39.6875,,S -826,0,3,"Flynn, Mr. John",male,,0,0,368323,6.95,,Q -827,0,3,"Lam, Mr. Len",male,,0,0,1601,56.4958,,S -828,1,2,"Mallet, Master. Andre",male,1,0,2,S.C./PARIS 2079,37.0042,,C -829,1,3,"McCormack, Mr. Thomas Joseph",male,,0,0,367228,7.75,,Q -830,1,1,"Stone, Mrs. George Nelson (Martha Evelyn)",female,62,0,0,113572,80,B28, -831,1,3,"Yasbeck, Mrs. Antoni (Selini Alexander)",female,15,1,0,2659,14.4542,,C -832,1,2,"Richards, Master. George Sibley",male,0.83,1,1,29106,18.75,,S -833,0,3,"Saad, Mr. Amin",male,,0,0,2671,7.2292,,C -834,0,3,"Augustsson, Mr. Albert",male,23,0,0,347468,7.8542,,S -835,0,3,"Allum, Mr. Owen George",male,18,0,0,2223,8.3,,S -836,1,1,"Compton, Miss. Sara Rebecca",female,39,1,1,PC 17756,83.1583,E49,C -837,0,3,"Pasic, Mr. Jakob",male,21,0,0,315097,8.6625,,S -838,0,3,"Sirota, Mr. Maurice",male,,0,0,392092,8.05,,S -839,1,3,"Chip, Mr. Chang",male,32,0,0,1601,56.4958,,S -840,1,1,"Marechal, Mr. Pierre",male,,0,0,11774,29.7,C47,C -841,0,3,"Alhomaki, Mr. Ilmari Rudolf",male,20,0,0,SOTON/O2 3101287,7.925,,S -842,0,2,"Mudd, Mr. Thomas Charles",male,16,0,0,S.O./P.P. 3,10.5,,S -843,1,1,"Serepeca, Miss. Augusta",female,30,0,0,113798,31,,C -844,0,3,"Lemberopolous, Mr. Peter L",male,34.5,0,0,2683,6.4375,,C -845,0,3,"Culumovic, Mr. Jeso",male,17,0,0,315090,8.6625,,S -846,0,3,"Abbing, Mr. Anthony",male,42,0,0,C.A. 5547,7.55,,S -847,0,3,"Sage, Mr. Douglas Bullen",male,,8,2,CA. 2343,69.55,,S -848,0,3,"Markoff, Mr. Marin",male,35,0,0,349213,7.8958,,C -849,0,2,"Harper, Rev. John",male,28,0,1,248727,33,,S -850,1,1,"Goldenberg, Mrs. Samuel L (Edwiga Grabowska)",female,,1,0,17453,89.1042,C92,C -851,0,3,"Andersson, Master. Sigvard Harald Elias",male,4,4,2,347082,31.275,,S -852,0,3,"Svensson, Mr. Johan",male,74,0,0,347060,7.775,,S -853,0,3,"Boulos, Miss. Nourelain",female,9,1,1,2678,15.2458,,C -854,1,1,"Lines, Miss. Mary Conover",female,16,0,1,PC 17592,39.4,D28,S -855,0,2,"Carter, Mrs. Ernest Courtenay (Lilian Hughes)",female,44,1,0,244252,26,,S -856,1,3,"Aks, Mrs. Sam (Leah Rosen)",female,18,0,1,392091,9.35,,S -857,1,1,"Wick, Mrs. George Dennick (Mary Hitchcock)",female,45,1,1,36928,164.8667,,S -858,1,1,"Daly, Mr. Peter Denis ",male,51,0,0,113055,26.55,E17,S -859,1,3,"Baclini, Mrs. Solomon (Latifa Qurban)",female,24,0,3,2666,19.2583,,C -860,0,3,"Razi, Mr. Raihed",male,,0,0,2629,7.2292,,C -861,0,3,"Hansen, Mr. Claus Peter",male,41,2,0,350026,14.1083,,S -862,0,2,"Giles, Mr. Frederick Edward",male,21,1,0,28134,11.5,,S -863,1,1,"Swift, Mrs. Frederick Joel (Margaret Welles Barron)",female,48,0,0,17466,25.9292,D17,S -864,0,3,"Sage, Miss. Dorothy Edith ""Dolly""",female,,8,2,CA. 2343,69.55,,S -865,0,2,"Gill, Mr. John William",male,24,0,0,233866,13,,S -866,1,2,"Bystrom, Mrs. (Karolina)",female,42,0,0,236852,13,,S -867,1,2,"Duran y More, Miss. Asuncion",female,27,1,0,SC/PARIS 2149,13.8583,,C -868,0,1,"Roebling, Mr. Washington Augustus II",male,31,0,0,PC 17590,50.4958,A24,S -869,0,3,"van Melkebeke, Mr. Philemon",male,,0,0,345777,9.5,,S -870,1,3,"Johnson, Master. Harold Theodor",male,4,1,1,347742,11.1333,,S -871,0,3,"Balkic, Mr. Cerin",male,26,0,0,349248,7.8958,,S -872,1,1,"Beckwith, Mrs. Richard Leonard (Sallie Monypeny)",female,47,1,1,11751,52.5542,D35,S -873,0,1,"Carlsson, Mr. Frans Olof",male,33,0,0,695,5,B51 B53 B55,S -874,0,3,"Vander Cruyssen, Mr. Victor",male,47,0,0,345765,9,,S -875,1,2,"Abelson, Mrs. Samuel (Hannah Wizosky)",female,28,1,0,P/PP 3381,24,,C -876,1,3,"Najib, Miss. Adele Kiamie ""Jane""",female,15,0,0,2667,7.225,,C -877,0,3,"Gustafsson, Mr. Alfred Ossian",male,20,0,0,7534,9.8458,,S -878,0,3,"Petroff, Mr. Nedelio",male,19,0,0,349212,7.8958,,S -879,0,3,"Laleff, Mr. Kristo",male,,0,0,349217,7.8958,,S -880,1,1,"Potter, Mrs. Thomas Jr (Lily Alexenia Wilson)",female,56,0,1,11767,83.1583,C50,C -881,1,2,"Shelley, Mrs. William (Imanita Parrish Hall)",female,25,0,1,230433,26,,S -882,0,3,"Markun, Mr. Johann",male,33,0,0,349257,7.8958,,S -883,0,3,"Dahlberg, Miss. Gerda Ulrika",female,22,0,0,7552,10.5167,,S -884,0,2,"Banfield, Mr. Frederick James",male,28,0,0,C.A./SOTON 34068,10.5,,S -885,0,3,"Sutehall, Mr. Henry Jr",male,25,0,0,SOTON/OQ 392076,7.05,,S -886,0,3,"Rice, Mrs. William (Margaret Norton)",female,39,0,5,382652,29.125,,Q -887,0,2,"Montvila, Rev. Juozas",male,27,0,0,211536,13,,S -888,1,1,"Graham, Miss. Margaret Edith",female,19,0,0,112053,30,B42,S -889,0,3,"Johnston, Miss. Catherine Helen ""Carrie""",female,,1,2,W./C. 6607,23.45,,S -890,1,1,"Behr, Mr. Karl Howell",male,26,0,0,111369,30,C148,C -891,0,3,"Dooley, Mr. Patrick",male,32,0,0,370376,7.75,,Q diff --git a/tests/classification/conftest.py b/tests/classification/conftest.py index 90cd387..5048f0b 100644 --- a/tests/classification/conftest.py +++ b/tests/classification/conftest.py @@ -1,5 +1,10 @@ +import os + +import optuna import pytest +from optuna.storages import JournalFileStorage, JournalStorage +from theseus.base.utilities.optuna_tuner import OptunaWrapper from theseus.opt import Config @@ -10,8 +15,6 @@ def override_config(): config["global"]["exist_ok"] = True config["global"]["save_dir"] = "runs" config["global"]["device"] = "cpu" - config["trainer"]["args"]["print_interval"] = 1 - config["trainer"]["args"]["save_interval"] = 2 config["trainer"]["args"]["use_fp16"] = False config["trainer"]["args"]["num_iterations"] = 10 config["data"]["dataloader"]["train"]["args"]["batch_size"] = 1 @@ -28,3 +31,34 @@ def override_test_config(): config["global"]["device"] = "cpu" config["data"]["dataloader"]["args"]["batch_size"] = 1 return config + + +@pytest.fixture(scope="session") +def override_tuner_config(): + config = Config(f"./configs/classification/optuna/pipeline.yaml") + config["global"]["exp_name"] = "pytest_clf_optuna" + config["global"]["exist_ok"] = True + config["global"]["save_dir"] = "runs" + config["global"]["device"] = "cpu" + return config + + +@pytest.fixture(scope="session") +def override_tuner_tuner(): + + os.makedirs("runs/optuna/clf", exist_ok=True) + database = JournalStorage( + JournalFileStorage("runs/optuna/clf/pytest_clf_optuna.log") + ) + + tuner = OptunaWrapper( + storage=database, + study_name="pytest_clf_optuna", + n_trials=2, + direction="maximize", + save_dir="runs/optuna/clf/", + sampler=optuna.samplers.RandomSampler(), + pruner=optuna.pruners.MedianPruner(), + ) + + return tuner diff --git a/tests/classification/test_clf.py b/tests/classification/test_clf.py index 16227d2..0039103 100644 --- a/tests/classification/test_clf.py +++ b/tests/classification/test_clf.py @@ -13,7 +13,6 @@ def test_train_clf(override_config): @pytest.mark.order(2) def test_eval_clf(override_config): override_config["global"]["pretrained"] = "runs/pytest_clf/checkpoints/best.pth" - override_config["global"]["cfg_transform"] = "runs/pytest_clf/transform.yaml" val_pipeline = ClassificationPipeline(override_config) val_pipeline.evaluate() @@ -21,6 +20,5 @@ def test_eval_clf(override_config): @pytest.mark.order(2) def test_infer_clf(override_test_config): override_test_config["global"]["weights"] = "runs/pytest_clf/checkpoints/best.pth" - override_test_config["global"]["cfg_transform"] = "runs/pytest_clf/transform.yaml" test_pipeline = TestPipeline(override_test_config) test_pipeline.inference() diff --git a/tests/classification/test_tuner_clf.py b/tests/classification/test_tuner_clf.py new file mode 100644 index 0000000..6d760b3 --- /dev/null +++ b/tests/classification/test_tuner_clf.py @@ -0,0 +1,28 @@ +import os + +import pytest + +from theseus.cv.classification.pipeline import ClassificationPipeline + + +@pytest.mark.order(1) +def test_train_clf_tune(override_tuner_config, override_tuner_tuner): + override_tuner_tuner.tune( + config=override_tuner_config, + pipeline_class=ClassificationPipeline, + trial_user_attrs={ + "best_key": "bl_acc", + "model_name": override_tuner_config["model"]["args"]["model_name"], + }, + ) + + leaderboard_df = override_tuner_tuner.leaderboard() + os.makedirs("runs/optuna/clf/overview", exist_ok=True) + # leaderboard_df.to_csv("runs/optuna/clf/overview/leaderboard.csv", index=False) + leaderboard_df.to_json( + "runs/optuna/clf/overview/leaderboard.json", orient="records" + ) + + # figs = override_tuner_tuner.visualize("all") + # for fig_type, fig in figs: + # fig.write_image(f"runs/optuna/clf/overview/{fig_type}.png") diff --git a/tests/semantic/conftest.py b/tests/semantic/conftest.py index d1b3723..29093d4 100644 --- a/tests/semantic/conftest.py +++ b/tests/semantic/conftest.py @@ -10,8 +10,6 @@ def override_config(): config["global"]["exist_ok"] = True config["global"]["save_dir"] = "runs" config["global"]["device"] = "cpu" - config["trainer"]["args"]["print_interval"] = 1 - config["trainer"]["args"]["save_interval"] = 2 config["trainer"]["args"]["use_fp16"] = False config["trainer"]["args"]["num_iterations"] = 10 config["data"]["dataloader"]["train"]["args"]["batch_size"] = 1 diff --git a/tests/semantic/test_segm.py b/tests/semantic/test_segm.py index fc17d7f..dd4e4b9 100644 --- a/tests/semantic/test_segm.py +++ b/tests/semantic/test_segm.py @@ -13,7 +13,6 @@ def test_train_clf(override_config): @pytest.mark.order(2) def test_eval_clf(override_config): override_config["global"]["pretrained"] = "runs/pytest_segm/checkpoints/best.pth" - override_config["global"]["cfg_transform"] = "runs/pytest_segm/transform.yaml" val_pipeline = SemanticPipeline(override_config) val_pipeline.evaluate() @@ -21,6 +20,5 @@ def test_eval_clf(override_config): @pytest.mark.order(2) def test_infer_clf(override_test_config): override_test_config["global"]["weights"] = "runs/pytest_segm/checkpoints/best.pth" - override_test_config["global"]["cfg_transform"] = "runs/pytest_segm/transform.yaml" test_pipeline = TestPipeline(override_test_config) test_pipeline.inference() diff --git a/tests/tabular/conftest.py b/tests/tabular/conftest.py index 13876b4..c6a558f 100644 --- a/tests/tabular/conftest.py +++ b/tests/tabular/conftest.py @@ -1,8 +1,13 @@ +import os + import pytest +from optuna.storages import JournalFileStorage, JournalStorage +from theseus.base.utilities.optuna_tuner import OptunaWrapper from theseus.opt import Config -MODELS = ["xgboost", "catboost"] +MODELS = ["xgboost"] # , "catboost", 'lightgbm'] +TUNER_MODELS = ["xgboost_tune"] # , "catboost_tune"] #, 'lightgbm_tune'] @pytest.fixture(scope="session", params=MODELS) @@ -13,3 +18,32 @@ def override_config(request): config["global"]["save_dir"] = "runs" config["global"]["device"] = "cpu" return config + + +@pytest.fixture(scope="function", params=TUNER_MODELS) +def override_tuner_config(request): + config = Config(f"./configs/tabular/optuna/{request.param}.yaml") + config["global"]["exp_name"] = "pytest_tablr_optuna" + config["global"]["exist_ok"] = True + config["global"]["save_dir"] = "runs" + config["global"]["device"] = "cpu" + return config + + +@pytest.fixture(scope="session") +def override_tuner_tuner(): + + os.makedirs("runs/optuna/tablr", exist_ok=True) + database = JournalStorage( + JournalFileStorage("runs/optuna/tablr/pytest_tablr_optuna.log") + ) + + tuner = OptunaWrapper( + storage=database, + study_name="pytest_tablr_optuna", + n_trials=3, + direction="maximize", + save_dir="runs/optuna/tablr", + ) + + return tuner diff --git a/tests/tabular/test_tablr.py b/tests/tabular/test_tablr.py index 185d898..e839d38 100644 --- a/tests/tabular/test_tablr.py +++ b/tests/tabular/test_tablr.py @@ -5,22 +5,20 @@ @pytest.mark.order(1) -def test_train_clf(override_config): +def test_train_tblr(override_config): train_pipeline = TabularPipeline(override_config) train_pipeline.fit() -# @pytest.mark.order(2) -# def test_eval_clf(override_config): -# override_config["global"]["pretrained"] = "runs/pytest_segm/checkpoints/best.pth" -# override_config["global"]["cfg_transform"] = "runs/pytest_segm/transform.yaml" -# val_pipeline = Pipeline(override_config) -# val_pipeline.evaluate() +@pytest.mark.order(2) +def test_eval_tblr(override_config): + override_config["global"]["pretrained"] = "runs/pytest_tablr/checkpoints/last" + val_pipeline = TabularPipeline(override_config) + val_pipeline.evaluate() # @pytest.mark.order(2) # def test_infer_clf(override_test_config): # override_test_config["global"]["weights"] = "runs/pytest_segm/checkpoints/best.pth" -# override_test_config["global"]["cfg_transform"] = "runs/pytest_segm/transform.yaml" # test_pipeline = TestPipeline(override_test_config) # test_pipeline.inference() diff --git a/tests/tabular/test_tuner_tblr.py b/tests/tabular/test_tuner_tblr.py new file mode 100644 index 0000000..98373b1 --- /dev/null +++ b/tests/tabular/test_tuner_tblr.py @@ -0,0 +1,28 @@ +import os + +import pytest + +from theseus.tabular.classification.pipeline import TabularPipeline + + +@pytest.mark.order(1) +def test_train_tblr_tune(override_tuner_config, override_tuner_tuner): + override_tuner_tuner.tune( + config=override_tuner_config, + pipeline_class=TabularPipeline, + trial_user_attrs={ + "best_key": "bl_acc", + "model_name": override_tuner_config["model"]["args"]["model_name"], + }, + ) + + leaderboard_df = override_tuner_tuner.leaderboard() + os.makedirs("runs/optuna/tablr/overview", exist_ok=True) + # leaderboard_df.to_csv("runs/optuna/tablr/overview/leaderboard.csv", index=False) + leaderboard_df.to_json( + "runs/optuna/tablr/overview/leaderboard.json", orient="records" + ) + + figs = override_tuner_tuner.visualize("all") + for fig_type, fig in figs: + fig.write_image(f"runs/optuna/tablr/overview/{fig_type}.png") diff --git a/theseus/base/callbacks/__init__.py b/theseus/base/callbacks/__init__.py index 330a427..b55adf1 100644 --- a/theseus/base/callbacks/__init__.py +++ b/theseus/base/callbacks/__init__.py @@ -4,6 +4,7 @@ from .checkpoint_callbacks import TorchCheckpointCallbacks from .debug_callbacks import DebugCallbacks from .loss_logging_callbacks import LossLoggerCallbacks +from .lr_autofind import AutoFindLRCallbacks from .metric_logging_callbacks import MetricLoggerCallbacks from .timer_callbacks import TimerCallbacks from .tsb_callbacks import TensorboardCallbacks @@ -18,3 +19,4 @@ CALLBACKS_REGISTRY.register(DebugCallbacks) CALLBACKS_REGISTRY.register(LossLoggerCallbacks) CALLBACKS_REGISTRY.register(MetricLoggerCallbacks) +CALLBACKS_REGISTRY.register(AutoFindLRCallbacks) diff --git a/theseus/base/callbacks/checkpoint_callbacks.py b/theseus/base/callbacks/checkpoint_callbacks.py index d48a667..b646b77 100644 --- a/theseus/base/callbacks/checkpoint_callbacks.py +++ b/theseus/base/callbacks/checkpoint_callbacks.py @@ -53,7 +53,7 @@ def auto_get_save_interval(self, train_fraction=0.5): """ trainloader = self.params["trainer"].trainloader num_iterations_per_epoch = len(trainloader) - save_interval = int(train_fraction * num_iterations_per_epoch) + save_interval = max(int(train_fraction * num_iterations_per_epoch), 1) return save_interval def load_checkpoint(self, path, trainer): diff --git a/theseus/base/callbacks/loss_logging_callbacks.py b/theseus/base/callbacks/loss_logging_callbacks.py index 7df1e9d..ee86660 100644 --- a/theseus/base/callbacks/loss_logging_callbacks.py +++ b/theseus/base/callbacks/loss_logging_callbacks.py @@ -32,7 +32,7 @@ def auto_get_print_interval(self, train_fraction=0.1): """ trainloader = self.params["trainer"].trainloader num_iterations_per_epoch = len(trainloader) - print_interval = int(train_fraction * num_iterations_per_epoch) + print_interval = max(int(train_fraction * num_iterations_per_epoch), 1) return print_interval def on_start(self, logs: Dict = None): diff --git a/theseus/base/callbacks/lr_autofind.py b/theseus/base/callbacks/lr_autofind.py new file mode 100644 index 0000000..413e3a5 --- /dev/null +++ b/theseus/base/callbacks/lr_autofind.py @@ -0,0 +1,124 @@ +import time +from typing import Dict, List + +import numpy as np + +from theseus.base.callbacks.base_callbacks import Callbacks +from theseus.base.utilities.loggers.observer import LoggerObserver + +LOGGER = LoggerObserver.getLogger("main") + + +class AutoFindLRCallbacks(Callbacks): + """ + Callbacks for auto finding LR + :params: + lr_range: List + learning rate search space + gamma: int + number of iterations per lr step + """ + + def __init__( + self, lr_range: List[float], num_steps: int, num_epochs: int = 1, **kwargs + ) -> None: + super().__init__() + + self.lr_range = lr_range + self.num_steps = num_steps + self.num_epochs = num_epochs + + assert ( + self.lr_range[1] > self.lr_range[0] + ), "Learning rate range should be from low to high" + assert self.num_epochs > 0, "Num epochs should be higher than 0" + + def auto_get_interval(self): + """ + Automatically decide the number of interval + """ + trainloader = self.params["trainer"].trainloader + num_iterations = len(trainloader) * self.num_epochs + + num_iterations_per_steps = (num_iterations - 1) // self.num_steps + step_iters = [ + int(round(x * num_iterations_per_steps)) for x in range(0, self.num_steps) + ] + + gamma = (self.lr_range[1] - self.lr_range[0]) / float(self.num_steps - 1) + lrs = [self.lr_range[0] + x * gamma for x in range(0, self.num_steps)] + + return step_iters, lrs + + def on_start(self, logs: Dict = None): + """ + Before going to the main loop + """ + + LOGGER.text( + "Autofinding LR is activated. Running for 1 epoch only...", + level=LoggerObserver.DEBUG, + ) + + trainloader = self.params["trainer"].trainloader + num_iterations = len(trainloader) * self.num_epochs + self.params["trainer"].num_iterations = num_iterations + + self.step_iters, self.lrs = self.auto_get_interval() + self.current_idx = 0 + LOGGER.text( + "Interval for Learning Rate AutoFinding not specified. Auto calculating...", + level=LoggerObserver.DEBUG, + ) + + self.tracking_loss = [] + self.tracking_lr = [] + + optim = self.params["trainer"].optimizer + for g in optim.param_groups: + g["lr"] = self.lrs[self.current_idx] + self.current_idx += 1 + + def on_train_batch_end(self, logs: Dict = None): + """ + After finish a batch + """ + + lr = logs["lr"] + iters = logs["iters"] + loss_dict = logs["loss_dict"] + optim = self.params["trainer"].optimizer + + log_dict = [ + { + "tag": f"AutoLR/{k} Loss", + "value": v, + "type": LoggerObserver.SCALAR, + "kwargs": {"step": iters}, + } + for k, v in loss_dict.items() + ] + + # Log learning rates + log_dict.append( + { + "tag": "AutoLR/Learning rate", + "value": lr, + "type": LoggerObserver.SCALAR, + "kwargs": {"step": iters}, + } + ) + + LOGGER.log(log_dict) + + self.tracking_loss.append(sum([v for v in loss_dict.values()])) + self.tracking_lr.append(lr) + + # Logging + if ( + self.current_idx < len(self.step_iters) + and iters == self.step_iters[self.current_idx] + ): + for g in optim.param_groups: + g["lr"] = self.lrs[self.current_idx] + self.current_idx += 1 diff --git a/theseus/base/callbacks/metric_logging_callbacks.py b/theseus/base/callbacks/metric_logging_callbacks.py index 9d72120..b692412 100644 --- a/theseus/base/callbacks/metric_logging_callbacks.py +++ b/theseus/base/callbacks/metric_logging_callbacks.py @@ -1,3 +1,6 @@ +import json +import os +import os.path as osp from typing import Dict, List from theseus.base.callbacks.base_callbacks import Callbacks @@ -13,8 +16,15 @@ class MetricLoggerCallbacks(Callbacks): - Only do logging """ - def __init__(self, **kwargs) -> None: + def __init__(self, save_json: bool = True, **kwargs) -> None: super().__init__() + self.save_json = save_json + if self.save_json: + self.save_dir = kwargs.get("save_dir", None) + if self.save_dir is not None: + self.save_dir = osp.join(self.save_dir, "Validation") + os.makedirs(self.save_dir, exist_ok=True) + self.output_dict = [] def on_val_epoch_end(self, logs: Dict = None): """ @@ -24,6 +34,16 @@ def on_val_epoch_end(self, logs: Dict = None): iters = logs["iters"] metric_dict = logs["metric_dict"] + # Save json + if self.save_json: + item = {} + for metric, score in metric_dict.items(): + if isinstance(score, (int, float)): + item[metric] = float(f"{score:.5f}") + if len(item.keys()) > 0: + item["iters"] = iters + self.output_dict.append(item) + # Log metric metric_string = "" for metric, score in metric_dict.items(): @@ -40,3 +60,13 @@ def on_val_epoch_end(self, logs: Dict = None): ] LOGGER.log(log_dict) + + def on_finish(self, logs: Dict = None): + """ + After finish everything + """ + if self.save_json: + save_json = osp.join(self.save_dir, "metrics.json") + if len(self.output_dict) > 0: + with open(save_json, "w") as f: + json.dump(self.output_dict, f) diff --git a/theseus/base/callbacks/optuna_callbacks.py b/theseus/base/callbacks/optuna_callbacks.py new file mode 100644 index 0000000..874eef0 --- /dev/null +++ b/theseus/base/callbacks/optuna_callbacks.py @@ -0,0 +1,35 @@ +from typing import Dict, List + +import optuna + +from theseus.base.callbacks.base_callbacks import Callbacks +from theseus.base.utilities.loggers.observer import LoggerObserver + +LOGGER = LoggerObserver.getLogger("main") + + +class OptunaCallbacks(Callbacks): + """ + Callbacks for reporting value to optuna trials to decide whether to prune + """ + + def __init__(self, trial: optuna.Trial, **kwargs) -> None: + super().__init__() + self.trial = trial + + def on_val_epoch_end(self, logs: Dict = None): + """ + After finish validation + """ + + iters = logs["iters"] + metric_dict = logs["metric_dict"] + + best_key = self.trial.user_attrs["best_key"] + self.trial.report(value=metric_dict[best_key], step=iters) + + if self.trial.should_prune(): + LOGGER.text( + f"Trial {self.trial.number} has been pruned", level=LoggerObserver.DEBUG + ) + raise optuna.TrialPruned() diff --git a/theseus/base/callbacks/timer_callbacks.py b/theseus/base/callbacks/timer_callbacks.py index 9bf121d..a719f6b 100644 --- a/theseus/base/callbacks/timer_callbacks.py +++ b/theseus/base/callbacks/timer_callbacks.py @@ -19,9 +19,6 @@ class TimerCallbacks(Callbacks): Callbacks for logging running loss/metric/time while training Features: - Only do logging - - print_interval: `int` - iteration cycle to log out """ def __init__(self, **kwargs) -> None: diff --git a/theseus/base/callbacks/wandb_callbacks.py b/theseus/base/callbacks/wandb_callbacks.py index 56161f5..01dfc3c 100644 --- a/theseus/base/callbacks/wandb_callbacks.py +++ b/theseus/base/callbacks/wandb_callbacks.py @@ -4,6 +4,8 @@ from datetime import datetime from typing import Dict +from deepdiff import DeepDiff + from theseus.base.callbacks.base_callbacks import Callbacks from theseus.base.utilities.loggers.observer import LoggerObserver from theseus.base.utilities.loggers.wandb_logger import WandbLogger, find_run_id @@ -17,6 +19,26 @@ LOGGER = LoggerObserver.getLogger("main") +def pretty_print_diff(diff): + texts = [] + for type_key in diff.keys(): + for config_key in diff[type_key].keys(): + if type_key == "values_changed": + texts.append( + config_key + + ": " + + str(diff[type_key][config_key]["old_value"]) + + "-->" + + str(diff[type_key][config_key]["new_value"]) + ) + elif "item_removed" in type_key: + texts.append(config_key + ": " + str(diff[type_key][config_key])) + elif "item_added" in type_key: + texts.append(config_key + ": " + str(diff[type_key][config_key])) + + return "\n".join(texts) + + class WandbCallbacks(Callbacks): """ Callbacks for logging running loss/metric/time while training to wandb server @@ -66,6 +88,8 @@ def __init__( old_config_path = wandblogger.restore( "pipeline.yaml", run_path=f"{self.username}/{self.project_name}/{run_id}", + root=f".cache/{run_id}/", + replace=True, ).name except Exception: raise ValueError( @@ -85,11 +109,33 @@ def __init__( LoggerObserver.SUCCESS, ) else: - self.id = wandblogger.util.generate_id() + diff = DeepDiff(old_config_dict, tmp_config_dict) + diff_text = pretty_print_diff(diff) + + LOGGER.text( + f"Config values mismatched: {diff_text}", + level=LoggerObserver.WARN, + ) LOGGER.text( - "Run configuration changes since the last run. Creating new wandb run...", + """Run configuration changes since the last run. Decide: + (1) Terminate run + (2) Create new run + """, LoggerObserver.WARN, ) + + answer = int(input()) + assert answer in [1, 2], "Wrong input" + if answer == 2: + LOGGER.text( + "Creating new wandb run...", + LoggerObserver.WARN, + ) + self.id = wandblogger.util.generate_id() + else: + LOGGER.text("Terminating run...", level=LoggerObserver.ERROR) + raise InterruptedError() + except ValueError as e: LOGGER.text( f"Can not resume wandb due to '{e}'. Creating new wandb run...", @@ -108,6 +154,7 @@ def __init__( run_name=self.run_name, config_dict=self.config_dict, group_name=group_name, + **kwargs, ) LOGGER.subscribe(self.wandb_logger) diff --git a/theseus/base/datasets/dataset.py b/theseus/base/datasets/dataset.py index 8cefbfd..2df139a 100644 --- a/theseus/base/datasets/dataset.py +++ b/theseus/base/datasets/dataset.py @@ -61,7 +61,11 @@ class ImageDataset(data.Dataset): """ def __init__( - self, image_dir: str, txt_classnames: str, transform: List = None, **kwargs + self, + image_dir: str, + txt_classnames: str = None, + transform: List = None, + **kwargs ): super().__init__() self.image_dir = image_dir @@ -73,8 +77,9 @@ def load_data(self): """ Load filepaths into memory """ - with open(self.txt_classnames, "r") as f: - self.classnames = f.read().splitlines() + if self.txt_classnames: + with open(self.txt_classnames, "r") as f: + self.classnames = f.read().splitlines() self.fns = [] image_names = os.listdir(self.image_dir) for image_name in image_names: @@ -93,10 +98,10 @@ def __getitem__(self, index: int): try: im = self.transform(im) except: - im = self.transform(image=np.array(im))["image"] + im = self.transform(image=np.array(im) / 255.0)["image"] return { - "input": im, + "input": im.float(), "img_name": image_name, "ori_size": [width, height], } diff --git a/theseus/base/pipeline.py b/theseus/base/pipeline.py index 1dd1275..e4d9cd3 100644 --- a/theseus/base/pipeline.py +++ b/theseus/base/pipeline.py @@ -17,6 +17,7 @@ from theseus.base.utilities.getter import get_instance, get_instance_recursively from theseus.base.utilities.loading import load_state_dict from theseus.base.utilities.loggers import FileLogger, ImageWriter, LoggerObserver +from theseus.base.utilities.seed import seed_everything from theseus.opt import Config @@ -26,6 +27,10 @@ class BasePipeline(object): def __init__(self, opt: Config): super(BasePipeline, self).__init__() self.opt = opt + self.seed = self.opt["global"].get("seed", 1702) + seed_everything(self.seed) + + self.initialized = False def init_globals(self): # Main Loggers @@ -63,7 +68,14 @@ def init_globals(self): self.logger.subscribe(image_logger) if self.transform_cfg is not None: + self.logger.text( + "cfg_transform is deprecated, please use 'includes' instead", + level=LoggerObserver.WARN, + ) self.transform_cfg = Config.load_yaml(self.transform_cfg) + self.opt["augmentations"] = self.transform_cfg + else: + self.transform_cfg = self.opt.get("augmentations", None) self.device = get_device(self.device_name) @@ -137,7 +149,7 @@ def init_model(self): model = get_instance( self.opt["model"], registry=self.model_registry, - num_classes=len(CLASSNAMES), + num_classes=len(CLASSNAMES) if CLASSNAMES is not None else None, classnames=CLASSNAMES, ) model = move_to(model, self.device) @@ -148,7 +160,7 @@ def init_criterion(self): self.criterion = get_instance_recursively( self.opt["loss"], registry=self.loss_registry, - num_classes=len(CLASSNAMES), + num_classes=len(CLASSNAMES) if CLASSNAMES is not None else None, classnames=CLASSNAMES, ) self.criterion = move_to(self.criterion, self.device) @@ -170,7 +182,7 @@ def init_metrics(self): self.metrics = get_instance_recursively( self.opt["metrics"], registry=self.metric_registry, - num_classes=len(CLASSNAMES), + num_classes=len(CLASSNAMES) if CLASSNAMES is not None else None, classnames=CLASSNAMES, ) @@ -195,7 +207,7 @@ def init_loading(self): self.last_epoch = iters // len(self.train_dataloader) - 1 def init_scheduler(self): - if "scheduler" in self.opt.keys(): + if "scheduler" in self.opt.keys() and self.opt["scheduler"] is not None: self.scheduler = get_instance( self.opt["scheduler"], registry=self.scheduler_registry, @@ -222,7 +234,6 @@ def init_scheduler(self): def init_callbacks(self): callbacks = get_instance_recursively( self.opt["callbacks"], - save_interval=self.opt["trainer"]["args"]["save_interval"], save_dir=getattr(self, "savedir", "runs"), resume=getattr(self, "resume", None), config_dict=self.opt, @@ -246,7 +257,6 @@ def init_trainer(self, callbacks): def save_configs(self): self.opt.save_yaml(os.path.join(self.savedir, "pipeline.yaml")) - self.transform_cfg.save_yaml(os.path.join(self.savedir, "transform.yaml")) def init_registry(self): self.model_registry = MODEL_REGISTRY @@ -265,6 +275,8 @@ def init_registry(self): ) def init_pipeline(self, train=False): + if self.initialized: + return self.init_globals() self.init_registry() if train: @@ -285,18 +297,24 @@ def init_pipeline(self, train=False): callbacks = [] if getattr(self, "metrics", None): - callbacks.insert(0, self.callbacks_registry.get("MetricLoggerCallbacks")()) + callbacks.insert( + 0, + self.callbacks_registry.get("MetricLoggerCallbacks")( + save_dir=self.savedir + ), + ) if getattr(self, "criterion", None): callbacks.insert( 0, self.callbacks_registry.get("LossLoggerCallbacks")( - print_interval=self.opt["trainer"]["args"].get("print_interval", 1), + print_interval=self.opt["global"].get("print_interval", None), ), ) if self.debug: callbacks.insert(0, self.callbacks_registry.get("DebugCallbacks")()) callbacks.insert(0, self.callbacks_registry.get("TimerCallbacks")()) self.init_trainer(callbacks) + self.initialized = True def fit(self): self.init_pipeline(train=True) @@ -305,7 +323,7 @@ def fit(self): def evaluate(self): self.init_pipeline(train=False) self.logger.text("Evaluating...", level=LoggerObserver.INFO) - self.trainer.evaluate_epoch() + return self.trainer.evaluate_epoch() class BaseTestPipeline(object): @@ -313,34 +331,45 @@ def __init__(self, opt: Config): super(BaseTestPipeline, self).__init__() self.opt = opt + self.seed = self.opt["global"].get("seed", 1702) + seed_everything(self.seed) def init_globals(self): # Main Loggers self.logger = LoggerObserver.getLogger("main") # Global variables - self.exp_name = self.opt["global"]["exp_name"] - self.exist_ok = self.opt["global"]["exist_ok"] - self.debug = self.opt["global"]["debug"] - self.device_name = self.opt["global"]["device"] - self.transform_cfg = Config.load_yaml(self.opt["global"]["cfg_transform"]) + self.exp_name = self.opt["global"].get("exp_name", None) + self.exist_ok = self.opt["global"].get("exist_ok", False) + self.debug = self.opt["global"].get("debug", False) + self.device_name = self.opt["global"].get("device", "cpu") + self.transform_cfg = self.opt["global"].get("cfg_transform", None) self.device = get_device(self.device_name) # Experiment name if self.exp_name: self.savedir = os.path.join( - self.opt["global"]["save_dir"], self.exp_name, "test" + self.opt["global"].get("save_dir", "tests"), self.exp_name ) if not self.exist_ok: self.savedir = get_new_folder_name(self.savedir) else: self.savedir = os.path.join( - self.opt["global"]["save_dir"], + self.opt["global"].get("save_dir", "tests"), datetime.now().strftime("%Y-%m-%d_%H-%M-%S"), - "test", ) os.makedirs(self.savedir, exist_ok=True) + if self.transform_cfg is not None: + self.logger.text( + "cfg_transform is deprecated, please use 'includes' instead", + level=LoggerObserver.WARN, + ) + self.transform_cfg = Config.load_yaml(self.transform_cfg) + self.opt["augmentations"] = self.transform_cfg + else: + self.transform_cfg = self.opt.get("augmentations", None) + # Logging to files file_logger = FileLogger(__name__, self.savedir, debug=self.debug) self.logger.subscribe(file_logger) @@ -394,17 +423,17 @@ def init_test_dataloader(self): ) def init_loading(self): - self.weights = self.opt["global"]["weights"] + self.weights = self.opt["global"].get("weights", None) if self.weights: state_dict = torch.load(self.weights, map_location="cpu") self.model = load_state_dict(self.model, state_dict, "model") def init_model(self): - CLASSNAMES = self.dataset.classnames + CLASSNAMES = getattr(self.dataset, "classnames", None) self.model = get_instance( self.opt["model"], registry=MODEL_REGISTRY, - num_classes=len(CLASSNAMES), + num_classes=len(CLASSNAMES) if CLASSNAMES is not None else None, classnames=CLASSNAMES, ) self.model = move_to(self.model, self.device) diff --git a/theseus/base/trainer/supervised_trainer.py b/theseus/base/trainer/supervised_trainer.py index da7c314..04a1837 100644 --- a/theseus/base/trainer/supervised_trainer.py +++ b/theseus/base/trainer/supervised_trainer.py @@ -171,3 +171,5 @@ def evaluate_epoch(self): "last_outputs": outputs["model_outputs"], }, ) + + return metric_dict diff --git a/theseus/base/utilities/download.py b/theseus/base/utilities/download.py index e568748..16553a1 100644 --- a/theseus/base/utilities/download.py +++ b/theseus/base/utilities/download.py @@ -85,6 +85,6 @@ def download_from_wandb(filename, run_path, save_dir, rename=None, generate_id_t LOGGER.text("Saved to {}".format((Path(save_dir) / path.name).resolve()), level=LoggerObserver.INFO) return path.name - except: - LOGGER.text("Failed to download from wandb.", level=LoggerObserver.ERROR) + except Exception as e: + LOGGER.text(f"Failed to download from wandb. {e}", level=LoggerObserver.ERROR) return None diff --git a/theseus/base/utilities/loading.py b/theseus/base/utilities/loading.py index 7170084..a6741d2 100644 --- a/theseus/base/utilities/loading.py +++ b/theseus/base/utilities/loading.py @@ -48,7 +48,7 @@ def load_state_dict(instance, state_dict, key=None, strict=True): instance.load_state_dict(_state_dict) LOGGER.text("Loaded Successfully!", level=LoggerObserver.SUCCESS) - except RuntimeError as e: + except Exception as e: if not strict: LOGGER.text( f"Loaded Successfully. Ignoring {e}", diff --git a/theseus/base/utilities/loggers/observer.py b/theseus/base/utilities/loggers/observer.py index 203b61a..d84399e 100644 --- a/theseus/base/utilities/loggers/observer.py +++ b/theseus/base/utilities/loggers/observer.py @@ -81,6 +81,11 @@ def __init__(self, name) -> None: LoggerObserver.instances[name] = self + def __del__(self): + for subcriber in self.subscriber: + del subcriber + LoggerObserver.instances.pop(self.name) + @classmethod def getLogger(cls, name): if name in LoggerObserver.instances.keys(): diff --git a/theseus/base/utilities/loggers/tsb_logger.py b/theseus/base/utilities/loggers/tsb_logger.py index 052c21c..e4f9f53 100644 --- a/theseus/base/utilities/loggers/tsb_logger.py +++ b/theseus/base/utilities/loggers/tsb_logger.py @@ -8,6 +8,15 @@ import torch from PIL import Image from tensorboard.backend.event_processing.event_accumulator import EventAccumulator + +try: + import tensorboard as tb + import tensorflow as tf + + tf.io.gfile = tb.compat.tensorflow_stub.io.gfile +except: + pass + from torch.utils.tensorboard import SummaryWriter from torchvision.transforms import ToTensor diff --git a/theseus/base/utilities/loggers/wandb_logger.py b/theseus/base/utilities/loggers/wandb_logger.py index 3d96480..c3ff34e 100644 --- a/theseus/base/utilities/loggers/wandb_logger.py +++ b/theseus/base/utilities/loggers/wandb_logger.py @@ -29,6 +29,7 @@ def __init__( group_name: str = None, save_dir: str = None, config_dict: Dict = None, + **kwargs, ): self.project_name = project_name self.username = username @@ -47,6 +48,8 @@ def __init__( project=project_name, name=run_name, resume="allow", + reinit=kwargs.get("reinit", False), + tags=kwargs.get("tags", None), ) wandb_logger.watch_called = False @@ -76,6 +79,11 @@ def log_scalar(self, tag, value, step, **kwargs): :param step: (int) logging step """ + # define our custom x axis metric + wandb_logger.define_metric("iterations") + # define which metrics will be plotted against it + wandb_logger.define_metric(tag, step_metric="iterations") + wandb_logger.log({tag: value, "iterations": step}) def log_figure(self, tag, value, step=0, **kwargs): @@ -179,7 +187,7 @@ def log_embedding( import pandas as pd - df_dict = {"embeddings": [e for e in value]} + df_dict = {"embeddings": [e for e in value.tolist()]} if metadata is not None and metadata_header is not None: for meta in metadata: for idx, item in enumerate(meta): diff --git a/theseus/base/utilities/optuna_tuner.py b/theseus/base/utilities/optuna_tuner.py new file mode 100644 index 0000000..0b184fb --- /dev/null +++ b/theseus/base/utilities/optuna_tuner.py @@ -0,0 +1,249 @@ +import os +import os.path as osp +from copy import deepcopy + +import optuna +from optuna.visualization import ( + plot_contour, + plot_edf, + plot_intermediate_values, + plot_optimization_history, + plot_parallel_coordinate, + plot_param_importances, + plot_slice, +) + +from theseus.base.callbacks.optuna_callbacks import OptunaCallbacks +from theseus.base.pipeline import BasePipeline +from theseus.base.utilities.loggers import LoggerObserver +from theseus.opt import Config + + +class OptunaWrapper: + def __init__( + self, + storage=None, + study_name: str = None, + n_trials: int = 100, + direction: str = "maximize", + pruner=None, + sampler=None, + save_dir: str = None, + ) -> None: + + self.logger = LoggerObserver.getLogger("main") + self.storage = storage + self.study_name = study_name + self.n_trials = n_trials + self.direction = direction + self.pruner = pruner + self.sampler = sampler + self.save_dir = save_dir + if save_dir is not None: + os.makedirs(save_dir, exist_ok=True) + + self.study = optuna.create_study( + study_name=study_name, + direction=direction, + storage=self.storage, + load_if_exists=True, + pruner=pruner, + sampler=sampler, + ) + + def tune( + self, + config: Config, + pipeline_class: BasePipeline, + trial_user_attrs: dict = {}, + ): + + if "optuna" not in config.keys(): + self.logger.text( + "Optuna key not found in config. Exit optuna", + level=LoggerObserver.CRITICAL, + ) + raise ValueError() + + wrapped_objective = lambda trial: self.objective( + trial, config, pipeline_class, trial_user_attrs + ) + + self.study.optimize(wrapped_objective, n_trials=self.n_trials) + best_trial = self.study.best_trial + self.save_best_config(self.save_dir, config, best_trial.params) + self._rename_params() + return best_trial + + def save_best_config(self, save_dir: str, config: Config, best_params: dict): + for param_str, param_val in best_params.items(): + here = config + keys = param_str.split(".") + for key in keys[:-1]: + here = here.setdefault(key, {}) + here[keys[-1]] = param_val + save_dir = osp.join(save_dir, "best_configs") + os.makedirs(save_dir, exist_ok=True) + config.save_yaml(osp.join(save_dir, "best_pipeline.yaml")) + self.logger.text( + f"Best configuration saved at {save_dir}", level=LoggerObserver.INFO + ) + + def _override_dict_with_optuna( + self, trial, config: Config, param_str: str, variable_type: str + ): + """ + Override config with optuna suggested params + """ + # Start off pointing at the original dictionary that was passed in. + here = config + + # Turn the string of key names into a list of strings. + keys = param_str.split(".") + + # For every key *before* the last one, we concentrate on navigating through the dictionary. + for key in keys[:-1]: + # Try to find here[key]. If it doesn't exist, create it with an empty dictionary. Then, + # update our `here` pointer to refer to the thing we just found (or created). + here = here.setdefault(key, {}) + + # Finally, set the final key to the given value + old_value = here[keys[-1]] + + if variable_type == "int": + low_value, high_value = old_value + here[keys[-1]] = trial.suggest_int(param_str, low_value, high_value) + elif variable_type == "loguniform": + low_value, high_value = old_value + here[keys[-1]] = trial.suggest_loguniform(param_str, low_value, high_value) + + elif variable_type == "float": + low_value, high_value = old_value + here[keys[-1]] = trial.suggest_float(param_str, low_value, high_value) + + elif variable_type == "categorical": + here[keys[-1]] = trial.suggest_categorical(param_str, old_value) + + else: + self.logger.text( + f"{variable_type} is not supported by Optuna", + level=LoggerObserver.ERROR, + ) + raise ValueError() + + def objective( + self, + trial: optuna.Trial, + config: Config, + pipeline_class: BasePipeline, + trial_user_attrs: dict = {}, + ): + """Define the objective function""" + + # Override config with optuna trials values + tmp_config = deepcopy(config) + optuna_params = tmp_config["optuna"] + for variable_type in optuna_params.keys(): + for param_str in optuna_params[variable_type]: + self._override_dict_with_optuna( + trial, tmp_config, param_str, variable_type + ) + + # Set fixed run's config + for key, value in trial_user_attrs.items(): + trial.set_user_attr(key, value) + + if tmp_config["global"]["exp_name"] is not None: + tmp_config["global"]["exp_name"] += f"_{trial.number}" + tmp_config["global"]["save_dir"] = self.save_dir + + # Hook a callback inside pipeline + pipeline = pipeline_class(tmp_config) + pipeline.init_trainer = self.callback_hook( + trial=trial, init_trainer_function=pipeline.init_trainer + ) + + # Start training and evaluation + pipeline.fit() + score_dict = pipeline.evaluate() + del tmp_config + + best_key = trial_user_attrs.get("best_key", None) + if best_key is not None: + return score_dict[best_key] + return score_dict + + def callback_hook(self, trial, init_trainer_function): + callback = OptunaCallbacks(trial=trial) + + def hook_optuna_callback(callbacks): + callbacks.append(callback) + init_trainer_function(callbacks) + + return hook_optuna_callback + + def _rename_params(self): + trials = self.study.get_trials(deepcopy=False) + for trial in trials: + trial_param_names = list(trial.params.keys()) + if len(trial_param_names) == 1: + break + common_prefix = osp.commonprefix(trial_param_names) + if common_prefix != "": + for trial_param_name in trial_param_names: + new_param_name = trial_param_name.replace(common_prefix, "") + trial.params.update( + {new_param_name: trial.params[trial_param_name]} + ) + trial.distributions.update( + {new_param_name: trial.distributions[trial_param_name]} + ) + del trial.params[trial_param_name] + del trial.distributions[trial_param_name] + + def leaderboard(self): + """Print leaderboard of all trials""" + df = self.study.trials_dataframe() + df.columns = [col.replace("user_attrs_", "") for col in df.columns] + return df + + def visualize(self, plot: str, plot_params: dict = {}): + """Visualize everything""" + + allow_plot_types = [ + "history", + "contour", + "edf", + "intermediate_values", + "parallel_coordinate", + "param_importances", + "slice", + ] + assert plot in ["all", *allow_plot_types], f"{plot} is not supported by Optuna" + + if plot == "history": + fig = plot_optimization_history(self.study, **plot_params) + elif plot == "contour": + fig = plot_contour(self.study, **plot_params) + elif plot == "edf": + fig = plot_edf(self.study, **plot_params) + elif plot == "intermediate_values": + fig = plot_intermediate_values(self.study, **plot_params) + elif plot == "parallel_coordinate": + fig = plot_parallel_coordinate(self.study, **plot_params) + elif plot == "param_importances": + fig = plot_param_importances(self.study, **plot_params) + elif plot == "slice": + fig = plot_slice(self.study, **plot_params) + elif plot == "all": + fig = [] + for plot_type in allow_plot_types: + one_fig = self.visualize(plot_type, plot_params) + fig.append((plot_type, one_fig)) + else: + self.logger.text( + f"{plot} is not supported by Optuna", level=LoggerObserver.ERROR + ) + raise ValueError() + + return fig diff --git a/theseus/base/utilities/seed.py b/theseus/base/utilities/seed.py index 24f99ab..6389cf4 100644 --- a/theseus/base/utilities/seed.py +++ b/theseus/base/utilities/seed.py @@ -1,11 +1,20 @@ +import os import random import numpy as np import torch SEED = 1702 -# Inherited from https://github.com/vltanh/pytorch-template -def seed_everything(seed=SEED): - np.random.seed(seed) + + +def seed_everything(seed: int = SEED): + """ + https://gist.github.com/ihoromi4/b681a9088f348942b01711f251e5f964 + """ random.seed(seed) + os.environ["PYTHONHASHSEED"] = str(seed) + np.random.seed(seed) torch.manual_seed(seed) + torch.cuda.manual_seed(seed) + torch.backends.cudnn.deterministic = True + torch.backends.cudnn.benchmark = False diff --git a/theseus/cv/base/augmentations/albumentation.py b/theseus/cv/base/augmentations/albumentation.py index cd357d1..8c56394 100644 --- a/theseus/cv/base/augmentations/albumentation.py +++ b/theseus/cv/base/augmentations/albumentation.py @@ -5,6 +5,7 @@ HorizontalFlip, HueSaturationValue, IAASharpen, + LongestMaxSize, MedianBlur, MotionBlur, Normalize, @@ -41,3 +42,4 @@ TRANSFORM_REGISTRY.register(RandomSizedCrop, prefix="Alb") TRANSFORM_REGISTRY.register(IAASharpen, prefix="Alb") TRANSFORM_REGISTRY.register(ToTensorV2, prefix="Alb") +TRANSFORM_REGISTRY.register(LongestMaxSize, prefix="Alb") diff --git a/theseus/cv/base/utilities/visualization/visualizer.py b/theseus/cv/base/utilities/visualization/visualizer.py index dc05fc6..264cb32 100644 --- a/theseus/cv/base/utilities/visualization/visualizer.py +++ b/theseus/cv/base/utilities/visualization/visualizer.py @@ -24,6 +24,10 @@ class Visualizer: def __init__(self): self.image: Optional[np.ndarray] = None self.class_names = None + self.set_color(color_list) + + def set_color(self, color_list): + self.color_list = color_list def set_image(self, image: np.ndarray) -> None: """ @@ -164,10 +168,10 @@ def draw_bbox(self, boxes, labels=None, scores=None) -> None: else: box, label = item score = None - color = color_list[int(label)] + color = self.color_list[int(label)] else: box, label, score = item, None, None - color = color_list[1] + color = self.color_list[1] coord = [box[0], box[1], box[2], box[3]] c1, c2 = (int(coord[0]), int(coord[1])), ( @@ -256,22 +260,33 @@ def denormalize( img_show = np.clip(img_show, 0, 1) return img_show - def denormalize_bboxes(self, boxes, order, image_shape=None) -> np.ndarray: + def denormalize_bboxes( + self, boxes, order=None, image_shape=None, auto_scale: bool = True + ) -> np.ndarray: """ Denormalize bboxes and return image: `torch.Tensor` or `np.ndarray` image to be denormalized """ - if image_shape is not None: - boxes[:, [0, 2]] *= image_shape[1] - boxes[:, [1, 3]] *= image_shape[0] - from theseus.cv.detection.augmentations.bbox_transforms import BoxOrder + if auto_scale: + bbox_normalized = False + if isinstance(boxes, np.ndarray) and np.amax(boxes) <= 1.0: + bbox_normalized = True + if isinstance(boxes, torch.Tensor) and torch.max(boxes) <= 1.0: + bbox_normalized = True + if bbox_normalized and image_shape is not None: + boxes[:, [0, 2]] *= image_shape[1] + boxes[:, [1, 3]] *= image_shape[0] + + if order is not None: + from theseus.cv.detection.augmentations.bbox_transforms import BoxOrder + + denom = BoxOrder(order) + boxes = denom.apply_to_bboxes(boxes) + boxes = np.stack([torch.stack(i, dim=0).numpy() for i in boxes]).astype(int) - denom = BoxOrder(order) - new_boxes = denom.apply_to_bboxes(boxes) - new_boxes = np.stack([torch.stack(i, dim=0).numpy() for i in new_boxes]) - return new_boxes.astype(int) + return boxes def decode_segmap( self, segmap: np.ndarray, num_classes: Optional[int] = None @@ -294,7 +309,7 @@ def decode_segmap( if num_classes is None: num_classes = int(np.max(segmap)) + 1 - palette = np.array(color_list[:num_classes]) * 255 + palette = np.array(self.color_list[:num_classes]) * 255 palette = palette[:, ::-1].astype(np.uint8) segmap = segmap.astype(np.uint8) diff --git a/theseus/cv/classification/augmentations/custom.py b/theseus/cv/classification/augmentations/custom.py index b7d6c8b..925c718 100644 --- a/theseus/cv/classification/augmentations/custom.py +++ b/theseus/cv/classification/augmentations/custom.py @@ -9,7 +9,7 @@ import numpy as np import torch -from albumentations.augmentations.bbox_utils import denormalize_bbox, normalize_bbox +from albumentations.core.bbox_utils import denormalize_bbox, normalize_bbox from albumentations.core.transforms_interface import DualTransform from torch import Tensor from torchvision.transforms import functional as F diff --git a/theseus/cv/classification/callbacks/gradcam_callbacks.py b/theseus/cv/classification/callbacks/gradcam_callbacks.py index 2ebb53b..de0bbf9 100644 --- a/theseus/cv/classification/callbacks/gradcam_callbacks.py +++ b/theseus/cv/classification/callbacks/gradcam_callbacks.py @@ -1,4 +1,4 @@ -from typing import Dict +from typing import Dict, List import matplotlib.pyplot as plt import torch @@ -21,9 +21,16 @@ class GradCAMVisualizationCallbacks(Callbacks): """ - def __init__(self, **kwargs) -> None: + def __init__( + self, + mean: List[float] = [0.485, 0.456, 0.406], + std: List[float] = [0.229, 0.224, 0.225], + **kwargs + ) -> None: super().__init__() self.visualizer = Visualizer() + self.mean = mean + self.std = std @torch.enable_grad() # enable grad for CAM def on_val_epoch_end(self, logs: Dict = None): @@ -72,7 +79,7 @@ def on_val_epoch_end(self, logs: Dict = None): label = label_indices[idx] grayscale_cam = grayscale_cams[idx, :] - img_show = self.visualizer.denormalize(image) + img_show = self.visualizer.denormalize(image, mean=self.mean, std=self.std) if valloader.dataset.classnames is not None: label = valloader.dataset.classnames[label] target = valloader.dataset.classnames[target] diff --git a/theseus/cv/classification/callbacks/visualize_callbacks.py b/theseus/cv/classification/callbacks/visualize_callbacks.py index 9c90448..67049b7 100644 --- a/theseus/cv/classification/callbacks/visualize_callbacks.py +++ b/theseus/cv/classification/callbacks/visualize_callbacks.py @@ -1,4 +1,4 @@ -from typing import Dict +from typing import Dict, List import matplotlib.pyplot as plt import torch @@ -22,10 +22,17 @@ class ClassificationVisualizerCallbacks(Callbacks): """ - def __init__(self, **kwargs) -> None: + def __init__( + self, + mean: List[float] = [0.485, 0.456, 0.406], + std: List[float] = [0.229, 0.224, 0.225], + **kwargs, + ) -> None: super().__init__() self.visualizer = Visualizer() + self.mean = mean + self.std = std def sanitycheck(self, logs: Dict = None): """ @@ -101,7 +108,7 @@ def visualize_gt(self, train_batch, val_batch, iters): batch = [] for idx, inputs in enumerate(images): - img_show = self.visualizer.denormalize(inputs) + img_show = self.visualizer.denormalize(inputs, mean=self.mean, std=self.std) img_cam = TFF.to_tensor(img_show) batch.append(img_cam) grid_img = self.visualizer.make_grid(batch) @@ -156,7 +163,7 @@ def on_val_epoch_end(self, logs: Dict = None): label = label_indices[idx] score = scores[idx] - img_show = self.visualizer.denormalize(image) + img_show = self.visualizer.denormalize(image, mean=self.mean, std=self.std) self.visualizer.set_image(img_show) if valloader.dataset.classnames is not None: label = valloader.dataset.classnames[label] diff --git a/theseus/cv/classification/models/timm_models.py b/theseus/cv/classification/models/timm_models.py index b8d7cf8..ed8c0f5 100644 --- a/theseus/cv/classification/models/timm_models.py +++ b/theseus/cv/classification/models/timm_models.py @@ -40,11 +40,19 @@ def __init__( self.freeze = freeze if self.num_classes != 1000: - self.model = timm.create_model( - model_name, - pretrained=from_pretrained, - num_classes=self.num_classes, - ) + if self.num_classes == 0: + self.model = timm.create_model( + model_name, + pretrained=from_pretrained, + num_classes=self.num_classes, + global_pool="", # unpooled outputs + ) + else: + self.model = timm.create_model( + model_name, + pretrained=from_pretrained, + num_classes=self.num_classes, + ) else: self.model = timm.create_model(model_name, pretrained=from_pretrained) diff --git a/theseus/cv/detection/augmentations/compose.py b/theseus/cv/detection/augmentations/compose.py index a785510..d805591 100644 --- a/theseus/cv/detection/augmentations/compose.py +++ b/theseus/cv/detection/augmentations/compose.py @@ -2,9 +2,9 @@ class DetCompose: def __init__(self, transforms, **kwargs): self.transforms = transforms - def __call__(self, image, bboxes, class_labels): + def __call__(self, image, bboxes, class_labels, **kwargs): for t in self.transforms: - item = t(image=image, bboxes=bboxes, class_labels=class_labels) + item = t(image=image, bboxes=bboxes, class_labels=class_labels, **kwargs) image, bboxes, class_labels = ( item["image"], item["bboxes"], diff --git a/theseus/cv/detection/callbacks/visualization.py b/theseus/cv/detection/callbacks/visualization.py index ceca78c..f77624c 100644 --- a/theseus/cv/detection/callbacks/visualization.py +++ b/theseus/cv/detection/callbacks/visualization.py @@ -1,4 +1,4 @@ -from typing import Dict +from typing import Dict, List import matplotlib.patches as mpatches import matplotlib.pyplot as plt @@ -22,10 +22,18 @@ class DetectionVisualizerCallbacks(Callbacks): - Visualize prediction at every end of validation """ - def __init__(self, order, **kwargs) -> None: + def __init__( + self, + order: str = None, + mean: List[float] = [0.485, 0.456, 0.406], + std: List[float] = [0.229, 0.224, 0.225], + **kwargs + ) -> None: super().__init__() self.visualizer = Visualizer() self.order = order + self.mean = mean + self.std = std def sanitycheck(self, logs: Dict = None): """ @@ -58,9 +66,9 @@ def visualize_gt(self, train_batch, val_batch, iters, classnames): for idx, (inputs, ann) in enumerate(zip(images, anns)): boxes = ann["boxes"] labels = ann["labels"].numpy() - img_show = self.visualizer.denormalize(inputs) + img_show = self.visualizer.denormalize(inputs, mean=self.mean, std=self.std) decode_boxes = self.visualizer.denormalize_bboxes( - boxes, order=self.order, image_shape=img_show.shape[:2] + boxes, order=self.order, image_shape=img_show.shape[:2], auto_scale=True ) self.visualizer.set_image(img_show.copy()) @@ -108,9 +116,9 @@ def visualize_gt(self, train_batch, val_batch, iters, classnames): for idx, (inputs, ann) in enumerate(zip(images, anns)): boxes = ann["boxes"] labels = ann["labels"].numpy() - img_show = self.visualizer.denormalize(inputs) + img_show = self.visualizer.denormalize(inputs, mean=self.mean, std=self.std) decode_boxes = self.visualizer.denormalize_bboxes( - boxes, order=self.order, image_shape=img_show.shape[:2] + boxes, order=self.order, image_shape=img_show.shape[:2], auto_scale=True ) self.visualizer.set_image(img_show.copy()) @@ -167,9 +175,7 @@ def on_val_epoch_end(self, logs: Dict = None): images = last_batch["inputs"] targets = last_batch["targets"] - preds = model.model.get_prediction( - {"inputs": images, "img_sizes": images.shape[-2:]}, model.device - ) + preds = model.model.get_prediction({"inputs": images}, model.device) preds = [i for i in zip(preds["boxes"], preds["confidences"], preds["labels"])] @@ -178,7 +184,7 @@ def on_val_epoch_end(self, logs: Dict = None): # Ground truth boxes = target["boxes"] labels = target["labels"].numpy() - img_show = self.visualizer.denormalize(inputs) + img_show = self.visualizer.denormalize(inputs, mean=self.mean, std=self.std) self.visualizer.set_image(img_show.copy()) self.visualizer.draw_bbox(boxes, labels=labels) img_show = self.visualizer.get_image() @@ -186,7 +192,9 @@ def on_val_epoch_end(self, logs: Dict = None): # Prediction boxes, scores, labels = pred - decode_pred = self.visualizer.denormalize(inputs) + decode_pred = self.visualizer.denormalize( + inputs, mean=self.mean, std=self.std + ) self.visualizer.set_image(decode_pred.copy()) self.visualizer.draw_bbox(boxes, labels=labels, scores=scores) decode_pred = self.visualizer.get_image() diff --git a/theseus/cv/detection/datasets/coco.py b/theseus/cv/detection/datasets/coco.py index 9796361..5b19b73 100644 --- a/theseus/cv/detection/datasets/coco.py +++ b/theseus/cv/detection/datasets/coco.py @@ -131,8 +131,6 @@ def collate_fn(self, batch): targets = [s["target"] for s in batch] img_ids = [s["img_id"] for s in batch] img_names = [s["img_name"] for s in batch] - img_scales = torch.tensor([1.0] * len(batch), dtype=torch.float) - img_sizes = torch.tensor([imgs[0].shape[-2:]] * len(batch), dtype=torch.float) ori_sizes = [s["ori_size"] for s in batch] return { @@ -140,8 +138,6 @@ def collate_fn(self, batch): "targets": targets, "img_ids": img_ids, "img_names": img_names, - "img_sizes": img_sizes, - "img_scales": img_scales, "ori_sizes": ori_sizes, } diff --git a/theseus/cv/detection/metrics/map.py b/theseus/cv/detection/metrics/map.py index e11c668..4634f2d 100644 --- a/theseus/cv/detection/metrics/map.py +++ b/theseus/cv/detection/metrics/map.py @@ -1,6 +1,8 @@ +import hashlib import json import os import os.path as osp +from datetime import datetime import numpy as np from pycocotools.coco import COCO @@ -32,7 +34,7 @@ def __init__( self, num_classes, classnames, - min_iou=0.5, + min_iou=None, tmp_save_dir="./.cache", **kwargs, ): @@ -43,8 +45,11 @@ def __init__( self.tmp_save_dir = tmp_save_dir os.makedirs(self.tmp_save_dir, exist_ok=True) - self.gt_json = osp.join(self.tmp_save_dir, "gt_coco.json") - self.pred_json = osp.join(self.tmp_save_dir, "pred_coco.json") + date_string = datetime.now().strftime("%Y-%m-%d_%H-%M-%S") + self.filename = hashlib.sha256(date_string.encode("utf-8")).hexdigest() + + self.gt_json = osp.join(self.tmp_save_dir, f"{self.filename}_gt.json") + self.pred_json = osp.join(self.tmp_save_dir, f"{self.filename}_pred.json") self.reset() def reset(self): @@ -56,8 +61,7 @@ def reset(self): self.idx = 0 def update(self, output, batch): - img_sizes = batch["img_sizes"] - width, height = img_sizes[0, -2:] + width, height = batch["inputs"].shape[-2:] target = batch["targets"] img_ids = batch["img_ids"] image_names = batch["img_names"] @@ -188,19 +192,32 @@ def make_pred_json_file(self, path): if osp.isfile(self.pred_json): os.remove(self.pred_json) + with open(self.pred_json, "w") as outfile: json.dump(results, outfile) + return results + def value(self): self.make_gt_json_file(self.gt_json) - self.make_pred_json_file(self.pred_json) + results = self.make_pred_json_file(self.pred_json) + + if len(results) == 0: # empty prediction + return { + f"precision": 0, + f"recall": 0, + "f1_score": 0, + } + coco_gt = COCO(self.gt_json) coco_pred = coco_gt.loadRes(self.pred_json) # run COCO evaluation coco_eval = COCOeval(coco_gt, coco_pred, "bbox") coco_eval.params.imgIds = list(self.image_id_dict.keys()) - coco_eval.params.iouThrs = np.array([self.min_iou]) + + if self.min_iou is not None: + coco_eval.params.iouThrs = np.array([self.min_iou]) # Some other params for COCO eval # imgIds = [] @@ -211,44 +228,36 @@ def value(self): # areaRng = [[0 ** 2, 1e5 ** 2], [0 ** 2, 32 ** 2], [32 ** 2, 96 ** 2], [96 ** 2, 1e5 ** 2]] # areaRngLbl = ['all', 'small', 'medium', 'large'] # useCats = 1 - coco_eval.evaluate() coco_eval.accumulate() - - recall_stat = coco_eval.eval["recall"] - precision_stat = coco_eval.eval["precision"] - - num_classes = recall_stat.shape[1] - - recalls = [] - precisions = [] - - for i in range(num_classes): - recall_class = recall_stat[:, i, 0, -1] - precision_class = precision_stat[:, :, i, 0, -1] - - recall_class = recall_class[recall_class > -1] - ar = np.mean(recall_class) if recall_class.size else -1 - - precision_class = precision_class[precision_class > -1] - ap = np.mean(precision_class) if precision_class.size else -1 - - recalls.append(ar) - precisions.append(ap) - - np_precisions = np.array(precisions) - np_recalls = np.array(recalls) - - precision_all = sum(np_precisions[np_precisions != -1]) / ( - num_classes - sum(np_precisions == -1) - ) - recall_all = sum(np_recalls[np_recalls != -1]) / ( - num_classes - sum(np_recalls == -1) - ) - - f1_score = 2 * precision_all * recall_all / (precision_all + recall_all) - return { - f"precision": precision_all, - f"recall": recall_all, - "f1_score": f1_score, - } + coco_eval.summarize() + stats = coco_eval.stats + + if self.min_iou is None: + return { + "mAP_0.5:0.95": stats[0], + "mAP_0.5": stats[1], + "mAP_0.75": stats[2], + "mAP_small": stats[3], + "mAP_medium": stats[4], + "mAP_large": stats[5], + "mAR_1": stats[6], + "mAR_10": stats[7], + "mAR_100": stats[8], + "mAR_small": stats[9], + "mAR_medium": stats[10], + "mAR_large": stats[11], + } + else: + return { + f"mAP_{self.min_iou}": stats[0], + f"mAP_{self.min_iou}_small": stats[3], + f"mAP_{self.min_iou}_medium": stats[3], + f"mAP_{self.min_iou}_large": stats[3], + f"mAR_{self.min_iou}_1": stats[6], + f"mAR_{self.min_iou}_10": stats[7], + f"mAR_{self.min_iou}_100": stats[8], + f"mAR_{self.min_iou}_small": stats[9], + f"mAR_{self.min_iou}_medium": stats[10], + f"mAR_{self.min_iou}_large": stats[11], + } diff --git a/theseus/cv/detection/metrics/precision_recall.py b/theseus/cv/detection/metrics/precision_recall.py index a3c7f5d..9706598 100644 --- a/theseus/cv/detection/metrics/precision_recall.py +++ b/theseus/cv/detection/metrics/precision_recall.py @@ -1,9 +1,6 @@ -import os from typing import Dict, List import numpy as np -import pandas as pd -from tabulate import tabulate from theseus.base.metrics.metric_template import Metric diff --git a/theseus/cv/detection/utilities/fusion.py b/theseus/cv/detection/utilities/fusion.py index 61e2577..53850a7 100644 --- a/theseus/cv/detection/utilities/fusion.py +++ b/theseus/cv/detection/utilities/fusion.py @@ -53,14 +53,16 @@ def box_fusion( iou_thr=iou_threshold, ) + result_boxes = [] if image_size is not None: - result_boxes = [] for ens_boxes in picked_boxes: ens_boxes[0] = ens_boxes[0] * image_size[0] ens_boxes[1] = ens_boxes[1] * image_size[1] ens_boxes[2] = ens_boxes[2] * image_size[0] ens_boxes[3] = ens_boxes[3] * image_size[1] result_boxes.append(ens_boxes) + else: + result_boxes = picked_boxes return ( np.array(result_boxes), diff --git a/theseus/nlp/base/preprocessors/vocabulary.py b/theseus/nlp/base/preprocessors/vocabulary.py index 7f45014..9c7ad4c 100644 --- a/theseus/nlp/base/preprocessors/vocabulary.py +++ b/theseus/nlp/base/preprocessors/vocabulary.py @@ -60,7 +60,7 @@ def build_vocab(self, list_tokens): self.frequency[tok] = 0 self.frequency[tok] += 1 - for tok in list_tokens: + for tok in list(self.frequency.keys()): if self.max_freq is not None: if self.frequency[tok] > self.max_freq: self.frequency.pop(tok) diff --git a/theseus/opt.py b/theseus/opt.py index 003432e..543770c 100644 --- a/theseus/opt.py +++ b/theseus/opt.py @@ -4,6 +4,7 @@ import json from argparse import ArgumentParser, RawDescriptionHelpFormatter +from copy import deepcopy import yaml @@ -14,13 +15,39 @@ class Config(dict): - """Single level attribute dict, NOT recursive""" + """Single level attribute dict, recursive""" + + _depth = 0 + _yaml_paths = [] + + # def __new__(class_, yaml_path, *args, **kwargs): + # if yaml_path in class_._yaml_paths: + # LOGGER.text( + # "Circular includes detected in YAML initialization!", + # level=LoggerObserver.CRITICAL, + # ) + # raise ValueError() + # class_._yaml_paths.append(yaml_path) + # return dict.__new__(class_, yaml_path, *args, **kwargs) def __init__(self, yaml_path): super(Config, self).__init__() config = load_yaml(yaml_path) - super(Config, self).update(config) + + if "includes" in config.keys(): + final_config = {} + for include_yaml_path in config["includes"]: + tmp_config = Config(include_yaml_path) + final_config.update(tmp_config) + + final_config.update(config) + final_config.pop("includes") + super(Config, self).update(final_config) + else: + super(Config, self).update(config) + + # self._yaml_paths.pop(-1) # the last successful yaml will be popped out def __getattr__(self, key): if key in self: @@ -64,7 +91,17 @@ def _parse_opt(self, opts): return config for s in opts: s = s.strip() - k, v = s.split("=") + try: + k, v = s.split("=") + except ValueError: + LOGGER.text( + "Invalid option: {}, options should be in the format of key=value".format( + s + ), + level=LoggerObserver.ERROR, + ) + raise ValueError() + config[k] = yaml.load(v, Loader=yaml.Loader) return config diff --git a/theseus/tabular/base/preprocessors/__init__.py b/theseus/tabular/base/preprocessors/__init__.py index 42b6526..f8aee1d 100644 --- a/theseus/tabular/base/preprocessors/__init__.py +++ b/theseus/tabular/base/preprocessors/__init__.py @@ -1,6 +1,7 @@ from theseus.base.augmentations import TRANSFORM_REGISTRY from .aggregation import Aggregate +from .base import Preprocessor from .categorize import Categorize, EnforceType from .compose import PreprocessCompose from .csv_saver import CSVSaver @@ -10,9 +11,13 @@ DropDuplicatedRows, DropEmptyColumns, DropSingleValuedColumns, + LambdaDropRows, ) from .encoder import LabelEncode from .fill_nan import FillNaN +from .mapping import MapScreenToBinary +from .new_col import LambdaCreateColumn +from .sort import SortBy from .splitter import Splitter from .standardize import Standardize @@ -31,3 +36,7 @@ TRANSFORM_REGISTRY.register(Standardize) TRANSFORM_REGISTRY.register(Aggregate) TRANSFORM_REGISTRY.register(EnforceType) +TRANSFORM_REGISTRY.register(LambdaDropRows) +TRANSFORM_REGISTRY.register(LambdaCreateColumn) +TRANSFORM_REGISTRY.register(SortBy) +TRANSFORM_REGISTRY.register(MapScreenToBinary) diff --git a/theseus/tabular/base/preprocessors/base.py b/theseus/tabular/base/preprocessors/base.py index 31388eb..432f60d 100644 --- a/theseus/tabular/base/preprocessors/base.py +++ b/theseus/tabular/base/preprocessors/base.py @@ -2,13 +2,13 @@ from .name_filter import FilterColumnNames -try: - from pandarallel import pandarallel +# try: +# from pandarallel import pandarallel - pandarallel.initialize() - use_parallel = True -except: - use_parallel = False +# pandarallel.initialize() +# use_parallel = True +# except: +use_parallel = False LOGGER = LoggerObserver.getLogger("main") diff --git a/theseus/tabular/base/preprocessors/drop_col.py b/theseus/tabular/base/preprocessors/drop_col.py index 048486e..85d5cf4 100644 --- a/theseus/tabular/base/preprocessors/drop_col.py +++ b/theseus/tabular/base/preprocessors/drop_col.py @@ -16,6 +16,21 @@ def run(self, df): return df +class LambdaDropRows(Preprocessor): + def __init__(self, lambda_func, **kwargs): + super().__init__(**kwargs) + self.lambda_func = lambda_func + + def run(self, df): + self.prerun(df) + + ori_size = df.shape[0] + df = df.drop(df[df.apply(self.lambda_func, axis=1)].index) + dropped_size = ori_size - df.shape[0] + self.log(f"Dropped {dropped_size} rows based on lambda function") + return df + + class DropDuplicatedRows(Preprocessor): def __init__(self, **kwargs): super().__init__(**kwargs) diff --git a/theseus/tabular/base/preprocessors/mapping.py b/theseus/tabular/base/preprocessors/mapping.py new file mode 100644 index 0000000..ecf63f9 --- /dev/null +++ b/theseus/tabular/base/preprocessors/mapping.py @@ -0,0 +1,25 @@ +from theseus.base.utilities.loggers.observer import LoggerObserver + +from .base import Preprocessor + +LOGGER = LoggerObserver.getLogger("main") + + +class MapScreenToBinary(Preprocessor): + """ + mapping_dict should be dict of dicts; each inside dict is a mapping dict + """ + + def __init__(self, mapping_dict, **kwargs) -> None: + super().__init__(**kwargs) + self.mapping_dict = mapping_dict + + def run(self, df): + self.prerun(df) + + for column_name in self.column_names: + mapping_dict = self.mapping_dict[column_name] + df[column_name] = df[column_name].map(mapping_dict) + + self.log(f"Column values changed based on mapping: {self.column_names}") + return df diff --git a/theseus/tabular/base/preprocessors/new_col.py b/theseus/tabular/base/preprocessors/new_col.py new file mode 100644 index 0000000..e5b1ac5 --- /dev/null +++ b/theseus/tabular/base/preprocessors/new_col.py @@ -0,0 +1,21 @@ +from theseus.base.utilities.loggers.observer import LoggerObserver + +from .base import Preprocessor + +LOGGER = LoggerObserver.getLogger("main") + + +class LambdaCreateColumn(Preprocessor): + def __init__(self, target_column, lambda_func, **kwargs): + super().__init__(**kwargs) + self.target_column = target_column + self.lambda_func = lambda_func + + def run(self, df): + self.prerun(df) + + lambda_dict = {self.target_column: self.lambda_func} + + df = df.assign(**lambda_dict) + self.log(f"Created new columns: {self.target_column}") + return df diff --git a/theseus/tabular/base/preprocessors/sort.py b/theseus/tabular/base/preprocessors/sort.py new file mode 100644 index 0000000..eea60ec --- /dev/null +++ b/theseus/tabular/base/preprocessors/sort.py @@ -0,0 +1,17 @@ +from theseus.base.utilities.loggers.observer import LoggerObserver + +from .base import Preprocessor + +LOGGER = LoggerObserver.getLogger("main") + + +class SortBy(Preprocessor): + def __init__(self, ascending=True, **kwargs): + super().__init__(**kwargs) + self.ascending = ascending + + def run(self, df): + self.prerun(df) + + self.log(f"Sort rows by: {self.column_names}") + return df.sort_values(by=self.column_names, ascending=self.ascending) diff --git a/theseus/tabular/classification/callbacks/checkpoint_callbacks.py b/theseus/tabular/classification/callbacks/checkpoint_callbacks.py index 3b560fc..98be09d 100644 --- a/theseus/tabular/classification/callbacks/checkpoint_callbacks.py +++ b/theseus/tabular/classification/callbacks/checkpoint_callbacks.py @@ -1,3 +1,4 @@ +import os import os.path as osp from typing import Dict @@ -15,14 +16,13 @@ class SKLearnCheckpointCallbacks(Callbacks): def __init__( self, save_dir: str = "runs", - save_interval: int = 10, **kwargs, ) -> None: super().__init__() self.best_value = 0 - self.save_dir = save_dir - self.save_interval = save_interval + self.save_dir = osp.join(save_dir, "checkpoints") + os.makedirs(self.save_dir, exist_ok=True) def save_checkpoint(self, trainer, outname="last"): """ diff --git a/theseus/tabular/classification/pipeline.py b/theseus/tabular/classification/pipeline.py index fb52237..2a3cc69 100644 --- a/theseus/tabular/classification/pipeline.py +++ b/theseus/tabular/classification/pipeline.py @@ -18,7 +18,6 @@ class TabularPipeline(BasePipeline): def __init__(self, opt: Config): super(TabularPipeline, self).__init__(opt) - self.opt = opt def init_registry(self): super().init_registry() @@ -75,26 +74,6 @@ def init_validation_dataloader(self): level=LoggerObserver.INFO, ) - def init_metrics(self): - classnames = self.val_dataset["classnames"] - num_classes = len(classnames) - self.metrics = get_instance_recursively( - self.opt["metrics"], - num_classes=num_classes, - classnames=classnames, - registry=self.metric_registry, - ) - - def init_callbacks(self): - callbacks = get_instance_recursively( - self.opt["callbacks"], - save_dir=getattr(self, "save_dir", "runs"), - resume=getattr(self, "resume", None), - config_dict=self.opt, - registry=self.callbacks_registry, - ) - return callbacks - def init_trainer(self, callbacks=None): self.trainer = get_instance( self.opt["trainer"], @@ -106,13 +85,20 @@ def init_trainer(self, callbacks=None): registry=self.trainer_registry, ) + def init_loading(self): + if getattr(self, "pretrained", None): + self.model.load_model(self.pretrained) + def init_pipeline(self, train=False): + if self.initialized: + return self.init_globals() self.init_registry() if train: self.init_train_dataloader() self.init_validation_dataloader() self.init_model() + self.init_loading() self.init_metrics() callbacks = self.init_callbacks() self.save_configs() @@ -124,7 +110,22 @@ def init_pipeline(self, train=False): callbacks = [] if getattr(self, "metrics", None): - callbacks.insert(0, self.callbacks_registry.get("MetricLoggerCallbacks")()) + callbacks.insert( + 0, + self.callbacks_registry.get("MetricLoggerCallbacks")( + save_dir=self.savedir + ), + ) + if getattr(self, "criterion", None): + callbacks.insert( + 0, + self.callbacks_registry.get("LossLoggerCallbacks")( + print_interval=self.opt["global"].get("print_interval", None), + ), + ) + if self.debug: + callbacks.insert(0, self.callbacks_registry.get("DebugCallbacks")()) callbacks.insert(0, self.callbacks_registry.get("TimerCallbacks")()) self.init_trainer(callbacks=callbacks) + self.initialized = True diff --git a/theseus/tabular/classification/trainer/ml_trainer.py b/theseus/tabular/classification/trainer/ml_trainer.py index e817437..aa1f72b 100644 --- a/theseus/tabular/classification/trainer/ml_trainer.py +++ b/theseus/tabular/classification/trainer/ml_trainer.py @@ -35,7 +35,7 @@ def fit(self): ) self.callbacks.run("on_val_epoch_start") - metric_dict = self.evaluate() + metric_dict = self.evaluate_epoch() self.callbacks.run( "on_val_epoch_end", { @@ -47,7 +47,7 @@ def fit(self): ) self.callbacks.run("on_finish") - def evaluate(self): + def evaluate_epoch(self): """ Perform validation one epoch """