Repository: NVIDIA-Merlin/NVTabular (language: python)

Issue:
[BUG] Horovod example scripts fail when user supplies batch size parameter
**Describe the bug**
Using the batch size parameter on the TF Horovod example causes a type error with a mismatch between str and int.

**Steps/Code to reproduce bug**
Run the TF Horovod example with the arguments `--b_size 1024`.

**Expected behavior**
The script should accept a user-provided batch size.

**Environment details (please complete the following information):**
 - Environment location: Bare-metal
 - Method of NVTabular install: conda
 
**Additional context**
I believe [this line](https://github.com/NVIDIA/NVTabular/blob/main/examples/horovod/tf_hvd_simple.py#L30) and the same line in the Torch example just need type coercions from str to int.



Discussion / hints:

Fix patch:
diff --git a/examples/horovod/tf_hvd_simple.py b/examples/horovod/tf_hvd_simple.py
index 97f7016042f..8c834b5d48e 100644
--- a/examples/horovod/tf_hvd_simple.py
+++ b/examples/horovod/tf_hvd_simple.py
@@ -18,7 +18,7 @@
 
 parser = argparse.ArgumentParser(description="Process some integers.")
 parser.add_argument("--dir_in", default=None, help="Input directory")
-parser.add_argument("--b_size", default=None, help="batch size")
+parser.add_argument("--batch_size", default=None, help="batch size")
 parser.add_argument("--cats", default=None, help="categorical columns")
 parser.add_argument("--cats_mh", default=None, help="categorical multihot columns")
 parser.add_argument("--conts", default=None, help="continuous columns")
@@ -27,7 +27,7 @@
 
 
 BASE_DIR = args.dir_in or "./data/"
-BATCH_SIZE = args.b_size or 16384  # Batch Size
+BATCH_SIZE = int(args.batch_size) or 16384  # Batch Size
 CATEGORICAL_COLUMNS = args.cats or ["movieId", "userId"]  # Single-hot
 CATEGORICAL_MH_COLUMNS = args.cats_mh or ["genres"]  # Multi-hot
 NUMERIC_COLUMNS = args.conts or []
diff --git a/examples/horovod/torch-nvt-horovod.py b/examples/horovod/torch-nvt-horovod.py
index aadd465296e..cbb7e939eb8 100644
--- a/examples/horovod/torch-nvt-horovod.py
+++ b/examples/horovod/torch-nvt-horovod.py
@@ -34,7 +34,7 @@
 
 
 BASE_DIR = os.path.expanduser(args.dir_in or "./data/")
-BATCH_SIZE = args.batch_size or 16384  # Batch Size
+BATCH_SIZE = int(args.batch_size) or 16384  # Batch Size
 CATEGORICAL_COLUMNS = args.cats or ["movieId", "userId"]  # Single-hot
 CATEGORICAL_MH_COLUMNS = args.cats_mh or ["genres"]  # Multi-hot
 NUMERIC_COLUMNS = args.conts or []


Test patch:
diff --git a/tests/unit/test_tf_dataloader.py b/tests/unit/test_tf_dataloader.py
index c2efa04dec6..4f12188df41 100644
--- a/tests/unit/test_tf_dataloader.py
+++ b/tests/unit/test_tf_dataloader.py
@@ -301,7 +301,7 @@ def test_multigpu_partitioning(datasets, engine, batch_size, global_rank):
 
 
 @pytest.mark.skipif(importlib.util.find_spec("horovod") is None, reason="needs horovod")
-def test_hvd(tmpdir):
+def test_horovod_multigpu(tmpdir):
     json_sample = {
         "conts": {},
         "cats": {
@@ -359,6 +359,8 @@ def test_hvd(tmpdir):
             hvd_exam_path,
             "--dir_in",
             f"{tmpdir}",
+            "--batch_size",
+            "1024",
         ],
         stdout=subprocess.PIPE,
         stderr=subprocess.PIPE,
diff --git a/tests/unit/test_torch_dataloader.py b/tests/unit/test_torch_dataloader.py
index 04e4e3865c6..aa96b35e1f4 100644
--- a/tests/unit/test_torch_dataloader.py
+++ b/tests/unit/test_torch_dataloader.py
@@ -450,6 +450,8 @@ def test_horovod_multigpu(tmpdir):
             hvd_example_path,
             "--dir_in",
             f"{tmpdir}",
+            "--batch_size",
+            "1024",
         ],
         stdout=subprocess.PIPE,
         stderr=subprocess.PIPE,