code: def print_metrics(y_true, y_pred, tag):
      if isinstance(y_true, pd.DataFrame) or isinstance(
          y_true, pd.Series
      ):
          y_true = y_true.values
      if isinstance(y_pred, pd.DataFrame) or isinstance(
          y_pred, pd.Series
      ):
          y_pred = y_pred.values
      if y_true.ndim > 1:
          y_true = y_true.ravel()
      if y_pred.ndim > 1:
          y_pred = y_pred.ravel()
      val_acc = accuracy_score(y_true, y_pred)
      val_f1 = f1_score(
          y_true,
          y_pred,
          average="macro" if len(np.unique(y_true)) > 2 else "binary",
      )
      print(f"{tag} Acc: {val_acc} | {tag} F1: {val_f1}")
  
file_path: pytorch_tabular/examples/__only_for_dev__/to_test_dae.py
imports: import random
  from pathlib import Path
  import numpy
  import pandas
  from sklearn.datasets import make_classification
  from sklearn.metrics import accuracy_score, f1_score
  from sklearn.model_selection import train_test_split
  from pytorch_tabular import TabularModel
  from pytorch_tabular.config import DataConfig, OptimizerConfig, TrainerConfig
  from pytorch_tabular.models import CategoryEmbeddingModelConfig
  from pytorch_tabular.ssl_models.dae import DenoisingAutoEncoderConfig
label_desc: Use image node_id 2 for calling a global function with example usage: print_metrics(y_true, y_pred, tag) without return types