Module: Torch::TorchRun
- Defined in:
- lib/torch/torchrun.rb
Defined Under Namespace
Classes: Error, Launcher, Parser
Constant Summary collapse
- SIGNALS =
%w[INT TERM QUIT].freeze
Class Method Summary collapse
Class Method Details
.start(argv, out: $stdout, err: $stderr) ⇒ Object
144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/torch/torchrun.rb', line 144 def start(argv, out: $stdout, err: $stderr) parser = Parser.new , script, script_args = parser.parse(argv) status = Launcher.new(, script, script_args, out: out, err: err).run exit(status) rescue OptionParser::ParseError => e err.puts(e.) err.puts(parser) exit(2) rescue Error => e err.puts("torchrun: #{e.}") exit(1) end |