Class: Wandb::Run
- Inherits:
-
Object
- Object
- Wandb::Run
- Defined in:
- lib/wandb.rb
Overview
Run class
Instance Method Summary collapse
- #config ⇒ Object
- #config=(new_config) ⇒ Object
- #finish ⇒ Object
-
#initialize(run) ⇒ Run
constructor
A new instance of Run.
- #log(metrics = {}) ⇒ Object
- #log_artifact(artifact) ⇒ Object
- #name ⇒ Object
- #name=(new_name) ⇒ Object
- #run_id ⇒ Object
-
#url ⇒ Object
Add this new method.
Constructor Details
#initialize(run) ⇒ Run
Returns a new instance of Run.
93 94 95 |
# File 'lib/wandb.rb', line 93 def initialize(run) @run = run end |
Instance Method Details
#config ⇒ Object
118 119 120 |
# File 'lib/wandb.rb', line 118 def config @run.config end |
#config=(new_config) ⇒ Object
122 123 124 |
# File 'lib/wandb.rb', line 122 def config=(new_config) @run.config.update(PyCall::Dict.new(new_config)) end |
#finish ⇒ Object
106 107 108 |
# File 'lib/wandb.rb', line 106 def finish @run.finish end |
#log(metrics = {}) ⇒ Object
101 102 103 104 |
# File 'lib/wandb.rb', line 101 def log(metrics = {}) metrics.symbolize_keys! @run.log(metrics, {}) end |
#log_artifact(artifact) ⇒ Object
126 127 128 |
# File 'lib/wandb.rb', line 126 def log_artifact(artifact) @run.log_artifact(artifact.__pyptr__) end |
#name ⇒ Object
110 111 112 |
# File 'lib/wandb.rb', line 110 def name @run.name end |
#name=(new_name) ⇒ Object
114 115 116 |
# File 'lib/wandb.rb', line 114 def name=(new_name) @run.name = new_name end |
#run_id ⇒ Object
97 98 99 |
# File 'lib/wandb.rb', line 97 def run_id @run.run_id end |
#url ⇒ Object
Add this new method
131 132 133 |
# File 'lib/wandb.rb', line 131 def url @run.get_url end |