parameters: (archive_path: str)
docstring: Update the --module_file flag with the new location of the compiled.vmfb
docstring_summary: Update the --module_file flag with the new location of the compiled.vmfb
docstring_tokens: Update the -- module_file flag with the new location of the compiled . vmfb
function: def update_path(archive_path: str):
    """Update the --module_file flag with the new location of the compiled.vmfb"""
    backend_path = archive_path.split('traces')[0]  # 'ModuleName/backend_name'.
    compiled_path = os.path.join(FLAGS.artifacts_dir, backend_path,
                                 'compiled.vmfb')
    flagfile_path = os.path.join(FLAGS.artifacts_dir, archive_path)
    for line in fileinput.input(files=[flagfile_path], inplace=True):
      if line.strip().startswith('--module_file'):
        print(f'--module_file={compiled_path}\n', end='')
      else:
        print(line, end='')
function_tokens: def update_path ( archive_path : str ) : backend_path = archive_path . split ( 'traces' ) [ 0 ] # 'ModuleName/backend_name'. compiled_path = os . path . join ( FLAGS . artifacts_dir , backend_path , 'compiled.vmfb' ) flagfile_path = os . path . join ( FLAGS . artifacts_dir , archive_path ) for line in fileinput . input ( files = [ flagfile_path ] , inplace = True ) : if line . strip ( ) . startswith ( '--module_file' ) : print ( f'--module_file={compiled_path}\n' , end = '' ) else : print ( line , end = '' )