easy_ml 0.2.0.pre.rc55 → 0.2.0.pre.rc56

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: 53b0666a5ba25b758573564fb916da9ec5b968223e0b8164e394c6b2d176668a
4
- data.tar.gz: 5180eb72880c443fd5405bba8127ab2ba9c891f51c7a7063f47862a48d10ca12
3
+ metadata.gz: a2eb7d933162cc05c64a1ea7c21c65f9c80283a1ae45f37226282c503607008f
4
+ data.tar.gz: e25a1b7b1970753ae6f65917943607102ad52ef9f90831de0660563441448975
5
5
  SHA512:
6
- metadata.gz: 912c3eba2b15b1d463eb53a2e7cd689fec14c45cd58fb232a5f31114ea35f883004616977598d85b8b2e22bbd0ac19dc4e5f294878cc544007eaed1ffd61bd0d
7
- data.tar.gz: b4b89abaf966fc0dc8f99e58feb80503175a97c8006ccd9d0bd17319ebdf1b1d1c615c762f159a7ea2b167abd9f0351e0cf2e4e3a7bc34694067f011a03aae0d
6
+ metadata.gz: 6fc39e6b2838ab6242df1848411450764b0434b63bb7e4f1cb60151850e794f1d0a71a956b70b7ca78e159003efc6947d7dbaad9010c7c6899a1baeb8c7570b2
7
+ data.tar.gz: f50ceecc6935fea0c1f82e5b76beaef2e6ee329087d0f7b7739d4a88b4738d9ed37d13acd47bf12d118092c0b66774772dab9a30f60e12c3854360329caacfa9
@@ -91,7 +91,7 @@ export function ScheduleModal({ isOpen, onClose, onSave, initialData, metrics, t
91
91
  day_of_month: initialData.retraining_job?.at?.day_of_month ?? 1
92
92
  },
93
93
  metric: initialData.retraining_job?.metric || (metrics[initialData.task]?.[0]?.value ?? ''),
94
- threshold: initialData.retraining_job?.threshold || (initialData.task === 'classification' ? 0.85 : 0.1),
94
+ threshold: initialData.retraining_job?.threshold ?? (initialData.task === 'classification' ? 0.85 : 0.1),
95
95
  tuner_config: initialData.retraining_job?.tuner_config ? {
96
96
  n_trials: initialData.retraining_job.tuner_config.n_trials || 10,
97
97
  config: {
@@ -60,7 +60,10 @@ export const SearchableSelect = forwardRef<HTMLButtonElement, SearchableSelectPr
60
60
  }
61
61
  }, [isOpen]);
62
62
 
63
- const handleOptionClick = (optionValue: Option['value']) => {
63
+ const handleOptionClick = (optionValue: Option['value'], e: React.MouseEvent) => {
64
+ debugger;
65
+ e.preventDefault();
66
+ e.stopPropagation();
64
67
  onChange(optionValue);
65
68
  setIsOpen(false);
66
69
  setSearchQuery('');
@@ -86,7 +89,7 @@ export const SearchableSelect = forwardRef<HTMLButtonElement, SearchableSelectPr
86
89
  placeholder="Search..."
87
90
  value={searchQuery}
88
91
  onChange={(e) => setSearchQuery(e.target.value)}
89
- onClick={(e) => e.stopPropagation()}
92
+ onMouseDown={(e) => e.stopPropagation()}
90
93
  />
91
94
  </div>
92
95
  </div>
@@ -105,11 +108,7 @@ export const SearchableSelect = forwardRef<HTMLButtonElement, SearchableSelectPr
105
108
  className={`w-full text-left px-4 py-2 hover:bg-gray-100 ${
106
109
  option.value === value ? 'bg-blue-50' : ''
107
110
  }`}
108
- onMouseDown={(e) => {
109
- e.preventDefault();
110
- e.stopPropagation();
111
- handleOptionClick(option.value);
112
- }}
111
+ onMouseDown={(e) => handleOptionClick(option.value, e)}
113
112
  >
114
113
  <div className="flex items-center justify-between">
115
114
  <span className="block font-medium">
@@ -140,7 +139,6 @@ export const SearchableSelect = forwardRef<HTMLButtonElement, SearchableSelectPr
140
139
  type="button"
141
140
  onMouseDown={(e) => {
142
141
  e.preventDefault();
143
- e.stopPropagation();
144
142
  setIsOpen(!isOpen);
145
143
  }}
146
144
  className="w-full bg-white relative border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"
@@ -3,6 +3,8 @@ module EasyML
3
3
  def perform(id)
4
4
  begin
5
5
  dataset = EasyML::Dataset.find(id)
6
+ return if dataset.workflow_status == :analyzing
7
+
6
8
  puts "Refreshing dataset #{dataset.name}"
7
9
  puts "Needs refresh? #{dataset.needs_refresh?}"
8
10
  unless dataset.needs_refresh?
@@ -12,6 +14,7 @@ module EasyML
12
14
  create_event(dataset, "started")
13
15
 
14
16
  puts "Prepare! #{dataset.name}"
17
+ dataset.unlock!
15
18
  dataset.prepare
16
19
  if dataset.features.needs_fit.any?
17
20
  dataset.fit_features(async: true)
@@ -1,14 +1,18 @@
1
1
  module EasyML
2
2
  module ColumnList
3
- def sync
3
+ def sync(only_new: false)
4
4
  return unless dataset.schema.present?
5
5
 
6
6
  EasyML::Column.transaction do
7
7
  col_names = syncable
8
8
  existing_columns = where(name: col_names)
9
9
  import_new(col_names, existing_columns)
10
- update_existing(existing_columns)
11
- delete_missing(existing_columns)
10
+
11
+ if !only_new
12
+ update_existing(existing_columns)
13
+ delete_missing(existing_columns)
14
+ end
15
+
12
16
  if existing_columns.none? # Totally new dataset
13
17
  dataset.after_create_columns
14
18
  end
@@ -175,7 +175,6 @@ module EasyML
175
175
 
176
176
  def actually_refresh
177
177
  refreshing do
178
- split_data
179
178
  process_data
180
179
  fully_reload
181
180
  learn
@@ -273,10 +272,10 @@ module EasyML
273
272
  raw.split_at.present? && raw.split_at < datasource.last_updated_at
274
273
  end
275
274
 
276
- def learn
275
+ def learn(only_new: false)
277
276
  learn_schema
278
277
  learn_statistics
279
- columns.sync
278
+ columns.sync(only_new: only_new)
280
279
  end
281
280
 
282
281
  def refreshing
@@ -399,7 +398,7 @@ module EasyML
399
398
 
400
399
  # Learn will update columns, so if any features have been added
401
400
  # since the last time columns were learned, we should re-learn the schema
402
- learn if idx == 0 && needs_learn?(df)
401
+ learn(only_new: true) if idx == 1 && needs_learn?(df)
403
402
  df = apply_column_mask(df, inference: inference) unless all_columns
404
403
  raise_on_nulls(df) if inference
405
404
  df, = processed.split_features_targets(df, true, target) if split_ys
@@ -56,14 +56,16 @@ module EasyML
56
56
  create_event(model, "failed", error)
57
57
  end
58
58
 
59
+ def self.easy_ml_context(stacktrace)
60
+ stacktrace.select { |loc| loc.match?(/easy_ml/) }
61
+ end
62
+
59
63
  def self.format_stacktrace(error)
60
64
  return nil if error.nil?
61
65
 
62
66
  topline = error.inspect
63
67
 
64
- stacktrace = error.backtrace.select do |loc|
65
- loc.match?(/easy_ml/)
66
- end
68
+ stacktrace = easy_ml_context(error.backtrace)
67
69
 
68
70
  %(#{topline}
69
71
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EasyML
4
- VERSION = "0.2.0-rc55"
4
+ VERSION = "0.2.0-rc56"
5
5
 
6
6
  module Version
7
7
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "entrypoints/Application.tsx": {
3
- "file": "assets/entrypoints/Application.tsx-Dr3jVR78.js",
3
+ "file": "assets/entrypoints/Application.tsx-DTZ2348z.js",
4
4
  "name": "entrypoints/Application.tsx",
5
5
  "src": "entrypoints/Application.tsx",
6
6
  "isEntry": true,