cnvrg 2.1.9 → 2.1.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 414c34615497d519b8df3fc1adf597aa18bb8d05eb7466b312bbfd517f0e74aa
4
- data.tar.gz: ddde064e3ef2f144948d1b6d1859f4daef95290dd13ae28b544569f6b16f5be0
3
+ metadata.gz: 39ee04e88be68fe27beb93cf57070e9b63fc1f908f2ff97f722bcb402d03bc78
4
+ data.tar.gz: 28e404bb36262d03f29fa96fddadbcab76d4c9eb99a4861078bb1b266621b85c
5
5
  SHA512:
6
- metadata.gz: 8d72d7b22df91d154e0313f24511ae9f6f007c077bf0f49a9329f0546ec9983833920fd567e4abfe7ab876ae2da4aae888d77840d10d7945f956d0b8e77047c1
7
- data.tar.gz: f72cfb009f744ede0fdaec505610e32fa50ee570415cd729678c2d791b79351a891569f5ef1911920ddca242bc0354c61e6aa505252793b3345cdfdaeebe0dbc
6
+ metadata.gz: dbc2220a92859ebd7689fa3922c38d4a6cd64bd555507f5eed65f91edc1eb17f652ff886310dc3e82c78a4091f0490c0f59efbcceea785dc3b77d5a1a01ff48e
7
+ data.tar.gz: 78c3ec169b49cd9b5b87240db503f03bc6ccd3e7665a9961d022d82a272ddaf8ea12fb2399acda5c4a13a402c06ebaf4e1500a39142f6eae9c81618b3bea8190
data/Readme.md CHANGED
@@ -108,4 +108,43 @@
108
108
  ## Version v2.1.9
109
109
  2022-09-06
110
110
  * DEV-15423 - Bug: Workspace - Jupyter process gets killed
111
- * DEV-15451 - Bug: CLI - sync error "undefined method `encode' for nil:NilClass" on GCP storage
111
+ * DEV-15451 - Bug: CLI - sync error "undefined method `encode' for nil:NilClass" on GCP storage
112
+ ## Version v2.1.10
113
+ 2022-10-26
114
+ * DEV-15858 - Bug: Tensorboard compare - ongoing experiments' artifacts aren't cloned to session
115
+ ## Version v2.1.11
116
+ 2022-11-03
117
+ * DEV-16090 - Bug: Tensorboard compare - webapp gets stuck in "init" state
118
+ ## Version v2.1.12
119
+ 2022-11-09
120
+ * DEV-15972 - Bug: Customer cannot use dataset query due to ssl error
121
+ ## Version v2.1.13
122
+ 2023-03-05
123
+ * DEV-16372 - Epic: Cli V2 release - phase 1
124
+ h2. 🎯 Objective
125
+
126
+ Release v2 of cnvrg cli and deprecate the old version
127
+
128
+ h2. 🤔 Assumptions
129
+
130
+ # *Docs will be released (joint effort of tech writer, support and dev)*
131
+ # *cnvrg:v6 image will be released (with updated python version)*
132
+ # *All issues on High & Highest priority n sdk-productionize fixVersion will be resolved*
133
+ # *QA tests will be performed in different set ups (aks/eks/gke, windows device, mac m1)*
134
+
135
+
136
+ Note: this is not the most detailed epic, as most things already exist in cliv1 or sdkv2. for any questions please contact [~accountid:5fb5461f4a09640069dbf768]
137
+ * DEV-16372 - Epic: Cli V2 release - phase 1
138
+ h2. 🎯 Objective
139
+
140
+ Release v2 of cnvrg cli and deprecate the old version
141
+
142
+ h2. 🤔 Assumptions
143
+
144
+ # *Docs will be released (joint effort of tech writer, support and dev)*
145
+ # *cnvrg:v6 image will be released (with updated python version)*
146
+ # *All issues on High & Highest priority n sdk-productionize fixVersion will be resolved*
147
+ # *QA tests will be performed in different set ups (aks/eks/gke, windows device, mac m1)*
148
+
149
+
150
+ Note: this is not the most detailed epic, as most things already exist in cliv1 or sdkv2. for any questions please contact [~accountid:5fb5461f4a09640069dbf768]
data/lib/cnvrg/cli.rb CHANGED
@@ -1019,7 +1019,7 @@ module Cnvrg
1019
1019
  begin
