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

Version Path
easy_ml-0.2.0.pre.rc40 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc39 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc38 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc37 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc36 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc35 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc34 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc33 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc32 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc31 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc30 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc29 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc28 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc27 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc26 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc25 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc24 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc23 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc22 app/jobs/easy_ml/compute_feature_job.rb
easy_ml-0.2.0.pre.rc21 app/jobs/easy_ml/compute_feature_job.rb