cnvrg 0.6.7 → 0.6.8

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: 43feb7b3c5edc4c1e3c662dae2511a1241590e9d
4
- data.tar.gz: 2006961bba45d17e30855abc0fb3afd7a8823649
3
+ metadata.gz: e7321af4c126ecf60f3848acccb6175f3efcd889
4
+ data.tar.gz: 33d47c965ce3027a2230620157b762397d0000c4
5
5
  SHA512:
6
- metadata.gz: 5145a80276b0681b5601b3d3477fe55dc9afe0e3301616ac41af7ed67bcd6478aab0b5c66dabbdf3aec939ccb533aa6fbf052292f2f745728f9362921f11d9b9
7
- data.tar.gz: 5af1951a2a0900ec95605017c7911da5075c9cd1007bf1a9e4ddfaf5fdb3c7de400b6e306cc0c9effd2f3315422075a03672100d7178fd0d6909b09c52c8c6ab
6
+ metadata.gz: 809ab8647843eb8065a88ea71aba5ffda922243e1fbd98cfd7fb4b7eb07843465274e963daea3692781fbbcbca7b132691228d57d1c1d6a3134bd2e11a68a127
7
+ data.tar.gz: 243c5285ae8b4c8ce477ee6207303e043d117dac32a5c197e90bc6ac7b71f38bb8b56bf4fe6b54407c17cb9b4f87a03b1756a703a67e0a9c8d844bcf939b4fbc
data/lib/cnvrg/cli.rb CHANGED
@@ -3291,6 +3291,7 @@ module Cnvrg
3291
3291
  method_option :git_commit, :type => :string, :aliases => [ "--git_commit"], :default => nil
3292
3292
  method_option :git_branch, :type => :string, :aliases => [ "--git_branch"], :default => nil
3293
3293
  method_option :restart_if_stuck, :type => :boolean, :aliases => ["--restart"], :default => nil
3294
+ method_option :local_folders, :type => :string, :aliases => ["--local_folders"], :default => nil
3294
3295
 
3295
3296
  def run(*cmd)
3296
3297
  verify_logged_in(true)
@@ -3317,6 +3318,8 @@ module Cnvrg
3317
3318
  custom_machine = options["machine"]
3318
3319
  output_dir = options["output_dir"]
3319
3320
  data_query = options["data_query"]
3321
+ local_folders = options["local_folders"]
3322
+
3320
3323
  if !data.present? and data_query.present?
3321
3324
  log_message("Please provide data with data_query", Thor::Shell::Color::RED)
3322
3325
  exit(1)
@@ -3363,7 +3366,7 @@ module Cnvrg
3363
3366
  :image => image, :grid => grid, :data => data, :data_commit => data_commit, :ignore => ignore, :force => force, :sync_before_terminate => sync_before_terminate,
3364
3367
  :max_time => max_time,
3365
3368
  :periodic_sync => periodic_sync, :dataset_only_tree=> dataset_only_tree,
3366
- :output_dir=>output_dir, :data_query=>data_query, :git_commit =>git_commit, :git_branch=> git_branch, :restart_if_stuck =>restart_if_stuck
3369
+ :output_dir=>output_dir, :data_query=>data_query, :git_commit =>git_commit, :git_branch=> git_branch, :restart_if_stuck =>restart_if_stuck, :local_folders => local_folders
3367
3370
  return
3368
3371
  end
3369
3372
 
@@ -3699,6 +3702,8 @@ module Cnvrg
3699
3702
  method_option :git_commit, :type => :string, :aliases => [ "--git_commit"], :default => nil
3700
3703
  method_option :git_branch, :type => :string, :aliases => [ "--git_branch"], :default => nil
3701
3704
  method_option :restart_if_stuck, :type => :boolean, :aliases => ["--restart"], :default => nil
3705
+ method_option :local_folders, :type => :string, :aliases => ["--local_folders"], :default => nil
3706
+
3702
3707
  def exec_remote(*cmd)
3703
3708
  verify_logged_in(true)
3704
3709
  log_start(__method__, args, options)
@@ -3764,9 +3769,10 @@ module Cnvrg
3764
3769
  git_branch = options["git_branch"]
3765
3770
 
3766
3771
  options_hash = Hash[options]
3772
+ local_folders_options = options["local_folders"]
3767
3773
  options_hash.except!("schedule", "machine_type", "image", "upload_output", "grid", "data", "data_commit",
3768
3774
  "local", "small", "medium", "large", "gpu", "gpuxl", "gpuxxl","max_time","dataset_only_tree",
3769
- "data_query", "git_commit","git_branch", "restart_if_stuck" )
3775
+ "data_query", "git_commit","git_branch", "restart_if_stuck","local_folders" )
3770
3776
  exec_options = options_hash.map {|x| "--#{x[0]}=#{x[1]}"}.flatten.join(" ")
3771
3777
  command = "#{exec_options} #{remote} #{upload_output_option} #{cmd.flatten.join(" ")}"
3772
3778
  commit_to_run = options["commit"] || nil
@@ -3835,7 +3841,8 @@ module Cnvrg
3835
3841
  commit_to_run = forced_commit
3836
3842
  end
3837
3843
  res = exp.exec_remote(command, commit_to_run, instance_type, image_slug, schedule, local_timestamp, grid, path_to_cmd, data, data_commit,
3838
- periodic_sync, sync_before_terminate, max_time, ds_sync_options,output_dir,data_query, git_commit, git_branch, restart_if_stuck)
3844
+ periodic_sync, sync_before_terminate, max_time, ds_sync_options,output_dir,
3845
+ data_query, git_commit, git_branch, restart_if_stuck,local_folders_options )
3839
3846
  if Cnvrg::CLI.is_response_success(res)
3840
3847
  check = Helpers.checkmark()
3841
3848
  str = "#{check} Experiment's is on: #{Cnvrg::Helpers.remote_url}/#{project.owner}/projects/#{project.slug}/experiments/#{res["result"]["exp_url"]}"
@@ -89,7 +89,8 @@ 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, restart_if_stuck=nil)
92
+ sync_before_terminate, max_time, ds_sync_options=0,output_dir=nil,data_query=nil,
93
+ git_commit=nil, git_branch=nil, restart_if_stuck=nil, local_folders=nil)
93
94
  response = Cnvrg::API.request("users/#{@owner}/projects/#{@project_slug}/experiment/remote", 'POST', {command: command, image_slug: image_slug,
94
95
  commit_sha1: commit_to_run,
95
96
  instance_type: instance_type,
@@ -100,7 +101,8 @@ module Cnvrg
100
101
  dataset_commit: data_commit,max_time:max_time,
101
102
  periodic_sync:periodic_sync, sync_before_terminate:sync_before_terminate,
102
103
  dataset_sync_options:ds_sync_options,output_dir:output_dir,
103
- dataset_query:data_query,git_commit:git_commit,git_branch:git_branch,restart_if_stuck:restart_if_stuck })
104
+ dataset_query:data_query,git_commit:git_commit,git_branch:git_branch,
105
+ restart_if_stuck:restart_if_stuck, local_folders: local_folders })
104
106
  return response
105
107
  end
106
108
  def remote_notebook(instance_type, commit, data, data_commit, notebook_type,ds_sync_options=0,data_query=nil)
data/lib/cnvrg/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Cnvrg
2
- VERSION = '0.6.7'
2
+ VERSION = '0.6.8'
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.6.7
4
+ version: 0.6.8
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-08-07 00:00:00.000000000 Z
12
+ date: 2018-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler