class_docstr: Base class for all drug target encoder-decoder architecture models, which is based on pytorch lightning wrapper,
  for more details about pytorch lightning, please check https://github.com/PyTorchLightning/pytorch-lightning.
  If you inherit from this class, a forward pass function must be implemented.
  
  Args:
      drug_encoder: drug information encoder.
      target_encoder: target information encoder.
      decoder: drug-target representations decoder.
      lr: learning rate. (default: 0.001)
      ci_metric: calculate the Concordance Index (CI) metric, and the operation is time-consuming for large-scale
      dataset. (default: :obj:`False`)
class_docstr_tok: ["Base","class","for","all","drug","target","encoder-decoder","architecture","models",",","which","is","based","on","pytorch","lightning","wrapper",",","for","more","details","about","pytorch","lightning",",","please","check","https",":","\/\/github.com\/PyTorchLightning\/pytorch-lightning",".","If","you","inherit","from","this","class",",","a","forward","pass","function","must","be","implemented",".","Args",":","drug_encoder",":","drug","information","encoder",".","target_encoder",":","target","information","encoder",".","decoder",":","drug-target","representations","decoder",".","lr",":","learning","rate",".","(","default",":","0.001",")","ci_metric",":","calculate","the","Concordance","Index","(","CI",")","metric",",","and","the","operation","is","time-consuming","for","large-scale","dataset",".","(","default",":",":","obj",":","`","False","`",")"]
docstr: Compute and return the test loss on one step
docstr_tok: ["Compute","and","return","the","test","loss","on","one","step"]
code: def test_step(self, test_batch, batch_idx):
      """
      Compute and return the test loss on one step
      """
      x_drug, x_target, y = test_batch
      y_pred = self(x_drug, x_target)
      loss = F.mse_loss(y_pred, y.view(-1, 1))
      if self.ci_metric:
          ci = concord_index(y, y_pred)
          self.log("test_ci", ci, on_epoch=True, on_step=False)
      self.log("test_loss", loss, on_epoch=True, on_step=False)
      return loss
  
file_path: pykale/kale/pipeline/deepdta.py
imports: import pytorch_lightning
  import torch
  from torch.nn import functional
  from kale.evaluate.metrics import concord_index
label_desc: Use image node_id 6 for calling the BaseDTATrainer obj's underlying member method code with example usage: obj.test_step(test_batch, batch_idx) and returns: loss