Method: Cnvrg::Experiment#send_machine_stats

Defined in:
lib/cnvrg/experiment.rb

#send_machine_stats(stats) ⇒ Object



150
151
152
153
154
155
156
157
158
159
160
# File 'lib/cnvrg/experiment.rb', line 150

def send_machine_stats(stats)
  response = Cnvrg::API.request(
    @base_resource + "experiment/upload_stats",
    "POST",
    {
      exp_slug: @slug,
      stats: stats.map { |s| s.merge!({ time: Time.now }) }
    }
  )
  Cnvrg::CLI.is_response_success(response, false)
end