cnvrg 0.5.5 → 0.5.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
  SHA1:
3
- metadata.gz: be48abaee7b44f00673ed8e4fe95fdc32044cdbf
4
- data.tar.gz: fdc1bb3df689ea6524f268f910915559ba62ddfb
3
+ metadata.gz: 07964bc246a5f5139d9e726200e40d318a54eaec
4
+ data.tar.gz: f313dce679b50991e1440f668b8db27b1433bca8
5
5
  SHA512:
6
- metadata.gz: 70a35b1ac372e78feffd115d7426338dced272bd351b7e76277f3dc2ead315d2632b9f28a07c4f7fd27f93c9668678addb4d91b106cb3c26b5e75d94832c752b
7
- data.tar.gz: 96a10e4bd81552ea5b1ce22468fd102f9ec21a29e64152b83106a743e2e6278de0d68cb504fc78dcfb64098f30b60d5ecb051a224685dcdb5f9eea876ce12cc2
6
+ metadata.gz: 56a184f578f4817a3f7471b3263d948575d7b685139748614793e1dad14f20419645279616c0bcffb43eaee31e7ce4d20ca7090ee080ade8167cfed668d80dca
7
+ data.tar.gz: d6dfd7f259df3aaaf55ccd4e93662e9d5b4f9ad184f138b14c605d09a3faed498d6d1f0dd3765ced81d966303bc5f696ba0bd262c8110809e3295d8a175e85f1
@@ -3,7 +3,6 @@ require 'faraday'
3
3
  require 'json'
4
4
  require 'fileutils'
5
5
  require 'cnvrg/helpers'
6
- require 'faraday_middleware-request-retry'
7
6
  require 'logger'
8
7
 
9
8
  module Cnvrg
@@ -2395,7 +2395,11 @@ module Cnvrg
2395
2395
  end
2396
2396
  git_output_dir = options["output_dir"]
2397
2397
  if !git_output_dir.blank?
2398
+ if git_output_dir.ends_with? "/"
2399
+ git_output_dir = git_output_dir[0..-2]
2400
+ end
2398
2401
  spec_files_to_upload = Dir.glob("#{git_output_dir}/**/*", File::FNM_DOTMATCH).flatten
2402
+ spec_files_to_upload = spec_files_to_upload.select{|x| !x.ends_with? "/."}
2399
2403
  force = true
2400
2404
  end
2401
2405
 
@@ -3370,7 +3374,7 @@ module Cnvrg
3370
3374
  method_option :data_query, :type => :string, :aliases => ["-q", "--query"], :default => nil
3371
3375
  method_option :git_commit, :type => :string, :aliases => [ "--git_commit"], :default => nil
3372
3376
  method_option :git_branch, :type => :string, :aliases => [ "--git_branch"], :default => nil
3373
-
3377
+ method_option :restart_if_stuck, :type => :boolean, :aliases => ["--restart"], :default => nil
3374
3378
 
3375
3379
  def run(*cmd)
3376
3380
  verify_logged_in(true)
@@ -3407,7 +3411,7 @@ module Cnvrg
3407
3411
  end
3408
3412
  git_commit = options["git_commit"]
3409
3413
  git_branch = options["git_branch"]
3410
-
3414
+ restart_if_stuck = options["restart_if_stuck"]
3411
3415
 
3412
3416
  options_hash = Hash[options]
3413
3417
 
@@ -3438,7 +3442,7 @@ module Cnvrg
3438
3442
  :image => image, :grid => grid, :data => data, :data_commit => data_commit, :ignore => ignore, :force => force, :sync_before_terminate => sync_before_terminate,
3439
3443
  :max_time => max_time,
3440
3444
  :periodic_sync => periodic_sync, :dataset_only_tree=> dataset_only_tree,
3441
- :output_dir=>output_dir, :data_query=>data_query, :git_commit =>git_commit, :git_branch=> git_branch
3445
+ :output_dir=>output_dir, :data_query=>data_query, :git_commit =>git_commit, :git_branch=> git_branch, :restart_if_stuck =>restart_if_stuck
3442
3446
  return
3443
3447
  end
3444
3448
 
@@ -3783,7 +3787,7 @@ module Cnvrg
3783
3787
  method_option :data_query, :type => :string, :aliases => ["-q", "--query"], :default => nil
3784
3788
  method_option :git_commit, :type => :string, :aliases => [ "--git_commit"], :default => nil
3785
3789
  method_option :git_branch, :type => :string, :aliases => [ "--git_branch"], :default => nil
3786
-
3790
+ method_option :restart_if_stuck, :type => :boolean, :aliases => ["--restart"], :default => nil
3787
3791
  def exec_remote(*cmd)
3788
3792
  verify_logged_in(true)
3789
3793
  log_start(__method__, args, options)
@@ -3812,6 +3816,7 @@ module Cnvrg
3812
3816
  if dataset_only_tree
3813
3817
  ds_sync_options = 1
3814
3818
  end
3819
+ restart_if_stuck = options["restart_if_stuck"]
3815
3820
  instance_type = options["machine_type"] || nil
3816
3821
  schedule = options["schedule"] || ""
3817
3822
  if schedule.start_with? 'in'
@@ -3850,7 +3855,7 @@ module Cnvrg
3850
3855
  options_hash = Hash[options]
3851
3856
  options_hash.except!("schedule", "machine_type", "image", "upload_output", "grid", "data", "data_commit",
3852
3857
  "local", "small", "medium", "large", "gpu", "gpuxl", "gpuxxl","max_time","dataset_only_tree",
3853
- "data_query", "git_commit","git_branch" )
3858
+ "data_query", "git_commit","git_branch", "restart_if_stuck" )
3854
3859
  exec_options = options_hash.map {|x| "--#{x[0]}=#{x[1]}"}.flatten.join(" ")
3855
3860
  command = "#{exec_options} #{remote} #{upload_output_option} #{cmd.flatten.join(" ")}"
3856
3861
  commit_to_run = options["commit"] || nil
@@ -3918,7 +3923,7 @@ module Cnvrg
3918
3923
  commit_to_run = forced_commit
3919
3924
  end
3920
3925
  res = exp.exec_remote(command, commit_to_run, instance_type, image_slug, schedule, local_timestamp, grid, path_to_cmd, data, data_commit,
3921
- periodic_sync, sync_before_terminate, max_time, ds_sync_options,output_dir,data_query, git_commit, git_branch)
3926
+ periodic_sync, sync_before_terminate, max_time, ds_sync_options,output_dir,data_query, git_commit, git_branch, restart_if_stuck)
3922
3927
  if Cnvrg::CLI.is_response_success(res)
3923
3928
  check = Helpers.checkmark()
3924
3929
  str = "#{check} Experiment's is on: #{Cnvrg::Helpers.remote_url}/#{project.owner}/projects/#{project.slug}/experiments/#{res["result"]["exp_url"]}"
@@ -89,7 +89,7 @@ module Cnvrg
89
89
  end
90
90
 
91
91
  def exec_remote(command, commit_to_run, instance_type, image_slug,scheduling_query,local_timestamp, grid,path_to_cmd,data, data_commit,periodic_sync,
92
- sync_before_terminate, max_time, ds_sync_options=0,output_dir=nil,data_query=nil, git_commit=nil, git_branch=nil)
92
+ sync_before_terminate, max_time, ds_sync_options=0,output_dir=nil,data_query=nil, git_commit=nil, git_branch=nil, restart_if_stuck=nil)
93
93
  response = Cnvrg::API.request("users/#{@owner}/projects/#{@project_slug}/experiment/remote", 'POST', {command: command, image_slug: image_slug,
94
94
  commit_sha1: commit_to_run,
95
95
  instance_type: instance_type,
@@ -100,7 +100,7 @@ module Cnvrg
100
100
  dataset_commit: data_commit,max_time:max_time,
101
101
  periodic_sync:periodic_sync, sync_before_terminate:sync_before_terminate,
102
102
  dataset_sync_options:ds_sync_options,output_dir:output_dir,
103
- dataset_query:data_query,git_commit:git_commit,git_branch:git_branch })
103
+ dataset_query:data_query,git_commit:git_commit,git_branch:git_branch,restart_if_stuck:restart_if_stuck })
104
104
  return response
105
105
  end
106
106
  def remote_notebook(instance_type, commit, data, data_commit, notebook_type,ds_sync_options=0,data_query=nil)
@@ -1,4 +1,4 @@
1
1
  module Cnvrg
2
- VERSION = '0.5.5'
2
+ VERSION = '0.5.6'
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.5
4
+ version: 0.5.6
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-28 00:00:00.000000000 Z
12
+ date: 2018-07-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler