Unanswered
How Do I Get The Parsed Args Object Of A Task? I Ran A Task, Using The Argparser To Set Its Hyperparams. I Now Get The Task Using Task.Get_Task, And I Want To Instantiate An Args Namespace Which Has The Same Values As When The Task Ran The Parsing Code, A
This is what's working for me.for task in tasks: subprocess.run(['python', './test_task.py', '--task_id', task.id])
where in test_task.py I have the following:
` parser = ArgumentParser()
if Task.running_locally():
parser.add_argument('--task_id',type=str)
args=parser.parse_args()
task = Task.init(
continue_last_task=args.task_id
)
task.execute_remotely(queue_name='default') `and the rest is the inference code, which is only run on the remote, and includes populating the argparaser instance with the necessary arguments
175 Views
0
Answers
3 years ago
one year ago