Commit ece69c64 authored by Patrick Scheibe's avatar Patrick Scheibe
Browse files

Add S_dataset for testing fractional sampling and include tests in container built

parent 46a43b89
......@@ -60,5 +60,12 @@ Stage: final
echo "This is an Ubuntu Container with Tensorflow and DFPL"
/bin/bash -c "source /.start_dfpl_env; $@"
%test
echo "Testing DFPL fingerprinting"
/bin/bash -c "source /.start_dfpl_env; pytest /deepFPlearn/tests"
%labels
Author Jana Schor, Patrick Scheibe, Matthias Bernt
Version v1.0
This diff is collapsed.
......@@ -6,19 +6,9 @@ import dfpl.options as opt
import dfpl.fingerprint as fp
import dfpl.autoencoder as ac
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
except RuntimeError as e:
print(e)
project_directory = pathlib.Path(__file__).parent.parent.absolute()
project_directory = pathlib.Path(__file__).parent.absolute()
test_train_args = opt.TrainOptions(
inputFile=f"{project_directory}/data/Sun_etal_dataset.csv",
inputFile=f"{project_directory}/data/S_dataset.csv",
outputDir=f"{project_directory}/modeltraining",
ecWeightsFile="Sun_etal_dataset.encoder.hdf5",
type='smiles',
......
......@@ -6,9 +6,9 @@ import dfpl.fingerprint as fp
import dfpl.autoencoder as ac
import dfpl.feedforwardNN as fNN
project_directory = pathlib.Path(__file__).parent.parent.absolute()
project_directory = pathlib.Path(__file__).parent.absolute()
test_train_args = opt.TrainOptions(
inputFile=f"{project_directory}/data/Sun_etal_dataset.csv",
inputFile=f"{project_directory}/data/S_dataset.csv",
outputDir=f"{project_directory}/modeltraining/",
ecWeightsFile="",
type='smiles',
......
......@@ -7,7 +7,7 @@ import dfpl.fingerprint as fp
import dfpl.autoencoder as ac
import dfpl.predictions as p
project_directory = pathlib.Path(__file__).parent.parent.absolute()
project_directory = pathlib.Path(__file__).parent.absolute()
test_predict_args = opt.PredictOptions(
inputFile=f"{project_directory}/data/Sun_etal_dataset.cids.predictionSet.csv",
outputDir=f"{project_directory}/validation/case_01/results/",
......
......@@ -7,9 +7,9 @@ import dfpl.feedforwardNN as fNN
import dfpl.options as opts
def test_prepare_nn_training_data():
project_directory = pathlib.Path(__file__).parent.parent.absolute()
df = fp.importDataFile(os.path.join(project_directory, "data", "Sun_etal_dataset.csv"))
def test_fractional_sampling():
test_directory = pathlib.Path(__file__).parent.absolute()
df = fp.importDataFile(os.path.join(test_directory, "data", "S_dataset.csv"))
targets = ["AR", "ER", "GR", "Aromatase", "TR", "PPARg"]
fractions = [0.5, 1.0, 2.0, 3.0]
......
import pytest
import pandas as pd
from rdkit import RDLogger
import dfpl.fingerprint as fp
correct_smiles = [
......@@ -41,6 +43,7 @@ def test_correct_mol_examples():
def test_incorrect_smiles():
RDLogger.DisableLog("rdApp.*")
df = pd.DataFrame(incorrect_smiles, columns=["smiles"])
df = fp.addFPColumn(df, fp_size=2048)
allNotNone = df[df["fp"].notnull()]
......
Markdown is supported
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