cnvrg 2.0.1 → 2.0.6

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: ab82882b2bb6c9093751cd560eaa4ccb7540fad9b9a34a81245721538dd37a5b
4
- data.tar.gz: e35299be744d985a37794288a269ba2bb55cf64d3fcd702c6c6147bd4f5d740d
3
+ metadata.gz: b238ce877c0fa8da80c63c6d3d165ce974c250ea9c3f3d21ff092098356aa5a5
4
+ data.tar.gz: 7c7b4aa637b3bcaf5f18a7eb973d6995f0f1e25147a16a2ccfb1ce3d6dea91e3
5
5
  SHA512:
6
- metadata.gz: 52b51bb4942583e9ac3eceab24891d252ef7e31d7f1a2a87d5c8f4586f914f33f2d9cc7addc09ab5aa3652a9ba939ef5a37bdb9fc82d18e4e0e0a61126265d17
7
- data.tar.gz: df735e631778b5d36d296c33903719a2ba7832ce2a9e218eea033ad246f8c4ce044a7b7d5562f68d901a1ee32d62a88559f886da2a0341d8bf7c51b50c25660c
6
+ metadata.gz: fb1b724199e92fddfa2be4c04b9eb1a8a94e1df65759482fb6c3173f7c3c7632d236c22836749e5f1d6578115555b838285b58d1a95a42ce2df67d3a354da043
7
+ data.tar.gz: c840826e01dcd8061fdb1bf065f416d97ca3fe35575649171814741c32332b458c7bac57fa248e9afd45f337b60b18003077cc72d5927527490689572608ad6b
data/Readme.md CHANGED
@@ -23,4 +23,20 @@
23
23
  2021-05-05
24
24
  * DEV-8868 - Bug: SDK - e.sync() in git project only creates empty "output" folder in commit
25
25
  ## Version v2.0.1
26
- 2021-06-13
26
+ 2021-06-13
27
+ ## Version v2.0.2
28
+ 2021-06-16
29
+ * DEV-9694 - Bug: Download artifacts fails on authorization error
30
+ ## Version v2.0.3
31
+ 2021-06-29
32
+ * DEV-9919 - Bug: clone artifacts fails on "Not Authorize, Are you logged in?"
33
+ ## Version v2.0.4
34
+ 2021-07-08
35
+ * DEV-9935 - Bug: CLI - cnvrg sync creates new commit but no blob versions
36
+ ## Version v2.0.5
37
+ 2021-07-11
38
+ * DEV-10171 - Bug: experiment randomly fails with error- "Couldn't clone artifacts"
39
+ * DEV-10189 - Bug: CLI Sync -file/folder with broken symlink will cause sync to fail
40
+ ## Version v2.0.6
41
+ 2021-07-18
42
+ * DEV-10209 - Bug: some experiments in grid failed on cnvrg-cli commands (docker container id was missing)
data/lib/cnvrg/cli.rb CHANGED
@@ -3006,12 +3006,12 @@ module Cnvrg
3006
3006
  method_option :job_slug, :type => :string, :aliases => ["-j", "--job"], :default => nil
3007
3007
  method_option :job_type, :type => :string, :aliases => ["-jt", "--job_type"], :default => nil
3008
3008
  method_option :files, :type => :string, :aliases => ["--files"], :default => nil
3009
- method_option :output_dir, :type => :string, :aliases => ["--output_dir"], :default => nil
3009
+ method_option :output_dir, :type => :string, :aliases => ["--output_dir"], :default => 'output'
3010
3010
  method_option :git_diff, :type => :boolean, :aliases => ["--git_diff"], :default => false
3011
3011
  method_option :suppress_exceptions, :type => :boolean, :aliases => ["--suppress-exceptions"], :default => true
3012
3012
  method_option :debug_mode, :type => :boolean, :aliases => ["--debug-mode"], :default => false
3013
3013
  method_option :chunk_size, :type => :numeric, :aliases => ["--chunk"], :default => 1000
3014
- method_option :local, :type => :boolean, :aliases => ["--local"], :default => false
3014
+ method_option :local, :type => :boolean, :aliases => ["--local"], :default => true
3015
3015
 
3016
3016
  def sync(direct = true)
3017
3017
  verify_logged_in(true) if direct
@@ -5007,7 +5007,7 @@ module Cnvrg
5007
5007
  end
5008
5008
  end
5009
5009
 
5010
- desc 'experiments', 'List project experiments', :hide => true
5010
+ desc 'experiments', 'List project experiments'
5011
5011
  method_option :id, :type => :string, :aliases => ["--id"], :desc => "Get info for specific experiments", :default => ""
5012
5012
  method_option :tag, :type => :string, :aliases => ["-t"], :desc => "Get info for specific experiment tag", :default => ""
5013
5013
 
data/lib/cnvrg/files.rb CHANGED
@@ -730,7 +730,11 @@ module Cnvrg
730
730
  end
731
731
  res = Cnvrg::API.request(@base_resource + "download_files", 'POST', {files: files, commit: commit})
732
732
  unless Cnvrg::CLI.is_response_success(res, false)
733
- raise SignalException.new("Cant download files from the server.")
733
+ begin
734
+ puts(res)
735
+ rescue
736
+ end
737
+ raise StandardError.new("Cant download files from the server.")
734
738
  end
735
739
  self.download_multiple_files_s3(res['result'], @project_home, postfix: postfix, progress: progress, threads: threads)
736
740
  end
@@ -3,7 +3,7 @@ require 'cnvrg/helpers/agent'
3
3
  class Cnvrg::Helpers::Executer
4
4
  attr_reader :machine_activity, :agent_id, :main_id
5
5
  MAIN_CONTAINER_PORT = ENV['MAIN_CONTAINER_PORT'].try(:to_i) || 4000
6
-
6
+ HAS_DOCKER = ENV['HAS_DOCKER'] == "true"
7
7
 
8
8
  ### this class represent a machine_activity. it will poll the commands, communicate with the
9
9
  # server (poll commands) and let the server know the status of this executer.
@@ -84,7 +84,7 @@ class Cnvrg::Helpers::Executer
84
84
  agent_id = nil
85
85
  main_id = nil
86
86
  timeout = 2
87
- timeout = nil if !@is_new_main
87
+ timeout = nil if (!@is_new_main || HAS_DOCKER)
88
88
  Timeout.timeout(timeout) do
89
89
  while agent_id.blank? or main_id.blank?
90
90
  grep_by = @job_id
data/lib/cnvrg/project.rb CHANGED
@@ -328,15 +328,21 @@ module Cnvrg
328
328
  end
329
329
 
330
330
  def get_storage_client
331
- response = Cnvrg::API.request("users/#{@owner}/projects/#{@slug}/client", 'GET')
332
- if Cnvrg::CLI.is_response_success(response, false)
333
-
331
+ client_params = nil
332
+ i = 0
333
+ begin
334
+ response = Cnvrg::API.request("users/#{@owner}/projects/#{@slug}/client", 'GET')
335
+ unless Cnvrg::CLI.is_response_success(response, false)
336
+ raise StandardError.new("Can't find project credentials")
337
+ end
334
338
  client_params = response['client']
335
- else
336
-
339
+ rescue StandardError
340
+ i += 1
341
+ sleep(5 * i)
342
+ retry if i < 10
337
343
  client_params = get_storage_client_fallback
338
344
  end
339
-
345
+ raise StandardError.new("Can't find project credentials") unless client_params
340
346
  Cnvrg::Downloader::Client.factory(client_params)
341
347
  end
342
348
 
@@ -381,10 +387,12 @@ module Cnvrg
381
387
  def generate_output_dir(output_dir, local: false)
382
388
  Cnvrg::Logger.log_info("Generating output dir for #{output_dir}")
383
389
  upload_list = []
390
+ list = []
384
391
  list = Dir.glob("/cnvrg/#{output_dir}/**/*", File::FNM_DOTMATCH)
385
392
  if local
386
393
  list += Dir.glob("#{output_dir}/**/*", File::FNM_DOTMATCH)
387
394
  end
395
+ list.uniq!
388
396
  Parallel.map(list, in_threads: IDXParallelThreads) do |e|
389
397
  next if e.end_with? "/."
390
398
  if File.directory? e
@@ -449,6 +457,10 @@ module Cnvrg
449
457
  if list_ignore_new.include? label
450
458
  next
451
459
  end
460
+ if File.symlink?(e)
461
+ Cnvrg::Logger.log_info("Skipping symlink #{e}")
462
+ next
463
+ end
452
464
  if File.directory? e
453
465
  dir_name = (label.ends_with? "/") ? label : (label + "/")
454
466
  tree_idx[dir_name] = nil
@@ -701,8 +713,11 @@ module Cnvrg
701
713
  res = JSON.parse(resp['result']) rescue nil
702
714
  return if res.blank?
703
715
  config = self.get_config
704
- config[:is_git] = res['git']
705
716
  config[:project_name] = res['title']
717
+ config[:project_slug] = @slug
718
+ config[:owner] = @owner
719
+ config[:git] = res['git'] || false
720
+ config[:is_git] = res['git'] || false
706
721
  self.set_config(config)
707
722
  end
708
723
 
data/lib/cnvrg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cnvrg
2
- VERSION = '2.0.1'
2
+ VERSION = '2.0.6'
3
3
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cnvrg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yochay Ettun
8
8
  - Leah Kolben
9
9
  - Omer Shacham
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-06-16 00:00:00.000000000 Z
13
+ date: 2021-07-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -473,7 +473,7 @@ files:
473
473
  homepage: https://cnvrg.io
474
474
  licenses: []
475
475
  metadata: {}
476
- post_install_message:
476
+ post_install_message:
477
477
  rdoc_options: []
478
478
  require_paths:
479
479
  - lib
@@ -488,8 +488,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
488
488
  - !ruby/object:Gem::Version
489
489
  version: '0'
490
490
  requirements: []
491
- rubygems_version: 3.0.9
492
- signing_key:
491
+ rubygems_version: 3.2.22
492
+ signing_key:
493
493
  specification_version: 4
494
494
  summary: A CLI tool for interacting with cnvrg.io.
495
495
  test_files: []