Ejemplo n.º 1
0
def _CreateMetadataDict(benchmark_spec):
    """Create metadata dict to be used in run results.

  Args:
    benchmark_spec: benchmark spec

  Returns:
    metadata dict
  """
    vm = benchmark_spec.vms[0]
    metadata = {
        'batch_size': benchmark_spec.batch_size,
        'num_epochs': benchmark_spec.num_epochs,
        'device': benchmark_spec.device,
        'num_layers': benchmark_spec.num_layers,
        'model': benchmark_spec.model,
        'mxnet_version': benchmark_spec.mxnet_version,
        'precision': benchmark_spec.precision,
        'key_value_store': benchmark_spec.key_value_store,
        'image_shape': benchmark_spec.image_shape,
        'commit': mxnet_cnn.GetCommit(vm)
    }
    if benchmark_spec.device == GPU:
        metadata.update(cuda_toolkit.GetMetadata(vm))
    return metadata
Ejemplo n.º 2
0
def _CreateMetadataDict(benchmark_spec):
    """Create metadata dict to be used in run results.

  Args:
    benchmark_spec: benchmark spec

  Returns:
    metadata dict
  """
    vm = benchmark_spec.vms[0]
    metadata = dict()
    if benchmark_spec.device == GPU:
        metadata.update(cuda_toolkit_8.GetMetadata(vm))
    metadata['batch_size'] = benchmark_spec.batch_size
    metadata['num_epochs'] = benchmark_spec.num_epochs
    metadata['device'] = benchmark_spec.device
    metadata['num_layers'] = benchmark_spec.num_layers
    metadata['model'] = benchmark_spec.model
    metadata['mxnet_version'] = benchmark_spec.mxnet_version
    metadata['commit'] = mxnet_cnn.GetCommit(vm)
    return metadata