Class: Wandb::Run

Inherits:
Object
  • Object
show all
Defined in:
lib/wandb.rb

Overview

Run class

Instance Method Summary collapse

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

#configObject



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

#finishObject



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

#nameObject



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_idObject



97
98
99
# File 'lib/wandb.rb', line 97

def run_id
  @run.run_id
end

#urlObject

Add this new method



131
132
133
# File 'lib/wandb.rb', line 131

def url
  @run.get_url
end