cnvrg 1.9.6 → 1.9.9.3

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
  SHA256:
3
- metadata.gz: 84b1379d995cf6475f7a0a946560bb3c1d438fd514c83df2123251dc4f7de560
4
- data.tar.gz: 862caef093f400c6645b2cb311379fd976539fde8f7544a1146d603e0cdb3a13
3
+ metadata.gz: 53ddc2741cb68ba2e0a7952883931cbfc6fc6d0c92ba2a98cd99c3d4bac350ef
4
+ data.tar.gz: 17a78f413fa1a65027826cf9d4a411176c938e9c260eae5d7813c19c9b6e5e56
5
5
  SHA512:
6
- metadata.gz: e4548991e1debc2c5c389af062cc0f73da8d172cf2ee1614315356e47203f490f2b147010e1a41913c75b071ccbd4174dbff7a44fea0816135b7f1f1b8965c21
7
- data.tar.gz: f29420115fd784a0e57d44af5ec265d5c39f2636f998c630d0c21138c46b3fd517997c05d3eb48d8917c3c6ef0e5689081df052b01080185387240222003fd13
6
+ metadata.gz: c7bc53a1b26f86dc619a80c6bde93e93908916f665dd2e41742c1645cb855ac3b7f36ee1a32ed324204435ca18a6a6f6b4330cede901d1ae6a149affbb14f6a4
7
+ data.tar.gz: b17527598197acdd1bc0f00b0f461dc38bb621674ffd2ac144cedc68a4b64097fc898c4b9f4f6c562657e656d1cfdcaa79acdae53ec00d7016d85bee2252f519
@@ -4584,7 +4584,7 @@ module Cnvrg
4584
4584
 
4585
4585
  end
4586
4586
 
4587
- desc 'file_exists', description: '', hide: true
4587
+ desc 'file_exists', '', :hide => true
4588
4588
  def file_exists(file)
4589
4589
  exit(0) if File.exists? file
4590
4590
  exit(1)
@@ -1,7 +1,7 @@
1
1
  module Cnvrg
2
2
  class LibraryCli < SubCommandBase
3
3
 
4
- desc "library import", description: ""
4
+ desc "library import", ''
5
5
  def import
6
6
  unless File.exists? "library.yml"
7
7
  Cnvrg::CLI.log_message("Can't find library.yml", 'red')
@@ -1,5 +1,5 @@
1
1
  require 'mimemagic'
2
- require 'aws-sdk'
2
+ require 'aws-sdk-s3'
3
3
  require 'URLcrypt'
4
4
  require 'parallel'
5
5
  require 'fileutils'
@@ -330,7 +330,7 @@ module Cnvrg
330
330
 
331
331
  end
332
332
 
333
- def upload_multiple_files_optimized(files, commit_sha1, threads: ParallelThreads, chunk_size: 1000, force: false, new_branch: false, prefix: '', partial_commit: nil)
333
+ def upload_multiple_files_optimized(files, commit_sha1, threads: 15, chunk_size: 1000, force: false, new_branch: false, prefix: '', partial_commit: nil)
334
334
  cli = CLI.new
335
335
  cli.log_message("Using #{threads} threads with chunk size of #{chunk_size}.", Thor::Shell::Color::GREEN)
336
336
 
@@ -406,7 +406,7 @@ module Cnvrg
406
406
  # Fetch the required files from the server:
407
407
  Parallel.map((file_chunks), in_threads: 10) do |files_chunk|
408
408
 
409
- tree = @dataset.generate_chunked_idx(files_chunk, prefix: prefix)
409
+ tree = @dataset.generate_chunked_idx(files_chunk, prefix: prefix, threads: threads)
410
410
  results = request_upload_files(commit_sha1, tree, force, new_branch, partial_commit)
411
411
 
412
412
  # puts "Got #{results['files'].size} files to upload from #{files_chunk.size} files"
@@ -1319,10 +1319,10 @@ module Cnvrg
1319
1319
  # blob
1320
1320
  local_path = "#{local_path}.conflict" if conflict
1321
1321
  storage_path = f["path"]
1322
- if File.exists? local_path
1323
- Cnvrg::Logger.log_info("Trying to download #{local_path} but its already exists, skipping..")
1324
- next
1325
- end
1322
+ # if File.exists? local_path
1323
+ # Cnvrg::Logger.log_info("Trying to download #{local_path} but its already exists, skipping..")
1324
+ # next
1325
+ # end
1326
1326
  resp = @downloader.download(storage_path, local_path)
1327
1327
  Cnvrg::Logger.log_info("Download #{local_path} success resp: #{resp}")
1328
1328
  rescue => e
@@ -541,7 +541,7 @@ module Cnvrg
541
541
  "#{url}/#{self.owner}/datasets/#{self.slug}"
542
542
  end
543
543
 
544
- def generate_chunked_idx(list_files = [], threads: IDXParallelThreads, prefix: '')
544
+ def generate_chunked_idx(list_files = [], threads: 15, prefix: '')
545
545
  tree = {}
