cnvrg 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e3a5bae5049d633360023ea911ceeb97ed85696
4
- data.tar.gz: 1f3b1959efd5784162d3d715b2b671188907297f
3
+ metadata.gz: 2ee9c0e3238c8332892001f157476627c8b9f02e
4
+ data.tar.gz: a2b064a49793fb05f1f48c137912bb2555e22c60
5
5
  SHA512:
6
- metadata.gz: 85643c72891b74c4282ce4991f8c7e572c1f21af287cb8883707ce1fbd34368a935e2508ac83610148f1caff3e86d1febd351dd0e129625da1a66e5ecf183414
7
- data.tar.gz: ac285e4ddc22e20f4c7a811b59e82757e82f8686eaaae5d029a0aa2997bcb987283b1655a46dc7e87d1a44682cee4b504dcba99337064834ade2d80a60c8de04
6
+ metadata.gz: cda986e64bf59d86bc56efb32a153f6c98b7defd4d78909edb80fbbcdaee75d7ec76a3f1378dc6e646da868b2e304989391a394925ceb5930305316f385adc8e
7
+ data.tar.gz: ecdbd8613ade9bc6502ec610edc56a1a706638571f8ed9670976b320f497748838f7cc48664962600efa8a1d8ebe525a15d8eb52622802d951df6f378e514e2a
data/lib/cnvrg/cli.rb CHANGED
@@ -1730,7 +1730,7 @@ module Cnvrg
1730
1730
 
1731
1731
  if !files.nil?
1732
1732
  begin
1733
- download_result = @files.download_multiple_files_s3(files, project_home)
1733
+ download_result = @files.download_multpile_files_s3(files, project_home)
1734
1734
 
1735
1735
  rescue Interrupt
1736
1736
  log_message("Couldn't download, Rolling Back all changes.", Thor::Shell::Color::RED)
@@ -2128,8 +2128,12 @@ module Cnvrg
2128
2128
  files_count = all_files.count
2129
2129
  finished_chunks = 0
2130
2130
  files_uploaded = 0
2131
- all_files.each_slice(chunk_size).each do |list_files|
2131
+ chunked_files = all_files.each_slice(chunk_size)
2132
+ chunked_files.each_with_index do |list_files,i|
2133
+ log_message("generating chunk #{i} / #{chunked_files.size}", Thor::Shell::Color::BLUE, false)
2132
2134
  temp_tree = @dataset.generate_chunked_idx(list_files, threads: parallel_threads)
2135
+
2136
+ log_message("uploading chunk #{i} / #{chunked_files.size}", Thor::Shell::Color::BLUE, false)
2133
2137
  files_uploaded += @files.upload_multiple_files(next_commit, temp_tree, threads: parallel_threads, force: force)
2134
2138
  new_tree = new_tree.merge(temp_tree.map{|k,v| [k.gsub('./', ''), {sha1: v[:sha1], commit_time: nil}]}.to_h)
2135
2139
  @dataset.write_idx(new_tree, next_commit)
@@ -2138,6 +2142,7 @@ module Cnvrg
2138
2142
  end
2139
2143
  return files_uploaded > 0
2140
2144
  rescue Exception => e
2145
+ log_error(e)
2141
2146
  return false
2142
2147
  end
2143
2148
 
@@ -2371,6 +2376,7 @@ module Cnvrg
2371
2376
  if !spec_files_to_upload.blank?
2372
2377
  spec_files_to_upload = spec_files_to_upload.split(",")
2373
2378
  end
2379
+ if @project.is_git
2374
2380
  git_output_dir = options["output_dir"] || output_dir
2375
2381
  if git_output_dir.present?
2376
2382
  if git_output_dir.ends_with? "/"
@@ -2384,6 +2390,8 @@ module Cnvrg
2384
2390
  end
2385
2391
  force = true
2386
2392
  end
2393
+ end
2394
+
2387
2395
 
2388
2396
  if ignore.nil? or ignore.empty?
2389
2397
  ignore = ignore_list
@@ -3451,7 +3459,6 @@ module Cnvrg
3451
3459
  spot_status_thread = Thread.new do
3452
3460
  begin
3453
3461
  loop do
3454
- puts "Checking Spot Instance Status"
3455
3462
  log_message('Checking Spot Instance Status', Thor::Shell::Color::YELLOW)
3456
3463
  restart = @exp.restart_spot_instance()
3457
3464
 
data/lib/cnvrg/data.rb CHANGED
@@ -47,7 +47,7 @@ module Cnvrg
47
47
  method_option :tags, :type => :boolean, :aliases => ["--tags"], :desc => "upload file tags", :default => false
48
48
  method_option :parallel, :type => :numeric, :aliases => ["-p", "--parallel"], :desc => "uparallel upload at the same time", :default => 15
49
49
  method_option :chunk_size, :type => :numeric, :aliases => ["--chunk_size"], :desc => "chunk size to communicate with the server", :default => 1000
50
- method_option :init, :type => :boolean, :aliases => ["--initial"], :desc => "chunk size to communicate with the server", :default => false
50
+ method_option :init, :type => :boolean, :aliases => ["--initial"], :desc => "initial upload of dataset", :default => false
51
51
 
52
52
  def sync_data_new()
53
53
  cli = Cnvrg::CLI.new()
@@ -138,14 +138,6 @@ module Cnvrg
138
138
 
139
139
  def restart_spot_instance
140
140
  restart = false
141
- #TODO: remove this later
142
- fall_number = rand(1..8)
143
- if fall_number == 5
144
- return true
145
- else
146
- return false
147
- end
148
-
149
141
  begin
150
142
  url = URI.parse('http://169.254.169.254/latest/meta-data/spot/termination-time')
151
143
  req = Net::HTTP::Get.new(url.to_s)
data/lib/cnvrg/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Cnvrg
2
- VERSION = '0.5.8'
2
+ VERSION = '0.5.9'
3
3
  end
4
4
 
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: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yochay Ettun
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-07-31 00:00:00.000000000 Z
12
+ date: 2018-08-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler