code: def test_ranking_multi_task_mmoe(tenrec_data_path):
      args = kwargs_to_cli_ags()
      train_ds, eval_ds = get_datasets(tenrec_data_path)
  
      with tempfile.TemporaryDirectory() as tmp_output_folder:
          args = kwargs_to_cli_ags(
              output_path=tmp_output_folder,
              tasks="click,follow,watching_times",
              mtl_pos_class_weight_click=1,
              mtl_pos_class_weight_like=2,
              mtl_loss_weight_click=1,
              mtl_loss_weight_follow=2,
              mtl_loss_weight_watching_times=5,
              use_task_towers=True,
              tower_layers=64,
              model="mmoe",
              mmoe_num_mlp_experts=4,
              embedding_sizes_multiplier=5,
              l2_reg=1e-6,
              embeddings_l2_reg=1e-8,
              dropout=0.05,
              mlp_layers="64,32",
              lr=1e-4,
              lr_decay_rate=0.99,
              lr_decay_steps=100,
              train_batch_size=8192,
              eval_batch_size=8192,
              epoch=3,
          )
  
          runner = RankingTrainEvalRunner(
              args, train_ds, train_ds, None, logger=None
          )
  
          current_time = time.time()
  
          metrics = runner.run()
  
          elapsed_time = time.time() - current_time
  
          assert set(metrics.keys()) == set(
              [
                  "loss",
                  "click/binary_output_loss",
                  "follow/binary_output_loss",
                  "click/binary_output/auc",
                  "click/binary_output/prauc",
                  "click/binary_output/logloss",
                  "follow/binary_output/auc",
                  "follow/binary_output/prauc",
                  "follow/binary_output/logloss",
                  "watching_times/regression_output_loss",
                  "watching_times/regression_output/root_mean_squared_error",
                  "regularization_loss",
                  "loss_batch",
                  "gate_click/binary_output_weight_0",
                  "gate_click/binary_output_weight_1",
                  "gate_click/binary_output_weight_2",
                  "gate_click/binary_output_weight_3",
                  "gate_follow/binary_output_weight_0",
                  "gate_follow/binary_output_weight_1",
                  "gate_follow/binary_output_weight_2",
                  "gate_follow/binary_output_weight_3",
                  "gate_watching_times/regression_output_weight_0",
                  "gate_watching_times/regression_output_weight_1",
                  "gate_watching_times/regression_output_weight_2",
                  "gate_watching_times/regression_output_weight_3",
              ]
          )
  
          assert metrics["loss"] < 4
          assert metrics["click/binary_output_loss"] < 0.7
          assert metrics["follow/binary_output_loss"] < 0.1
          assert metrics["watching_times/regression_output_loss"] < 0.6
          assert metrics["click/binary_output/auc"] > 0.65
          assert metrics["click/binary_output/prauc"] > 0.5
          assert metrics["click/binary_output/logloss"] < 0.65
          assert metrics["follow/binary_output/auc"] > 0.35
          assert metrics["follow/binary_output/prauc"] > 0
          assert metrics["follow/binary_output/logloss"] < 0.1
          assert (
              metrics[
                  "watching_times/regression_output/root_mean_squared_error"
              ]
              < 0.8
          )
          assert metrics["regularization_loss"] > 0.0
          assert metrics["loss_batch"] > 0.0
  
file_path: Merlin/tests/integration/examples/quick_start/test_ranking.py
imports: import os
  import tempfile
  import time
  import pytest
  from examples.quick_start.scripts.ranking.ranking import RankingTrainEvalRunner
  from merlin.io.dataset import Dataset
label_desc: Use image node_id 10 for calling a global function with example usage: test_ranking_multi_task_mmoe(tenrec_data_path) without return types