TensorRT OnnxParser.parse returns false

Here is my code:

TRT_LOGGER = trt.Logger(trt.Logger.VERBOSE)

def build_engine(model_path):
with trt.Builder(TRT_LOGGER) as builder, builder.create_network() as network,
trt.OnnxParser(network, TRT_LOGGER) as parser:
builder.max_workspace_size = 1<<30
builder.max_batch_size = 1

    with open(model_path, 'rb') as f:
        value = parser.parse(f.read())
        print("Parser: ", value)

The output is False for the same.
I am using an AlexNet converted to an ONNX model.
I am currently on TensorRT-7.0.0.11

Also, I would like some clarity on what the flags variable in Builder.create_network() does

Hi,

In TRT 7, ONNX parser supports full-dimensions mode only. Your network definition must be created with the explicitBatch flag set (when using ONNX parser).
https://docs.nvidia.com/deeplearning/sdk/tensorrt-archived/tensorrt-700/tensorrt-developer-guide/index.html#import_onnx_python

Please refer below link for more details regarding flags variable in Builder.create_netwrok():
https://docs.nvidia.com/deeplearning/sdk/tensorrt-archived/tensorrt-700/tensorrt-api/python_api/infer/Core/Builder.html#tensorrt.NetworkDefinitionCreationFlag

Thanks