From c630f86f598cbb7482dfe4eb3177dbc3d7929e97 Mon Sep 17 00:00:00 2001 From: Cody Wild Date: Thu, 22 Aug 2019 12:15:29 -0700 Subject: [PATCH] add built in command line option for Run ID --- sacred/commandline_options.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sacred/commandline_options.py b/sacred/commandline_options.py index 303426d5..a980b54a 100644 --- a/sacred/commandline_options.py +++ b/sacred/commandline_options.py @@ -291,3 +291,13 @@ class CaptureOption(CommandLineOption): @classmethod def apply(cls, args, run): run.capture_mode = args + + +class RunIdOption(CommandLineOption): + """Set the _id used by this run's observers""" + arg = 'RUN_ID' + arg_description = "id used by this run's observers" + + @classmethod + def apply(cls, args, run): + run._id = args