cnvrg 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cnvrg/cli.rb +43 -0
- data/lib/cnvrg/project.rb +13 -0
- data/lib/cnvrg/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36eab169fcd963d5ae3eedc372dfd5927cd0517d
|
4
|
+
data.tar.gz: 2f66b6270fa612e4522205174d82e708806ace6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bad977d68dc97de0c0a3414f7959366858fea20e89d39822df37a33a5ede886dbc113508841558942004eb799eb55128f4fb4c65e169f98509a3235df4d978b
|
7
|
+
data.tar.gz: 27739efd665071781f03621a2bd74b045d378334559d1d171822575e1229647a98c21b1bef9a33cac301b393fe9fbcb0a53b096f4c177d06dd13a3baf82a7fcc
|
data/lib/cnvrg/cli.rb
CHANGED
@@ -4673,6 +4673,49 @@ module Cnvrg
|
|
4673
4673
|
|
4674
4674
|
end
|
4675
4675
|
|
4676
|
+
desc 'experiments', 'list project experiments'
|
4677
|
+
method_option :id, :type => :string, :aliases => ["-id"], :desc => "Get info for specific experiments", :default => ""
|
4678
|
+
method_option :tag, :type => :string, :aliases => ["-t"], :desc => "Get info for specific experiment tag", :default => ""
|
4679
|
+
def experiments
|
4680
|
+
verify_logged_in(true)
|
4681
|
+
log_start(__method__, args, options)
|
4682
|
+
|
4683
|
+
project_dir = is_cnvrg_dir(Dir.pwd)
|
4684
|
+
@project = Project.new(project_dir)
|
4685
|
+
unless options['id'].to_s.size > 5
|
4686
|
+
result = @project.get_experiments()
|
4687
|
+
list = result["result"]["experiments"]
|
4688
|
+
if list and list.size > 1
|
4689
|
+
print_table(list)
|
4690
|
+
else
|
4691
|
+
say "No experiments"
|
4692
|
+
end
|
4693
|
+
else
|
4694
|
+
result = @project.get_experiment(options['id'])
|
4695
|
+
result = result["result"]["experiment"]
|
4696
|
+
if result
|
4697
|
+
if options["tag"].to_s.size == 0
|
4698
|
+
list = []
|
4699
|
+
list << result.keys
|
4700
|
+
list << result.values
|
4701
|
+
|
4702
|
+
print_table(list)
|
4703
|
+
else
|
4704
|
+
if result.keys.include? options["tag"]
|
4705
|
+
say result[options["tag"]]
|
4706
|
+
else
|
4707
|
+
say "No such tag"
|
4708
|
+
end
|
4709
|
+
end
|
4710
|
+
else
|
4711
|
+
say "No such experiment"
|
4712
|
+
end
|
4713
|
+
|
4714
|
+
|
4715
|
+
end
|
4716
|
+
|
4717
|
+
end
|
4718
|
+
|
4676
4719
|
desc 'get_machine', 'create new aws machine', :hide => true
|
4677
4720
|
|
4678
4721
|
def get_machine()
|
data/lib/cnvrg/project.rb
CHANGED
@@ -409,7 +409,20 @@ module Cnvrg
|
|
409
409
|
response = Cnvrg::API.request("users/#{self.owner}/projects/#{self.slug}/commits/list", 'GET')
|
410
410
|
CLI.is_response_success(response)
|
411
411
|
return response
|
412
|
+
end
|
413
|
+
|
412
414
|
|
415
|
+
def get_experiments
|
416
|
+
response = Cnvrg::API.request("users/#{self.owner}/projects/#{self.slug}/experiments/list", 'GET')
|
417
|
+
CLI.is_response_success(response)
|
418
|
+
return response
|
419
|
+
end
|
420
|
+
|
421
|
+
|
422
|
+
def get_experiment(slug)
|
423
|
+
response = Cnvrg::API.request("users/#{self.owner}/projects/#{self.slug}/experiments/#{slug}", 'GET')
|
424
|
+
CLI.is_response_success(response)
|
425
|
+
return response
|
413
426
|
end
|
414
427
|
def update_idx_with_commit!(commit)
|
415
428
|
idx_hash = YAML.load_file("#{self.local_path}/.cnvrg/idx.yml")
|
data/lib/cnvrg/version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.5
|
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: 2017-
|
12
|
+
date: 2017-12-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -416,7 +416,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
416
416
|
version: '0'
|
417
417
|
requirements: []
|
418
418
|
rubyforge_project:
|
419
|
-
rubygems_version: 2.
|
419
|
+
rubygems_version: 2.5.1
|
420
420
|
signing_key:
|
421
421
|
specification_version: 4
|
422
422
|
summary: A CLI tool for interacting with cnvrg.io.
|