File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -379,12 +379,16 @@ def _get_torchx_stdin_args(
379379 if not args .stdin :
380380 return None
381381 if self ._stdin_data_json is None :
382- self ._stdin_data_json = self .torchx_json_from_stdin ()
382+ self ._stdin_data_json = self .torchx_json_from_stdin (args )
383383 return self ._stdin_data_json
384384
385- def torchx_json_from_stdin (self ) -> Dict [str , Any ]:
385+ def torchx_json_from_stdin (
386+ self , args : Optional [argparse .Namespace ] = None
387+ ) -> Dict [str , Any ]:
386388 try :
387389 stdin_data_json = json .load (sys .stdin )
390+ if args and args .dryrun :
391+ stdin_data_json ["dryrun" ] = True
388392 if not isinstance (stdin_data_json , dict ):
389393 logger .error (
390394 "Invalid JSON input for `torchx run` command. Expected a dictionary."
@@ -413,6 +417,8 @@ def verify_no_extra_args(self, args: argparse.Namespace) -> None:
413417 continue
414418 if action .dest == "help" : # Skip help
415419 continue
420+ if action .dest == "dryrun" : # Skip dryrun
421+ continue
416422
417423 current_value = getattr (args , action .dest , None )
418424 default_value = action .default
You can’t perform that action at this time.
0 commit comments