def test_cartesian_prediction_distance_matrix_output( self, run_config, builder_config): loader_config = { "loader_type": "ts_loader", "load_kwargs": { "output_distance_matrix": True }, } job = StructurePrediction({ "name": "test", "run_config": run_config, "loader_config": loader_config, "builder_config": dict(**builder_config, builder_type="cartesian_builder", prediction_type="cartesians", output_type="distance_matrix"), }) job.run()
def test_regression_to_structure_prediction_to_cross_validation( self, builder_config, run_config): job = Pipeline(jobs=[ Regression( exp_config={ "run_config": run_config, "loader_config": { "loader_type": "iso17_loader" }, "builder_config": dict(**builder_config, builder_type="force_builder"), }), StructurePrediction( exp_config={ "run_config": run_config, "loader_config": { "loader_type": "qm9_loader", "load_kwargs": { "modify_structures": True }, }, "builder_config": dict(**builder_config, builder_type="cartesian_builder"), }), CrossValidate( exp_config={ "run_config": run_config, "loader_config": { "loader_type": "ts_loader", "splitting": 5 }, "builder_config": dict(**builder_config, builder_type="cartesian_builder"), }), ]) job.run()
"seed": 1 }, jobs=[ StructurePrediction( exp_config={ "name": f"{Path(__file__).parent} QM9", "seed": 1, "run_config": { "epochs": 100, "test": True, "batch_size": 32 }, "loader_config": { "loader_type": "isom_loader", "path": "/home/rjackson/dev/tensor-field-networks/data/isomerization/isomerization_dataset" ".hd5f", "splitting": "75:20:5", }, "builder_config": { "builder_type": "cartesian_builder", "radial_factory": "single_dense", "prediction_type": "cartesians", "output_type": "cartesians", }, }), CrossValidate( exp_config={ "name": f"{Path(__file__).parent} TS",
from pathlib import Path from tfn.tools.jobs import Pipeline, CrossValidate, StructurePrediction job = Pipeline( exp_config={"name": f"{Path(__file__).parent}", "seed": 1}, jobs=[ StructurePrediction( exp_config={ "name": f"{Path(__file__).parent} QM9", "seed": 1, "run_config": {"epochs": 50, "test": False,}, "loader_config": { "loader_type": "qm9_loader", "splitting": "90:10:0", "load_kwargs": {"modify_structures": True, "custom_maxz": 36}, }, "builder_config": { "builder_type": "cartesian_builder", "radial_factory": "multi_dense", "prediction_type": "cartesians", "output_type": "cartesians", }, } ), CrossValidate( exp_config={ "name": f"{Path(__file__).parent} TS", "seed": 1, "run_config": {"epochs": 1000, "test": False, "batch_size": 48,}, "loader_config": { "loader_type": "ts_loader",
from pathlib import Path from tfn.tools.jobs import StructurePrediction job = StructurePrediction( exp_config={ "name": f"{Path(__file__).parent}", "notes": "", "seed": 1, "run_config": { "epochs": 100, "test": True, "batch_size": 32, }, "loader_config": { "loader_type": "isom_loader", "path": "/home/rjackson/dev/tensor-field-networks/data/isomerization/isomerization_dataset.hd5f", "splitting": "75:20:5", }, "builder_config": { "builder_type": "cartesian_builder", "radial_factory": "multi_dense", "prediction_type": "cartesians", "output_type": "cartesians", }, "lr_config": {"min_delta": 0.01, "patience": 30, "cooldown": 20}, } ) job.run()