def test_supervised_trainer_completes(self): mock_config_with_labels = mock_config.copy() mock_config_with_labels["label_names"] = [ "bionic/tests/inputs/mock_labels.json" ] mock_config_with_labels["lambda"] = 0.95 trainer = Trainer(mock_config_with_labels) trainer.train() trainer.forward()
def test_supervised_trainer_with_network_batching_completes(self): mock_config_with_labels_and_batching = mock_config.copy() mock_config_with_labels_and_batching["label_names"] = [ "bionic/tests/inputs/mock_labels.json" ] mock_config_with_labels_and_batching["lambda"] = 0.95 mock_config_with_labels_and_batching["sample_size"] = 1 trainer = Trainer(mock_config_with_labels_and_batching) trainer.train() trainer.forward()
def test_trainer_completes_on_cpu(self): Device._device = "cpu" assert Device() == "cpu" trainer = Trainer(mock_config) trainer.train() trainer.forward()
def test_svd_approximation_completes(self): mock_config_svd = mock_config.copy() mock_config_svd["svd_dim"] = 3 trainer = Trainer(mock_config_svd) trainer.train() trainer.forward()
def test_two_layer_completes(self): mock_config_two_layer = mock_config.copy() mock_config_two_layer["gat_shapes"]["n_layers"] = 2 trainer = Trainer(mock_config_two_layer) trainer.train() trainer.forward()
def test_network_batching_completes(self): mock_config_with_batching = mock_config.copy() mock_config_with_batching["sample_size"] = 1 trainer = Trainer(mock_config_with_batching) trainer.train() trainer.forward()
def test_trainer_completes(self): trainer = Trainer(mock_config) trainer.train() trainer.forward()
def test_shared_encoder_completes(self): mock_config_shared_encoder = mock_config.copy() mock_config_shared_encoder["shared_encoder"] = True trainer = Trainer(mock_config_shared_encoder) trainer.train() trainer.forward()