cnvrg 1.10.8 → 1.10.12
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 +28 -9
- data/lib/cnvrg/data.rb +3 -2
- data/lib/cnvrg/dataset.rb +0 -6
- 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: d9c519291dee531a33698f1737d8019b9a9affff30c00c60ebb5904cf2ab4daa
|
4
|
+
data.tar.gz: 1dd54d29c1f0b7db384bfe62ae6f3678a118375515d6da451ef58094adfa334d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4ce4dea833009867b132bdf6db3fa79bcc7396e828d2f7ad05433ca5c73bf06a999eb40d75d8895f8ae4108d7d6fb30fdc3149001edd63a25f785956abb2472
|
7
|
+
data.tar.gz: 1082b5f3dc5da602bb2089a97dec85774bed3a43c05c9247acf64c0bff7a6d50a641dee92f8a4b8999dd3732c5d3c75eec14c6e4b578c9b09d49f5bab7452e39
|
data/lib/cnvrg/cli.rb
CHANGED
@@ -1273,6 +1273,17 @@ module Cnvrg
|
|
1273
1273
|
raise SignalException.new(1, "Cant put files into dataset, check the dataset id")
|
1274
1274
|
end
|
1275
1275
|
@commit = response['result']['commit_sha1']
|
1276
|
+
|
1277
|
+
# Server expects certain regex format with * so fix those that dont comply
|
1278
|
+
regex_list = regex_list.map do |regex|
|
1279
|
+
if regex.end_with? "/"
|
1280
|
+
# if user wants to delete entire folder add regex to delete contents as well
|
1281
|
+
[regex, "#{regex}*"]
|
1282
|
+
else
|
1283
|
+
regex
|
1284
|
+
end
|
1285
|
+
end.flatten
|
1286
|
+
|
1276
1287
|
files_to_delete, folders_to_delete, job_id = @datafiles.delete_multiple_files(@commit, regex_list)
|
1277
1288
|
log_message("Deleting #{files_to_delete} files and #{folders_to_delete} folders", Thor::Shell::Color::GREEN)
|
1278
1289
|
|
@@ -3598,25 +3609,33 @@ module Cnvrg
|
|
3598
3609
|
exit_status = 0
|
3599
3610
|
|
3600
3611
|
if options['wait']
|
3612
|
+
end_pos = 0
|
3601
3613
|
while true
|
3602
3614
|
tries = 0
|
3603
3615
|
begin
|
3604
3616
|
result = Cnvrg::API_V2.request(
|
3605
|
-
"#{project.owner}/projects/#{project.slug}/experiments/#{res["result"]["exp_url"]}/
|
3617
|
+
"#{project.owner}/projects/#{project.slug}/experiments/#{res["result"]["exp_url"]}/info",
|
3606
3618
|
'GET',
|
3607
|
-
{ grid: res["result"]["grid"]}
|
3619
|
+
{ exit_status: true, grid: res["result"]["grid"], pos: end_pos }
|
3608
3620
|
)
|
3609
3621
|
|
3610
|
-
exit_statuses = result.values
|
3622
|
+
exit_statuses = result.values.pluck('exit_status')
|
3611
3623
|
if exit_statuses.include? nil
|
3612
|
-
|
3613
|
-
|
3614
|
-
|
3615
|
-
|
3624
|
+
if res["result"]["grid"]
|
3625
|
+
system("clear") || system("cls")
|
3626
|
+
msg = "#{Time.current}: waiting for all experiments to finish"
|
3627
|
+
puts msg
|
3628
|
+
else
|
3629
|
+
end_pos = result[res['result']['exp_url']]['end_pos']
|
3630
|
+
logs = result[res['result']['exp_url']]['logs']
|
3631
|
+
logs.each do |log|
|
3632
|
+
puts log['message']
|
3633
|
+
end
|
3634
|
+
end
|
3616
3635
|
sleep 3
|
3617
3636
|
else
|
3618
|
-
result.each do |slug,
|
3619
|
-
puts "Experiment #{slug} was exited with status #{exit_status}"
|
3637
|
+
result.each do |slug, value|
|
3638
|
+
puts "Experiment #{slug} was exited with status #{value['exit_status']}"
|
3620
3639
|
end
|
3621
3640
|
break
|
3622
3641
|
end
|
data/lib/cnvrg/data.rb
CHANGED
@@ -214,7 +214,7 @@ module Cnvrg
|
|
214
214
|
|
215
215
|
desc 'data put DATASET_URL FILES_PREFIX', 'Upload selected files from local dataset directory to remote server'
|
216
216
|
method_option :dir, :type => :string, :aliases => ["-d", "--dir"], :default => ''
|
217
|
-
method_option :commit, :type => :string, :aliases => ["-c", "--commit"], :default => ''
|
217
|
+
# method_option :commit, :type => :string, :aliases => ["-c", "--commit"], :default => ''
|
218
218
|
method_option :force, :type => :boolean, :aliases => ["-f","--force"], :default => false
|
219
219
|
method_option :override, :type => :boolean, :aliases => ["--override"], :default => false
|
220
220
|
method_option :threads, :type => :numeric, :aliases => ["-t","--threads"], :default => 15
|
@@ -226,7 +226,8 @@ module Cnvrg
|
|
226
226
|
dir = options[:dir]
|
227
227
|
force = options[:force]
|
228
228
|
override = options[:override]
|
229
|
-
commit = options[:commit]
|
229
|
+
# commit = options[:commit]
|
230
|
+
commit = ''
|
230
231
|
message = options[:message]
|
231
232
|
threads = options[:threads]
|
232
233
|
chunk_size = options[:chunk_size]
|
data/lib/cnvrg/dataset.rb
CHANGED
@@ -884,13 +884,8 @@ module Cnvrg
|
|
884
884
|
end
|
885
885
|
|
886
886
|
def self.stop_if_dataset_present(dataset_home, dataset_name, commit: nil)
|
887
|
-
|
888
887
|
cli = Cnvrg::CLI.new()
|
889
888
|
config = YAML.load_file(dataset_home + "/.cnvrg/config.yml")
|
890
|
-
if commit.present?
|
891
|
-
local_commit = YAML.load_file(dataset_home + "/.cnvrg/idx.yml")[:commit] rescue nil
|
892
|
-
return if commit != local_commit or local_commit.blank?
|
893
|
-
end
|
894
889
|
if config[:dataset_name] == dataset_name
|
895
890
|
cli.log_message("Dataset already present, clone aborted")
|
896
891
|
exit(0)
|
@@ -898,6 +893,5 @@ module Cnvrg
|
|
898
893
|
rescue => e
|
899
894
|
nil
|
900
895
|
end
|
901
|
-
|
902
896
|
end
|
903
897
|
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.10.
|
4
|
+
version: 1.10.12
|
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-08
|
13
|
+
date: 2020-09-08 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.0.4
|
457
457
|
signing_key:
|
458
458
|
specification_version: 4
|
459
459
|
summary: A CLI tool for interacting with cnvrg.io.
|