code: def test_torch_F1Score():
      from bigdl.orca.learn.pytorch.pytorch_metrics import F1Score
  
      target = torch.tensor([0, 1, 2, 0, 1, 2])
      preds = torch.tensor([0, 2, 1, 0, 0, 1])
      f1 = F1Score()
      f1(preds, target)
      score = f1.compute()
      assert score - 0.3332 < 1e-3
  
file_path: BigDL/python/orca/test/bigdl/orca/learn/test_metrics.py
imports: import torch
  import pytest
label_desc: Use image node_id 15 for calling a global function with example usage: test_torch_F1Score() without return types