cnvrg 1.11.8 → 1.11.9
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 -18
- data/lib/cnvrg/experiment.rb +2 -1
- 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: b20aff57e3987256b096469eb8c220743d4d06a70cceaf87d23a81a3c193e6c0
|
4
|
+
data.tar.gz: c70e86b8dd64dc5970b41290db84db83a1f444dbbc83cebf91c3c4c236ca8ffd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c6a9bc704fc23a78afd001de3f906751a2b9178bb9ff646c49a4418386933b8b1397b166a4cee1529e1c8332284e79870b2ad847cd4c8df6cf255145bed6e29
|
7
|
+
data.tar.gz: d35b130d510c2595c79da10b189d0ffee424aa211c2033ba49a4fa22fba988cc935d5fb6d20aff4d190cb0de97a30263e9c24ecd6a15251bbce2c6adedc74e46
|
data/lib/cnvrg/cli.rb
CHANGED
@@ -3068,6 +3068,7 @@ module Cnvrg
|
|
3068
3068
|
method_option :notify_on_success, :type => :boolean, :aliases => ["-nos", "--notify_on_success"], :default => nil
|
3069
3069
|
method_option :emails, :type => :string, :aliases => ["-es", "--emails"], :default => "", :desc => "additional emails to notify on success / or error, comma separated"
|
3070
3070
|
method_option :wait, :type => :boolean, :aliases => ["-w", "--wait"], :default => false, :desc => "keep command session open until experiment finished to return exit status"
|
3071
|
+
method_option :debug, :type => :boolean, :aliases => ["--debug"], :default => true
|
3071
3072
|
|
3072
3073
|
def run(*cmd)
|
3073
3074
|
verify_logged_in(true)
|
@@ -3076,6 +3077,7 @@ module Cnvrg
|
|
3076
3077
|
sync_before = options["sync_before"]
|
3077
3078
|
sync_after = options["sync_after"]
|
3078
3079
|
log = options["log"]
|
3080
|
+
debug = options["debug"]
|
3079
3081
|
title = options["title"]
|
3080
3082
|
commit = options["commit"] || nil
|
3081
3083
|
email_notification = options["email_notification"]
|
@@ -3109,6 +3111,7 @@ module Cnvrg
|
|
3109
3111
|
wait = false
|
3110
3112
|
end
|
3111
3113
|
|
3114
|
+
|
3112
3115
|
if !data.present? and data_query.present?
|
3113
3116
|
log_message("Please provide data with data_query", Thor::Shell::Color::RED)
|
3114
3117
|
exit(1)
|
@@ -3155,7 +3158,7 @@ module Cnvrg
|
|
3155
3158
|
:image => image, :grid => grid, :data => data, :data_commit => data_commit, :ignore => ignore, :force => force, :sync_before_terminate => sync_before_terminate,
|
3156
3159
|
:max_time => max_time,
|
3157
3160
|
:periodic_sync => periodic_sync, :dataset_only_tree=> dataset_only_tree,
|
3158
|
-
:output_dir=>output_dir, :data_query=>data_query, :git_commit =>git_commit, :git_branch=> git_branch,
|
3161
|
+
:output_dir=>output_dir, :data_query=>data_query, :git_commit =>git_commit, :git_branch=> git_branch, :debug => debug,
|
3159
3162
|
:restart_if_stuck =>restart_if_stuck, :local_folders => local_folders, :datasets => datasets, :prerun => prerun, :requirements => requirements,
|
3160
3163
|
:email_notification_error => email_notification_error, :email_notification_success => email_notification_success, :emails => emails, :wait => wait
|
3161
3164
|
|
@@ -3481,6 +3484,7 @@ module Cnvrg
|
|
3481
3484
|
method_option :email_notification_success, :type => :boolean, :aliases => ["-nos", "--email_notification_success"], :default => true
|
3482
3485
|
method_option :emails, :type => :string, :aliases => ["-es", "--emails"], :default => "", :desc => "additional emails to notify on success / or error"
|
3483
3486
|
method_option :wait, :type => :boolean, :aliases => ["-w", "--wait"], :default => false, :desc => "keep command session open until experiment finished to return exit status"
|
3487
|
+
method_option :debug, :type => :boolean, :aliases => ["--debug"], :default => true
|
3484
3488
|
|
3485
3489
|
def exec_remote(*cmd)
|
3486
3490
|
|
@@ -3498,6 +3502,7 @@ module Cnvrg
|
|
3498
3502
|
data_query = options["data_query"] || nil
|
3499
3503
|
sync_before = options["sync_before"]
|
3500
3504
|
force = options["force"]
|
3505
|
+
debug = options["debug"]
|
3501
3506
|
prerun = options["prerun"]
|
3502
3507
|
requirements = options["requirements"]
|
3503
3508
|
email_notification_error = options["email_notification_error"]
|
@@ -3541,8 +3546,8 @@ module Cnvrg
|
|
3541
3546
|
local_folders_options = options["local_folders"]
|
3542
3547
|
options_hash.except!("schedule", "recurring", "machine_type", "image", "upload_output", "grid", "data", "data_commit", "title",
|
3543
3548
|
"local", "small", "medium", "large", "gpu", "gpuxl", "gpuxxl","max_time","dataset_only_tree",
|
3544
|
-
"data_query", "git_commit","git_branch",
|
3545
|
-
"requirements", "prerun", "email_notification_error", "email_notification_success", "emails", "wait")
|
3549
|
+
"data_query", "git_commit","git_branch","restart_if_stuck","local_folders","output_dir", "commit", "datasets",
|
3550
|
+
"requirements", "prerun", "email_notification_error", "email_notification_success", "emails", "wait","debug")
|
3546
3551
|
exec_options = options_hash.map {|x| "--#{x[0]}=#{x[1]}"}.flatten.join(" ")
|
3547
3552
|
command = "#{exec_options} #{remote} #{upload_output_option} #{cmd.flatten.join(" ")}"
|
3548
3553
|
commit_to_run = options["commit"] || nil
|
@@ -3585,20 +3590,6 @@ module Cnvrg
|
|
3585
3590
|
end
|
3586
3591
|
end
|
3587
3592
|
|
3588
|
-
if command.include? "'"
|
3589
|
-
oc = command.to_enum(:scan, /'/).map {Regexp.last_match}
|
3590
|
-
pairs = oc.enum_for(:each_slice, 2).to_a
|
3591
|
-
pairs.each_with_index do |p, i|
|
3592
|
-
add = 0
|
3593
|
-
if i != 0
|
3594
|
-
add = 2 * i
|
3595
|
-
end
|
3596
|
-
total_loc = command[p[0].offset(0)[0] + add..p[1].offset(0)[0] + add]
|
3597
|
-
command[p[0].offset(0)[0] + add..p[1].offset(0)[0] + add] = "\"#{total_loc}\""
|
3598
|
-
end
|
3599
|
-
|
3600
|
-
|
3601
|
-
end
|
3602
3593
|
log_message("Running remote experiment", Thor::Shell::Color::BLUE)
|
3603
3594
|
exp = Experiment.new(project.owner, project.slug)
|
3604
3595
|
if forced_commit and (commit_to_run.nil? or commit_to_run.empty?)
|
@@ -3609,7 +3600,7 @@ module Cnvrg
|
|
3609
3600
|
|
3610
3601
|
res = exp.exec_remote(command, commit_to_run, instance_type, image, schedule, local_timestamp, grid, path_to_cmd, data, data_commit,
|
3611
3602
|
periodic_sync, sync_before_terminate, max_time, ds_sync_options,output_dir,
|
3612
|
-
data_query, git_commit, git_branch, restart_if_stuck,local_folders_options, title, datasets, prerun: prerun, requirements: requirements, recurring: recurring,
|
3603
|
+
data_query, git_commit, git_branch,debug, restart_if_stuck,local_folders_options, title, datasets, prerun: prerun, requirements: requirements, recurring: recurring,
|
3613
3604
|
email_notification_error: email_notification_error, email_notification_success: email_notification_success, emails_to_notify: emails)
|
3614
3605
|
if Cnvrg::CLI.is_response_success(res)
|
3615
3606
|
check = Helpers.checkmark()
|
data/lib/cnvrg/experiment.rb
CHANGED
@@ -110,7 +110,7 @@ module Cnvrg
|
|
110
110
|
|
111
111
|
def exec_remote(command, commit_to_run, instance_type, image_slug,schedule,local_timestamp, grid,path_to_cmd,data, data_commit,periodic_sync,
|
112
112
|
sync_before_terminate, max_time, ds_sync_options=0,output_dir=nil,data_query=nil,
|
113
|
-
git_commit=nil, git_branch=nil, restart_if_stuck=nil, local_folders=nil,title=nil, datasets=nil, prerun: true, requirements: true, recurring: nil,
|
113
|
+
git_commit=nil, git_branch=nil,debug=true, restart_if_stuck=nil, local_folders=nil,title=nil, datasets=nil, prerun: true, requirements: true, recurring: nil,
|
114
114
|
email_notification_error: false, email_notification_success: false, emails_to_notify: nil)
|
115
115
|
response = Cnvrg::API.request("users/#{@owner}/projects/#{@project_slug}/experiment/remote", 'POST', {command: command, image_slug: image_slug,
|
116
116
|
commit_sha1: commit_to_run,
|
@@ -119,6 +119,7 @@ module Cnvrg
|
|
119
119
|
local_timestamp:local_timestamp,
|
120
120
|
datasets: datasets,
|
121
121
|
grid: grid,
|
122
|
+
debug:debug,
|
122
123
|
path_to_cmd:path_to_cmd,dataset_slug:data,
|
123
124
|
dataset_commit: data_commit,max_time:max_time,
|
124
125
|
periodic_sync:periodic_sync, sync_before_terminate:sync_before_terminate,
|
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.11.
|
4
|
+
version: 1.11.9
|
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-11-
|
13
|
+
date: 2020-11-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -453,7 +453,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
453
453
|
- !ruby/object:Gem::Version
|
454
454
|
version: '0'
|
455
455
|
requirements: []
|
456
|
-
rubygems_version: 3.
|
456
|
+
rubygems_version: 3.1.2
|
457
457
|
signing_key:
|
458
458
|
specification_version: 4
|
459
459
|
summary: A CLI tool for interacting with cnvrg.io.
|