1020
1020
  unless File.exist?(fullpath)
1021
1021
  downloader.safe_operation("#{abs_path}/#{file_name}") do
1022
- download = open(f["url"])
1022
+ download = open(f["url"],{ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE})
1023
1023
  IO.copy_stream(download, fullpath)
1024
1024
  end
1025
1025
  end
@@ -3636,19 +3636,15 @@ module Cnvrg
3636
3636
  end
3637
3637
 
3638
3638
  log_message(str, Thor::Shell::Color::GREEN)
3639
-
3639
+
3640
3640
  exit_status = 0
3641
-
3641
+
3642
3642
  if options['wait']
3643
3643
  end_pos = 0
3644
3644
  while true
3645
3645
  tries = 0
3646
3646
  begin
3647
- result = Cnvrg::API_V2.request(
3648
- "#{project.owner}/projects/#{project.slug}/experiments/#{res["result"]["exp_url"]}/info",
3649
- 'GET',
3650
- { exit_status: true, grid: res["result"]["grid"], pos: end_pos }
3651
- )
3647
+ result = fetch_experiment_info(res,project,end_pos)
3652
3648
 
3653
3649
  exit_statuses = result.values.pluck('exit_status')
3654
3650
  if exit_statuses.include? nil
@@ -5003,32 +4999,28 @@ module Cnvrg
5003
4999
 
5004
5000
  log_message("compare is running")
5005
5001
  while true
5006
- log_message("compare is running for slugs #{slugs}")
5002
+ log_message("Comparing the following experiment slugs: #{slugs}")
5007
5003
  slugs.each do |exp_slug|
5008
5004
  begin
5009
5005
  if exps_map[exp_slug].blank?
5010
5006
  exp = @project.get_experiment(exp_slug)["experiment"]
5011
5007
  else
5012
5008
  exp = exps_map[exp_slug]
5013
- log_message("#{exp["title"]} has ended skipping it", Thor::Shell::Color::BLUE)
5009
+ log_message("Experiment '#{exp["title"]}' end commit already cloned, skipping it", Thor::Shell::Color::BLUE)
5014
5010
  next
5015
5011
  end
5016
5012
  exp_name = exp["title"]
5017
5013
  if exp["end_commit"].present? and exp["status"] != "Ongoing"
5018
- log_message("#{exp_name} has ended, getting files from end commit", Thor::Shell::Color::BLUE)
5014
+ log_message("Experiment '#{exp_name}' has ended, getting files from its end commit", Thor::Shell::Color::BLUE)
5019
5015
  num_of_new_files = Cnvrg::Helpers.get_experiment_events_log_from_server(exp, @project)
5020
5016
  exps_map[exp_slug] = exp
5021
5017
  else
5022
- log_message("#{exp_name} is running should get logs", Thor::Shell::Color::BLUE)
5023
- success, num_of_new_files = Cnvrg::Helpers.get_experiment_events_log_via_kubectl(exp, namespace)
5024
- if !success and exp["last_successful_commit"].present? and !copied_commits.include?(exp["last_successful_commit"]["sha1"])
5025
- log_message("Failed to get kube files, using last commit", Thor::Shell::Color::BLUE)
5026
- num_of_new_files = Cnvrg::Helpers.get_experiment_events_log_from_server(exp, @project, commit: exp["last_successful_commit"]["sha1"])
5027
- copied_commits << exp["last_successful_commit"]["sha1"]
5028
- end
5018
+ log_message("Experiment '#{exp_name}' is running, getting files from its last successful commit", Thor::Shell::Color::BLUE)
5019
+ num_of_new_files = Cnvrg::Helpers.get_experiment_events_log_from_server(exp, @project, commit: exp["last_successful_commit"]["sha1"])
5020
+ copied_commits << exp["last_successful_commit"]["sha1"]
5029
5021
  end
