cnvrg 1.6.31 → 1.6.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cnvrg/cli.rb +9 -6
- data/lib/cnvrg/experiment.rb +3 -2
- data/lib/cnvrg/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccd271bedf17f196897bdc28e238698676613ae09f391a9b412e3135703e3f7b
|
4
|
+
data.tar.gz: 3f61217606f6f9c50e0e27dee3c9f3f4d00d1eec7bd48622d4c62b4de5562f5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afd4299de4463f503d3e45528974ad451b941331af03cb067c6a801fdb25d49197ae5673505f8bd30f03c258026b63324b952d80270925040cf4cf344409a4ee
|
7
|
+
data.tar.gz: 6d1716507fdf9abbc1199a5815f653242bfc0f43bac340b018696eed869e22f6be89cf0ef1d27e1a44516541d69e2e1332b3eb5a6aba25f098504d97a0eb03f4
|
data/lib/cnvrg/cli.rb
CHANGED
@@ -2956,6 +2956,7 @@ module Cnvrg
|
|
2956
2956
|
method_option :requirements, :type => :boolean, :aliases => ["-r", "--requirements"], :default => true
|
2957
2957
|
method_option :notify_on_error, :type => :boolean, :aliases => ["-noe", "--notify_on_error"], :default => nil
|
2958
2958
|
method_option :notify_on_success, :type => :boolean, :aliases => ["-nos", "--notify_on_success"], :default => nil
|
2959
|
+
method_option :emails, :type => :string, :aliases => ["-es", "--emails"], :default => "", :desc => "additional emails to notify on success / or error, comma separated"
|
2959
2960
|
|
2960
2961
|
def run(*cmd)
|
2961
2962
|
verify_logged_in(true)
|
@@ -2989,6 +2990,7 @@ module Cnvrg
|
|
2989
2990
|
requirements = options["requirements"]
|
2990
2991
|
email_notification_error = options["notify_on_error"]
|
2991
2992
|
email_notification_success = options["notify_on_success"]
|
2993
|
+
emails = options["emails"]
|
2992
2994
|
|
2993
2995
|
if !data.present? and data_query.present?
|
2994
2996
|
log_message("Please provide data with data_query", Thor::Shell::Color::RED)
|
@@ -3003,7 +3005,6 @@ module Cnvrg
|
|
3003
3005
|
restart_if_stuck = options["restart_if_stuck"]
|
3004
3006
|
|
3005
3007
|
options_hash = Hash[options]
|
3006
|
-
|
3007
3008
|
if local
|
3008
3009
|
if Cnvrg::Helpers.windows?
|
3009
3010
|
say "Windows is currently not supported for running experiments locally"
|
@@ -3039,7 +3040,7 @@ module Cnvrg
|
|
3039
3040
|
:periodic_sync => periodic_sync, :dataset_only_tree=> dataset_only_tree,
|
3040
3041
|
:output_dir=>output_dir, :data_query=>data_query, :git_commit =>git_commit, :git_branch=> git_branch,
|
3041
3042
|
:restart_if_stuck =>restart_if_stuck, :local_folders => local_folders, :datasets => datasets, :prerun => prerun, :requirements => requirements,
|
3042
|
-
:email_notification_error => email_notification_error, :email_notification_success => email_notification_success
|
3043
|
+
:email_notification_error => email_notification_error, :email_notification_success => email_notification_success, :emails => emails
|
3043
3044
|
return
|
3044
3045
|
end
|
3045
3046
|
|
@@ -3345,8 +3346,9 @@ module Cnvrg
|
|
3345
3346
|
method_option :datasets, :type => :string, :aliases => ["--datasets"], :default => nil
|
3346
3347
|
method_option :prerun, :type => :boolean, :aliases => ["-p", "--prerun"], :default => true
|
3347
3348
|
method_option :requirements, :type => :boolean, :aliases => ["-r", "--requirements"], :default => true
|
3348
|
-
method_option :email_notification_error, :type => :boolean, :aliases => ["--email_notification_error"], :default => true
|
3349
|
-
method_option :email_notification_success, :type => :boolean, :aliases => ["--email_notification_success"], :default => true
|
3349
|
+
method_option :email_notification_error, :type => :boolean, :aliases => ["-noe", "--email_notification_error"], :default => true
|
3350
|
+
method_option :email_notification_success, :type => :boolean, :aliases => ["-nos", "--email_notification_success"], :default => true
|
3351
|
+
method_option :emails, :type => :string, :aliases => ["-es", "--emails"], :default => "", :desc => "additional emails to notify on success / or error"
|
3350
3352
|
|
3351
3353
|
def exec_remote(*cmd)
|
3352
3354
|
|
@@ -3368,6 +3370,7 @@ module Cnvrg
|
|
3368
3370
|
requirements = options["requirements"]
|
3369
3371
|
email_notification_error = options["email_notification_error"]
|
3370
3372
|
email_notification_success = options["email_notification_success"]
|
3373
|
+
emails = options["emails"]
|
3371
3374
|
max_time = options["max_time"]
|
3372
3375
|
if !max_time.nil? and !max_time.empty?
|
3373
3376
|
max_time = max_time.to_i
|
@@ -3407,7 +3410,7 @@ module Cnvrg
|
|
3407
3410
|
options_hash.except!("schedule", "recurring", "machine_type", "image", "upload_output", "grid", "data", "data_commit", "title",
|
3408
3411
|
"local", "small", "medium", "large", "gpu", "gpuxl", "gpuxxl","max_time","dataset_only_tree",
|
3409
3412
|
"data_query", "git_commit","git_branch", "restart_if_stuck","local_folders","output_dir", "commit", "datasets", "requirements", "prerun",
|
3410
|
-
"email_notification_error", "email_notification_success")
|
3413
|
+
"email_notification_error", "email_notification_success", "emails")
|
3411
3414
|
exec_options = options_hash.map {|x| "--#{x[0]}=#{x[1]}"}.flatten.join(" ")
|
3412
3415
|
command = "#{exec_options} #{remote} #{upload_output_option} #{cmd.flatten.join(" ")}"
|
3413
3416
|
commit_to_run = options["commit"] || nil
|
@@ -3475,7 +3478,7 @@ module Cnvrg
|
|
3475
3478
|
res = exp.exec_remote(command, commit_to_run, instance_type, image, schedule, local_timestamp, grid, path_to_cmd, data, data_commit,
|
3476
3479
|
periodic_sync, sync_before_terminate, max_time, ds_sync_options,output_dir,
|
3477
3480
|
data_query, git_commit, git_branch, restart_if_stuck,local_folders_options, title, datasets, prerun: prerun, requirements: requirements, recurring: recurring,
|
3478
|
-
email_notification_error: email_notification_error, email_notification_success: email_notification_success)
|
3481
|
+
email_notification_error: email_notification_error, email_notification_success: email_notification_success, emails_to_notify: emails)
|
3479
3482
|
if Cnvrg::CLI.is_response_success(res)
|
3480
3483
|
check = Helpers.checkmark()
|
3481
3484
|
str = "#{check} Experiment's is on: #{Cnvrg::Helpers.remote_url}/#{project.owner}/projects/#{project.slug}/experiments/#{res["result"]["exp_url"]}"
|
data/lib/cnvrg/experiment.rb
CHANGED
@@ -108,7 +108,7 @@ module Cnvrg
|
|
108
108
|
def exec_remote(command, commit_to_run, instance_type, image_slug,schedule,local_timestamp, grid,path_to_cmd,data, data_commit,periodic_sync,
|
109
109
|
sync_before_terminate, max_time, ds_sync_options=0,output_dir=nil,data_query=nil,
|
110
110
|
git_commit=nil, git_branch=nil, restart_if_stuck=nil, local_folders=nil,title=nil, datasets=nil, prerun: true, requirements: true, recurring: nil,
|
111
|
-
email_notification_error: false, email_notification_success: false)
|
111
|
+
email_notification_error: false, email_notification_success: false, emails_to_notify: nil)
|
112
112
|
response = Cnvrg::API.request("users/#{@owner}/projects/#{@project_slug}/experiment/remote", 'POST', {command: command, image_slug: image_slug,
|
113
113
|
commit_sha1: commit_to_run,
|
114
114
|
instance_type: instance_type,
|
@@ -124,7 +124,8 @@ module Cnvrg
|
|
124
124
|
restart_if_stuck:restart_if_stuck, local_folders: local_folders, title:title,
|
125
125
|
prerun: prerun, requirements: requirements, recurring: recurring,
|
126
126
|
email_notification_error: email_notification_error,
|
127
|
-
email_notification_success: email_notification_success
|
127
|
+
email_notification_success: email_notification_success,
|
128
|
+
emails_to_notify: emails_to_notify})
|
128
129
|
|
129
130
|
return response
|
130
131
|
end
|
data/lib/cnvrg/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cnvrg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yochay Ettun
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-04-
|
13
|
+
date: 2020-04-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -477,7 +477,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
477
477
|
- !ruby/object:Gem::Version
|
478
478
|
version: '0'
|
479
479
|
requirements: []
|
480
|
-
rubygems_version: 3.0.
|
480
|
+
rubygems_version: 3.0.3
|
481
481
|
signing_key:
|
482
482
|
specification_version: 4
|
483
483
|
summary: A CLI tool for interacting with cnvrg.io.
|