easy_ml 0.2.0.pre.rc21 → 0.2.0.pre.rc23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/easy_ml/application_controller.rb +2 -1
- data/app/controllers/easy_ml/datasources_controller.rb +5 -2
- data/app/models/easy_ml/dataset.rb +13 -3
- data/app/models/easy_ml/datasource.rb +6 -3
- data/app/models/easy_ml/model.rb +12 -2
- 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: 685c66332f22f73eae21f3a3f7b41e4b20bbf80a62d399c3e48bfbd3308b2eba
|
4
|
+
data.tar.gz: f3c41802ceb906d5f050097c72608aea21d1c6a8cc37a501ba3fdafb00be9dae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f69d5c2e1dfcfa7f3ffebe7587122107905f3f14dcf78abb1f2ed751c08064c83cf53bf04f11abe4de41d724f1746ec0912051b7c31eb232a1b976f4d5051ce
|
7
|
+
data.tar.gz: 97ea5c0b4e6fe51843953bbcc56fef71f4ee436db8bad7c340158109193cb212f9a4689008dc195f626f1fa1047d2f3b29a24c3513be2af7ae17ab0b2222b777
|
@@ -44,7 +44,8 @@ module EasyML
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def easy_ml_root
|
47
|
-
Rails.application.routes.routes.find { |r| r.app.app == EasyML::Engine }&.path&.spec&.to_s
|
47
|
+
path = Rails.application.routes.routes.find { |r| r.app.app == EasyML::Engine }&.path&.spec&.to_s
|
48
|
+
URI.join("#{request.scheme}://#{request.host_with_port}", path).to_s
|
48
49
|
end
|
49
50
|
|
50
51
|
inertia_share do
|
@@ -69,12 +69,15 @@ module EasyML
|
|
69
69
|
datasource = Datasource.find(params[:id])
|
70
70
|
datasource.update(is_syncing: true)
|
71
71
|
|
72
|
+
Rails.logger.info("X-Forwarded-Host: #{request.headers["X-Forwarded-Host"]}")
|
73
|
+
Rails.logger.info("X-Forwarded-Port: #{request.headers["X-Forwarded-Port"]}")
|
74
|
+
|
72
75
|
# Start sync in background to avoid blocking
|
73
76
|
datasource.refresh_async
|
74
77
|
|
75
|
-
redirect_to easy_ml_datasources_path
|
78
|
+
redirect_to easy_ml_datasources_path, notice: "Datasource is syncing..."
|
76
79
|
rescue ActiveRecord::RecordNotFound
|
77
|
-
redirect_to easy_ml_datasources_path
|
80
|
+
redirect_to easy_ml_datasources_path, error: "Datasource not found..."
|
78
81
|
end
|
79
82
|
|
80
83
|
private
|
@@ -93,12 +93,22 @@ module EasyML
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def set_root_dir
|
96
|
-
|
96
|
+
bump_version
|
97
|
+
write_attribute(:root_dir, default_root_dir)
|
98
|
+
end
|
99
|
+
|
100
|
+
def default_root_dir
|
101
|
+
File.join("datasets", underscored_name, version).to_s
|
97
102
|
end
|
98
103
|
|
99
104
|
def root_dir
|
100
|
-
|
101
|
-
|
105
|
+
persisted = read_attribute(:root_dir)
|
106
|
+
|
107
|
+
if persisted.present? && !persisted.blank?
|
108
|
+
EasyML::Engine.root_dir.join(persisted).to_s
|
109
|
+
else
|
110
|
+
default_root_dir
|
111
|
+
end
|
102
112
|
end
|
103
113
|
|
104
114
|
def destructively_cleanup!
|
@@ -89,9 +89,12 @@ module EasyML
|
|
89
89
|
|
90
90
|
def root_dir
|
91
91
|
persisted = read_attribute(:root_dir)
|
92
|
-
return persisted if persisted.present? && !persisted.to_s.blank?
|
93
92
|
|
94
|
-
|
93
|
+
if persisted.present? && !persisted.blank?
|
94
|
+
EasyML::Engine.root_dir.join(persisted).to_s
|
95
|
+
else
|
96
|
+
default_root_dir
|
97
|
+
end
|
95
98
|
end
|
96
99
|
|
97
100
|
def refresh_async
|
@@ -156,7 +159,7 @@ module EasyML
|
|
156
159
|
|
157
160
|
def default_root_dir
|
158
161
|
folder = name.gsub(/\s{2,}/, " ").split(" ").join("_").downcase
|
159
|
-
|
162
|
+
File.join("datasources", folder)
|
160
163
|
end
|
161
164
|
|
162
165
|
def set_root_dir
|
data/app/models/easy_ml/model.rb
CHANGED
@@ -484,11 +484,21 @@ module EasyML
|
|
484
484
|
end
|
485
485
|
|
486
486
|
def set_root_dir
|
487
|
-
write_attribute(:root_dir,
|
487
|
+
write_attribute(:root_dir, default_root_dir)
|
488
488
|
end
|
489
489
|
|
490
490
|
def root_dir
|
491
|
-
|
491
|
+
persisted = read_attribute(:root_dir)
|
492
|
+
|
493
|
+
if persisted.present? && !persisted.blank?
|
494
|
+
EasyML::Engine.root_dir.join(persisted).to_s
|
495
|
+
else
|
496
|
+
default_root_dir
|
497
|
+
end
|
498
|
+
end
|
499
|
+
|
500
|
+
def default_root_dir
|
501
|
+
File.join("models", underscored_name).to_s
|
492
502
|
end
|
493
503
|
|
494
504
|
def load_model(force: false)
|
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.rc23
|
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-01-
|
11
|
+
date: 2025-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|