5030
5022
 
5031
- log_message("New tf files copied", Thor::Shell::Color::BLUE) if num_of_new_files > 0
5023
+ log_message("New .tfevent files downloaded", Thor::Shell::Color::BLUE) if num_of_new_files > 0
5032
5024
  rescue => e
5033
5025
  Cnvrg::Logger.log_error(e)
5034
5026
  end
@@ -5960,6 +5952,24 @@ module Cnvrg
5960
5952
  end
5961
5953
  end
5962
5954
 
5955
+
5956
+ def fetch_experiment_info(res, project, end_pos)
5957
+
5958
+ result =
5959
+ Cnvrg::API_V2
5960
+ .request("#{project.owner}/projects/#{project.slug}/experiments/#{res["result"]["exp_url"]}/info",
5961
+ 'GET',
5962
+ { exit_status: true, grid: res["result"]["grid"], pos: end_pos }
5963
+ )
5964
+
5965
+ if result.key?("exit_status")
5966
+ return result
5967
+ end
5968
+
5969
+ return result["data"]["attributes"]["info"]
5970
+
5971
+ end
5972
+
5963
5973
  end
5964
5974
  end
5965
5975
 
data/lib/cnvrg/helpers.rb CHANGED
@@ -374,48 +374,6 @@ parameters:
374
374
  end
375
375
  return num_of_new_files
376
376
  end
377
-
378
- def get_experiment_events_log_via_kubectl(exp, namespace)
379
- dest_dir = exp["slug"]
380
- result = `kubectl -n #{namespace} get pods | grep #{exp["slug"]}`
381
-
382
- pod_name = result.split(" ")[0]
383
- return false, 0 if pod_name.blank?
384
- FileUtils.mkdir_p(dest_dir)
385
- working_dir = `kubectl -n #{namespace} exec #{pod_name} -c agent -- pwd`
386
- working_dir.strip!
387
- res = `kubectl -n #{namespace} exec #{pod_name} -c agent -- /bin/bash -c "ls -R #{working_dir}"`
388
- files_and_folders = res.split("\n\n")
389
- all_files = []
390
-
391
- files_and_folders.each do |file_and_folder|
392
- files = file_and_folder.split("\n")
393
- if files.first.include?(":")
394
- folder = files.first.gsub(":", "")
395
-
396
- folder = folder.sub(working_dir + "/", "")
397
- files = files.drop(1)
398
- end
399
- files.each do |file|
400
- if file.include?("tfevents")
401
- all_files << "#{folder}/#{file}"
402
- end
403
- end
404
- end
405
-
406
- num_of_new_files = 0
407
- all_files.each do |file|
408
- file_dir = "#{dest_dir}/#{File.dirname(file)}"
409
- FileUtils.mkdir_p(file_dir)
410
- num_of_new_files += 1 unless File.exist?("#{dest_dir}/#{file}")
411
- res = `kubectl -n #{namespace} cp #{pod_name}:#{file} -c agent #{dest_dir}/#{file}`
412
- end
413
-
414
- return true, num_of_new_files
415
- rescue => e
416
- Cnvrg::Logger.log_error(e)
417
- return false, 0
418
- end
419
377
  end
420
378
 
421
379
  end
data/lib/cnvrg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cnvrg
2
- VERSION = '2.1.9'
2
+ VERSION = '2.1.13'
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: 2.1.9
4
+ version: 2.1.13
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: 2022-09-13 00:00:00.000000000 Z
13
+ date: 2023-03-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler