class_docstr: Benchmarks runtime and accuracy of crypten models
  
  Models are benchmarked on synthetically generated
  Gaussian clusters for binary classification. Resnet18 is
  benchmarks use image data.
  
  Args:
      n_samples (int): number of samples for Gaussian cluster model training
      n_features (int): number of features for the Gaussian clusters.
      epochs (int): number of training epochs
      lr_rate (float): learning rate.
class_docstr_tok: ["Benchmarks","runtime","and","accuracy","of","crypten","models","Models","are","benchmarked","on","synthetically","generated","Gaussian","clusters","for","binary","classification",".","Resnet18","is","benchmarks","use","image","data",".","Args",":","n_samples","(","int",")",":","number","of","samples","for","Gaussian","cluster","model","training","n_features","(","int",")",":","number","of","features","for","the","Gaussian","clusters",".","epochs","(","int",")",":","number","of","training","epochs","lr_rate","(","float",")",":","learning","rate","."]
docstr: Runs and stores benchmarks in self.df
docstr_tok: ["Runs","and","stores","benchmarks","in","self.df"]
code: def run(self):
      """Runs and stores benchmarks in self.df"""
      training_runtimes, training_runtimes_enc = self.time_training()
      inference_runtimes, inference_runtimes_enc = self.time_inference()
      accuracies, accuracies_crypten = self.evaluate()
      model_names = [model.name for model in self.models]
  
      training_times_both = training_runtimes + training_runtimes_enc
      inference_times_both = inference_runtimes + inference_runtimes_enc
  
      half_n_rows = len(training_runtimes)
      self.df = pd.DataFrame.from_dict(
          {
              "model": model_names + model_names,
              "seconds per epoch": [t.mid for t in training_times_both],
              "seconds per epoch q1": [
                  t.q1 for t in training_times_both
              ],
              "seconds per epoch q3": [
                  t.q3 for t in training_times_both
              ],
              "inference time": [t.mid for t in inference_times_both],
              "inference time q1": [t.q1 for t in inference_times_both],
              "inference time q3": [t.q3 for t in inference_times_both],
              "is plain text": [True] * half_n_rows
              + [False] * half_n_rows,
              "accuracy": accuracies + accuracies_crypten,
          }
      )
      self.df = self.df.sort_values(by="model")
  
imports: import argparse
  import functools
  import os
  import timeit
  from collections import namedtuple
  import crypten
  import crypten.communicator
  import numpy
  import pandas
  import torch
  from examples import multiprocess_launcher
label_desc: Use image node_id 13 for calling the ModelBenchmarks obj's underlying member method code with example usage: obj.run() without return types