546
546
  Parallel.map(list_files, in_threads: threads) do |file|
547
547
  #check if prefix exists do prefix/path otherwise path
@@ -1,5 +1,5 @@
1
1
  require 'mimemagic'
2
- require 'aws-sdk'
2
+ require 'aws-sdk-s3'
3
3
  require 'URLcrypt'
4
4
  require 'tempfile'
5
5
  require 'net/http'
@@ -727,7 +727,6 @@ module Cnvrg
727
727
  unless Cnvrg::CLI.is_response_success(res, false)
728
728
  raise SignalException.new("Cant download files from the server.")
729
729
  end
730
- puts res
731
730
  self.download_multpile_files_s3(res['result'], @project_home, postfix: postfix, progress: progress)
732
731
  end
733
732
 
@@ -89,7 +89,7 @@ class Cnvrg::Helpers::Executer
89
89
  end
90
90
 
91
91
  def current_homedir
92
- `env | grep HOME`.strip.split("=").try(:last)
92
+ `env | grep -w HOME`.strip.split("=").try(:last)
93
93
  end
94
94
 
95
95
  def spark_path
@@ -97,7 +97,7 @@ class Cnvrg::Helpers::Executer
97
97
  end
98
98
 
99
99
  def slave_homedir()
100
- run_in_slave("env | grep HOME").split("=").try(:last)
100
+ run_in_slave("env | grep -w HOME").split("=").try(:last)
101
101
  end
102
102
 
103
103
  def slave_env
@@ -1,7 +1,7 @@
1
1
  module Cnvrg
2
2
  class JobCli < SubCommandBase
3
3
 
4
- desc 'log', description: '', hide: true
4
+ desc 'log', '', :hide => true
5
5
  method_option :level, :type => :string, :aliases => ["-l", "--level"], :default => 'info'
6
6
  method_option :step, :type => :string, :aliases => ["-s", "--step"], :default => nil
7
7
  method_option :restart, :type => :boolean, :aliases => ["-r", "--restart"], :default => false
@@ -15,7 +15,7 @@ module Cnvrg
15
15
  end
16
16
  end
17
17
 
18
- desc 'requirements', description: '', hide: true
18
+ desc 'requirements', '', :hide => true
19
19
  def requirements
20
20
  cli = Cnvrg::CLI.new
21
21
  cli.log_start(__method__, args, options)
@@ -23,7 +23,7 @@ module Cnvrg
23
23
  @project = Project.new(project_dir, owner: ENV['CNVRG_OWNER'], slug: ENV['CNVRG_PROJECT'])
24
24
  end
25
25
 
26
- desc 'install_reqs', description: 'Install requirements', hide: true
26
+ desc 'install_reqs', 'Install requirements', :hide => true
27
27
  def install_reqs
28
28
  cli = Cnvrg::CLI.new
29
29
  cli.log_start(__method__, args, options)
@@ -33,8 +33,7 @@ module Cnvrg
33
33
  @executer.execute_cmds(commands)
34
34
  end
35
35
 
36
-
37
- desc 'start', description: "Job Start!", hide: true
36
+ desc 'start', 'Job Start!', :hide => true
38
37
  def start
39
38
  cli = Cnvrg::CLI.new
40
39
  cli.log_start(__method__, args, options)
@@ -47,7 +46,7 @@ module Cnvrg
47
46
  @executer.main_thread
48
47
  end
49
48
 
50
- desc 'stats', description: 'stats of agent and slave', hide: true
49
+ desc 'stats', 'stats of agent and slave', :hide => true
51
50
  def stats
52
51
  cli = Cnvrg::CLI.new
53
52
  cli.log_start(__method__, args, options)
@@ -59,7 +58,7 @@ module Cnvrg
59
58
  @executer.executer_stats
60
59
  end
61
60
 
62
- desc 'pre_pod_stop', description: 'test', hide: true
61
+ desc 'pre_pod_stop', '', :hide => true
63
62
  def pre_pod_stop
64
63
  cli = Cnvrg::CLI.new
65
64
  cli.log_start(__method__, args, options)
@@ -1,6 +1,7 @@
1
1
  module Cnvrg
2
2
  class JobSsh < SubCommandBase
3
- desc 'ssh start', description: 'job_id', hide: false
3
+
4
+ desc 'ssh start', 'stats of agent and slave'
4
5
  method_option :port, :type => :numeric, :aliases => ["-p", "--port"], :desc => "Port to bind into", :default => 2222
5
6
  method_option :username, :type => :string, :aliases => ["-u", "--username"], :desc => "Job container user name", :default => nil
6
7
  method_option :password, :type => :string, :aliases => ["--password"], :desc =>"Job Conatainer user name, will be set by cnvrg", :default => nil
@@ -1,3 +1,3 @@
1
1
  module Cnvrg
2
- VERSION = '1.9.6'
2
+ VERSION = '1.9.9.3'
3
3
  end
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.9.6
4
+ version: 1.9.9.3
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-07-09 00:00:00.000000000 Z
13
+ date: 2020-07-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler