Module: Legion::Extensions::Coldstart::Runners::Coldstart
- Includes:
- Helpers::Lex
- Included in:
- Client
- Defined in:
- lib/legion/extensions/coldstart/runners/coldstart.rb
Instance Method Summary collapse
- #begin_imprint(force: false) ⇒ Object
- #coldstart_progress ⇒ Object
- #current_multiplier ⇒ Object
- #imprint_active? ⇒ Boolean
- #record_observation ⇒ Object
Instance Method Details
#begin_imprint(force: false) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/legion/extensions/coldstart/runners/coldstart.rb', line 11 def begin_imprint(force: false, **) bootstrap.load_firmware bootstrap.begin_imprint(force: force) mul = bootstrap.current_multiplier log.info "[coldstart] imprint begun: force=#{force} multiplier=#{mul}x" { started: true, imprint_active: bootstrap.imprint_active?, multiplier: mul, observation_count: bootstrap.observation_count, calibration_state: bootstrap.calibration_state } end |
#coldstart_progress ⇒ Object
37 38 39 40 41 |
# File 'lib/legion/extensions/coldstart/runners/coldstart.rb', line 37 def coldstart_progress(**) progress = bootstrap.progress log.debug "[coldstart] progress: #{progress.inspect}" progress end |
#current_multiplier ⇒ Object
49 50 51 52 53 54 |
# File 'lib/legion/extensions/coldstart/runners/coldstart.rb', line 49 def current_multiplier(**) multiplier = bootstrap.current_multiplier active = bootstrap.imprint_active? log.debug "[coldstart] multiplier=#{multiplier} imprint_active=#{active}" { multiplier: multiplier, imprint_active: active } end |
#imprint_active? ⇒ Boolean
43 44 45 46 47 |
# File 'lib/legion/extensions/coldstart/runners/coldstart.rb', line 43 def imprint_active?(**) active = bootstrap.imprint_active? log.debug "[coldstart] imprint_active?=#{active}" { active: active } end |
#record_observation ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/legion/extensions/coldstart/runners/coldstart.rb', line 25 def record_observation(**) bootstrap.record_observation log.debug "[coldstart] observation: count=#{bootstrap.observation_count} " \ "calibration=#{bootstrap.calibration_state} layer=#{bootstrap.current_layer}" { observation_count: bootstrap.observation_count, calibration_state: bootstrap.calibration_state, current_layer: bootstrap.current_layer, current_multiplier: bootstrap.current_multiplier } end |