About Using the Machine Learning Sandbox

With your machine learning system set up, you're ready to start using it.

One of the first things you can do is run one or more benchmark tests to gauge the type of load that your system can handle.

Run a Benchmark Test

A simple benchmark test that you can run is a matrix multiply task in TensorFlow.

  1. Log into your instance with SSH or PuTTY.
  2. Switch to the sandbox environment.
    conda activate sandbox
  3. Start Jupyter Notebook. If you want to connect with HTTPS, specify the certificate and key.
    jupyter notebook --certfile=jupyter-cert.pem --keyfile=jupyter-key.key
  4. Open a browser and navigate to Jupyter Notebook.
  5. Create a new notebook called benchmark, and in the first cell paste the following code:
    import tensorflow as tf
    from time import strftime, localtime, time
    
    start_time = time()
    print('Starting at {}...'.format(strftime('%H:%M:%S', localtime(start_time))))
    
    A = tf.random.normal([10000,10000])
    B = tf.random.normal([10000,10000])
    print(tf.reduce_sum(tf.matmul(A,B)))
    
    finish_time = time()
    print('Ending at {}...'.format(strftime('%H:%M:%S', localtime(finish_time))))
    
    elapsed_time = finish_time - start_time
    print('Done! It took {:.3f} seconds'.format(elapsed_time))
    
  6. Run the code.

On a VM.GPU3.1 shape, the benchmark should complete in a few seconds. A VM.GPU3.1 has one NVIDIA Tesla V100 GPU and 6 OCPUs.