cnvrg 0.0.15 → 0.0.140

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,11 +9,11 @@ module Cnvrg
9
9
  @slug = nil
10
10
  end
11
11
 
12
- def start(input, platform, machine_name, start_commit, name, email_notification, machine_activity,script_path)
12
+ def start(input, platform, machine_name, start_commit, name, email_notification, machine_activity)
13
13
  res = Cnvrg::API.request(@base_resource + "experiment/start", 'POST',
14
14
  {input: input, platform: platform, machine_name: machine_name, start_commit: start_commit,
15
- title: name, email_notification: email_notification, machine_activity: machine_activity,script_path:script_path})
16
- Cnvrg::CLI.is_response_success(res,false)
15
+ title: name, email_notification: email_notification, machine_activity: machine_activity})
16
+ Cnvrg::CLI.is_response_success(res)
17
17
 
18
18
  @slug = res.to_h["result"].to_h["slug"]
19
19
 
@@ -37,7 +37,7 @@ module Cnvrg
37
37
  def end_notebook_session(notebook_slug, end_commit)
38
38
  res = Cnvrg::API.request(@base_resource + "notebook/end_session", 'POST',
39
39
  {notebook_slug: notebook_slug, end_commit: end_commit})
40
- Cnvrg::CLI.is_response_success(res,false)
40
+ Cnvrg::CLI.is_response_success(res)
41
41
 
42
42
  return res
43
43
 
@@ -78,36 +78,27 @@ module Cnvrg
78
78
 
79
79
  end
80
80
 
81
- def exec_remote(command, commit_to_run, instance_type, image_slug,scheduling_query,local_timestamp, grid,path_to_cmd,data, data_commit)
81
+ def exec_remote(command, commit_to_run, instance_type, image_slug,scheduling_query,local_timestamp)
82
82
  response = Cnvrg::API.request("users/#{@owner}/projects/#{@project_slug}/experiment/remote", 'POST', {command: command, image_slug: image_slug,
83
83
  commit_sha1: commit_to_run,
84
84
  instance_type: instance_type,
85
85
  scheduling_query:scheduling_query,
86
- local_timestamp:local_timestamp,
87
- grid: grid,
88
- path_to_cmd:path_to_cmd,dataset_slug:data,
89
- dataset_commit: data_commit})
86
+ local_timestamp:local_timestamp})
90
87
  return response
91
88
  end
92
89
 
93
90
  def upload_temp_log(temp_log, cpu_average, memory_average)
94
91
  response = Cnvrg::API.request(@base_resource + "experiment/upload_temp_log", 'POST', {output: temp_log,
95
- exp_slug: @slug})
96
- Cnvrg::CLI.is_response_success(response,false)
92
+ exp_slug: @slug, cpu_average: cpu_average,
93
+ memory_average: memory_average})
94
+ Cnvrg::CLI.is_response_success(response)
97
95
  end
98
96
 
99
97
  def end(output, exit_status, end_commit, cpu_average, memory_average)
100
- #if remote try to remove
101
98
  response = Cnvrg::API.request(@base_resource + "experiment/end", 'POST', {output: output, exp_slug: @slug,
102
99
  exit_status: exit_status, end_commit: end_commit,
103
100
  cpu_average: cpu_average, memory_average: memory_average})
104
- Cnvrg::CLI.is_response_success(response,false)
105
-
106
- begin
107
- FileUtils.rm_rf(["/home/ds/.cnvrg/tmp/exec.log"])
108
- rescue
109
-
110
- end
101
+ Cnvrg::CLI.is_response_success(response)
111
102
  end
112
103
  end
113
104
  end