Class: LLMExperiment::Doctor
- Inherits:
-
Object
- Object
- LLMExperiment::Doctor
- Defined in:
- lib/llm_experiment/doctor.rb
Overview
Preflight. Every check returns what is wrong AND what to type next, because each one encodes a failure that used to cost an afternoon.
Defined Under Namespace
Classes: Check
Instance Method Summary collapse
- #checks(experiment = nil) ⇒ Object
-
#initialize(container: Container.new) ⇒ Doctor
constructor
A new instance of Doctor.
- #ok?(experiment = nil) ⇒ Boolean
Constructor Details
Instance Method Details
#checks(experiment = nil) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/llm_experiment/doctor.rb', line 13 def checks(experiment = nil) list = [cli_check] # Without the CLI nothing else is answerable. return list if list.first.status == :fail list += [system_check, builder_check, disk_check, auth_check] list += experiment_checks(experiment) if experiment list end |
#ok?(experiment = nil) ⇒ Boolean
23 24 25 |
# File 'lib/llm_experiment/doctor.rb', line 23 def ok?(experiment = nil) checks(experiment).none? { |c| c.status == :fail } end |