def model_install_cmds()

in dags/pytorch_xla/configs/pytorchxla_torchbench_config.py [0:0]


  def model_install_cmds(output_file=None) -> str:
    """Installs torchbench models.

    Args:
      output_file: If not None, model installation message will be piped to a file.

    Returns:
      Command to install the model.
    """
    install_cmds = ["pip install -r requirements.txt"]
    pipe_file_cmd = f" > {output_file}" if output_file else ""
    if not model_name or model_name.lower() == "all":
      install_cmds.append(
          f"python install.py --continue_on_fail {pipe_file_cmd}"
      )
    else:
      install_cmds.append(
          f"python install.py models {model_name} {pipe_file_cmd}"
      )
    return " && ".join(install_cmds)