easy_ml 0.2.0.pre.rc96 → 0.2.0.pre.rc98
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/app/models/easy_ml/concerns/versionable.rb +3 -3
- data/app/models/easy_ml/dataset.rb +0 -2
- data/app/models/easy_ml/deploy.rb +8 -2
- data/app/models/easy_ml/model.rb +1 -1
- data/app/models/easy_ml/model_file.rb +4 -0
- data/app/models/easy_ml/settings.rb +10 -0
- data/lib/easy_ml/configuration.rb +12 -0
- data/lib/easy_ml/data/dataset_manager.rb +4 -0
- data/lib/easy_ml/data/splits/file_split.rb +3 -1
- data/lib/easy_ml/feature_store.rb +13 -4
- data/lib/easy_ml/support/synced_file.rb +4 -0
- data/lib/easy_ml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c105c4f00c13b7654204ff04d2ffcec27657a4fd3386a7712fba6da90bd733a
|
4
|
+
data.tar.gz: 141dc35ad18183a64b73b9cebc57ecebdfc5e9855c9afa52a0270e904bfcc651
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2412eed49dd5824d871037ee4806a7fdf970caf034d03a504ae1020fa3d71aa79a9fb544ed5208c65ca1f4bd7be05f5a60ffd57c17187d3986f64b1c2a0f0f4d
|
7
|
+
data.tar.gz: 5e2416e89e5855b1fddfee0072a0b750880fb4f7afbf47968d3e0e8f8e20e5eb95ced11ff05cd9df79473cbc6621006148b1965c2439477757aa78c1340e2415
|
@@ -9,17 +9,17 @@ module EasyML
|
|
9
9
|
def bump_version(force: false)
|
10
10
|
return version if version.present? && !force
|
11
11
|
|
12
|
-
tz = ActiveSupport::TimeZone.new(EasyML::
|
12
|
+
tz = ActiveSupport::TimeZone.new(EasyML::Support::UTC)
|
13
13
|
orig_version = version
|
14
14
|
prev_version = tz.parse(version.gsub(/_/, "")) if version
|
15
|
-
timestamp = Time.current.in_time_zone(EasyML::
|
15
|
+
timestamp = Time.current.in_time_zone(EasyML::Support::UTC)
|
16
16
|
timestamp = (prev_version + 1.second) if prev_version && compare_versions(timestamp, prev_version)
|
17
17
|
|
18
18
|
self.version = timestamp.strftime(STRING_FORMAT)
|
19
19
|
end
|
20
20
|
|
21
21
|
def compare_versions(version1, version2)
|
22
|
-
tz = ActiveSupport::TimeZone.new(EasyML::
|
22
|
+
tz = ActiveSupport::TimeZone.new(EasyML::Support::UTC)
|
23
23
|
tz.parse(version1.strftime(STRING_FORMAT).gsub(/_/, "")) <= tz.parse(version2.strftime(STRING_FORMAT).gsub(/_/, ""))
|
24
24
|
end
|
25
25
|
end
|
@@ -65,8 +65,14 @@ module EasyML
|
|
65
65
|
|
66
66
|
EasyML::Deploy.transaction do
|
67
67
|
update(model_history_id: self.model_version.id, snapshot_id: self.model_version.snapshot_id, status: :success)
|
68
|
-
model.retraining_runs.where(status: :deployed).update_all(status: :success)
|
69
|
-
retraining_run.update(
|
68
|
+
model.retraining_runs.where(status: :deployed).update_all(status: :success, is_deploying: false)
|
69
|
+
retraining_run.update(
|
70
|
+
model_history_id: self.model_version.id,
|
71
|
+
snapshot_id: self.model_version.snapshot_id,
|
72
|
+
deploy_id: id,
|
73
|
+
status: :deployed,
|
74
|
+
is_deploying: false
|
75
|
+
)
|
70
76
|
end
|
71
77
|
|
72
78
|
model_version.tap do
|
data/app/models/easy_ml/model.rb
CHANGED
@@ -267,7 +267,7 @@ module EasyML
|
|
267
267
|
|
268
268
|
def formatted_version
|
269
269
|
return nil unless version
|
270
|
-
UTC.parse(version).in_time_zone(EasyML::Configuration.timezone).strftime("%B %-d, %Y at %-l:%M %p")
|
270
|
+
EasyML::Support::UTC.parse(version.gsub(/_/, "")).in_time_zone(EasyML::Configuration.timezone).strftime("%B %-d, %Y at %-l:%M %p")
|
271
271
|
end
|
272
272
|
|
273
273
|
def last_run_at
|
@@ -21,6 +21,16 @@ module EasyML
|
|
21
21
|
|
22
22
|
validates :storage, inclusion: { in: %w[file s3] }, if: -> { storage.present? }
|
23
23
|
|
24
|
+
after_initialize :set_defaults, if: -> { new_record? }
|
25
|
+
|
26
|
+
def set_defaults
|
27
|
+
self.s3_prefix ||= "easy_ml"
|
28
|
+
end
|
29
|
+
|
30
|
+
def s3_prefix
|
31
|
+
read_attribute(:s3_prefix) || "easy_ml"
|
32
|
+
end
|
33
|
+
|
24
34
|
TIMEZONES = [
|
25
35
|
{ value: "America/New_York", label: "Eastern Time" },
|
26
36
|
{ value: "America/Chicago", label: "Central Time" },
|
@@ -60,5 +60,17 @@ module EasyML
|
|
60
60
|
def db_settings
|
61
61
|
@db_settings ||= EasyML::Settings.first_or_create
|
62
62
|
end
|
63
|
+
|
64
|
+
def self.s3_path_for(type, name)
|
65
|
+
File.join(instance.s3_prefix, type.to_s, name.to_s)
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.model_s3_path(model_name)
|
69
|
+
s3_path_for("models", model_name.parameterize.gsub("-", "_"))
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.dataset_s3_path(relative_path)
|
73
|
+
s3_path_for("datasets", relative_path)
|
74
|
+
end
|
63
75
|
end
|
64
76
|
end
|
@@ -36,6 +36,19 @@ module EasyML
|
|
36
36
|
)
|
37
37
|
end
|
38
38
|
|
39
|
+
# Expose S3 information for testing and verification
|
40
|
+
def s3_prefix
|
41
|
+
EasyML::Configuration.dataset_s3_path(
|
42
|
+
File.join(feature_dir.split("datasets").last, "compacted")
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
def s3_key(filename = nil)
|
47
|
+
filename ||= File.basename(files.first) if files.any?
|
48
|
+
return nil unless filename
|
49
|
+
File.join(s3_prefix, filename)
|
50
|
+
end
|
51
|
+
|
39
52
|
private
|
40
53
|
|
41
54
|
def batch_size
|
@@ -49,9 +62,5 @@ module EasyML
|
|
49
62
|
feature&.name&.parameterize&.gsub("-", "_")
|
50
63
|
)
|
51
64
|
end
|
52
|
-
|
53
|
-
def s3_prefix
|
54
|
-
File.join("datasets", feature_dir.split("datasets").last)
|
55
|
-
end
|
56
65
|
end
|
57
66
|
end
|
data/lib/easy_ml/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_ml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.pre.
|
4
|
+
version: 0.2.0.pre.rc98
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Shollenberger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|