Commit 52081a00 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Removed tests

parent bfcddbe1
Pipeline #59258 failed with stages
in 21 minutes and 26 seconds
from bob.bio.demographics.datasets import (
MedsTorchDataset,
MorphTorchDataset,
RFWTorchDataset,
)
import time
# https://pytorch.org/docs/stable/data.html
from torch.utils.data import DataLoader
import pytest
from bob.extension import rc
import os
@pytest.mark.skipif(
rc.get("bob.bio.demographics.directory") is None,
reason="Demographics features directory not available. Please do `bob config set bob.bio.demographics.directory [PATH]` to set the base features path.",
)
def test_meds():
database_path = os.path.join(
rc.get("bob.bio.demographics.directory"), "meds", "samplewrapper"
)
dataset = MedsTorchDataset(
protocol="verification_fold1",
database_path=database_path,
)
dataloader = DataLoader(
dataset, batch_size=64, shuffle=True, pin_memory=True, num_workers=2
)
batch = next(iter(dataloader))
batch["data"].shape == (64, 3, 112, 112)
@pytest.mark.skipif(
rc.get("bob.bio.demographics.directory") is None,
reason="Demographics features directory not available. Please do `bob config set bob.bio.demographics.directory [PATH]` to set the base features path.",
)
def test_morph():
database_path = os.path.join(
rc.get("bob.bio.demographics.directory"), "morph", "samplewrapper"
)
dataset = MorphTorchDataset(
protocol="verification_fold1",
database_path=database_path,
)
import ipdb
ipdb.set_trace()
# dataloader = DataLoader(
# dataset, batch_size=64, shuffle=True, pin_memory=True, num_workers=2
# )
dataloader = DataLoader(dataset, batch_size=64, shuffle=True)
batch = next(iter(dataloader))
batch["data"].shape == (64, 3, 112, 112)
@pytest.mark.skipif(
rc.get("bob.bio.demographics.directory") is None,
reason="Demographics features directory not available. Please do `bob config set bob.bio.demographics.directory [PATH]` to set the base features path.",
)
def test_rfw():
database_path = os.path.join(
rc.get("bob.bio.demographics.directory"), "rfw", "samplewrapper"
)
dataset = RFWTorchDataset(
protocol="original",
database_path=database_path,
)
# dataloader = DataLoader(
# dataset, batch_size=64, shuffle=True, pin_memory=True, num_workers=2
# )
dataloader = DataLoader(dataset, batch_size=64, shuffle=True)
batch = next(iter(dataloader))
batch["data"].shape == (64, 3, 112, 112)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment