Sha256: f544062c980d72d31c6f921003229577f50eeb9359ab61509f99a28782e8092d
Contents?: true
Size: 585 Bytes
Versions: 40
Compression:
Stored size: 585 Bytes
Contents
module EasyML class ComputeFeatureJob < BatchJob @queue = :easy_ml def self.perform(batch_id, options = {}) options.symbolize_keys! feature_id = options.dig(:feature_id) feature = EasyML::Feature.find(feature_id) feature.fit_batch(options) end def self.after_batch_hook(batch_id, *args) puts "After batch!" feature_ids = fetch_batch_arguments(batch_id).flatten.map(&:symbolize_keys).pluck(:feature_id).uniq dataset = EasyML::Feature.find_by(id: feature_ids.first).dataset dataset.after_fit_features end end end
Version data entries
40 entries across 40 versions & 1 rubygems