class_docstr: Struct with metadata about a script execution.
class_docstr_tok: ["Struct","with","metadata","about","a","script","execution","."]
docstr: Collects information about the current environment and creates a new `BenchmarkMetadata`
  with it.
docstr_tok: ["Collects","information","about","the","current","environment","and","creates","a","new","`","BenchmarkMetadata","`","with","it","."]
code: def create(suite_name: str) -> "BenchmarkMetadata":
      """
      Collects information about the current environment and creates a new `BenchmarkMetadata`
      with it.
      """
      suite_name = suite_name
      argv = sys.argv
      script_name = Path(argv[0]).stem
      user = getpass.getuser()
      hostname = gethostname()
      timestamp = _get_timestamp()
      py_ver = python_version()
      tf_ver = tf.__version__
      np_ver = np.__version__
      ram = psutil.virtual_memory().total
      (
          cpu_name,
          cpu_count,
          cpu_frequency,
      ) = _get_cpu_name_count_frequency()
      gpu_names = _get_gpu_names()
      git_branch_name, git_commit = _get_git_branch_and_commit()
      run_id = f"{script_name}_{suite_name}_{git_branch_name}_{timestamp}".replace(
          "/", "_"
      )
      return BenchmarkMetadata(
          suite_name=suite_name,
          argv=argv,
          user=user,
          hostname=hostname,
          timestamp=timestamp,
          py_ver=py_ver,
          tf_ver=tf_ver,
          np_ver=np_ver,
          ram=ram,
          cpu_name=cpu_name,
          cpu_count=cpu_count,
          cpu_frequency=cpu_frequency,
          gpu_names=gpu_names,
          git_branch_name=git_branch_name,
          git_commit=git_commit,
          run_id=run_id,
      )
  
imports: import getpass
  import sys
  from dataclasses import asdict, dataclass, replace
  from datetime import datetime
  from pathlib import Path
  from platform import python_version
  from socket import gethostname
  from typing import Any, Mapping, Sequence, Tuple
  import numpy
  import psutil
  import tensorflow
  from cpuinfo import get_cpu_info
  from git.exc import InvalidGitRepositoryError
  from git.repo import Repo
  from tensorflow.python.client import device_lib
label_desc: Use image node_id 1 for calling the BenchmarkMetadata obj's underlying member method code with example usage: obj.create(suite_name) and returns: BenchmarkMetadata