orkgnlp.common.util.io

Includes Input/Output (I/O) functionalities like reading and writing from and into specific file formats.

Functions

load_torch_jit

Loads the scripted/traced torch model file (ScriptModule) of the given input_path.

load_transformers_pretrained

Loads a transformers model weights given of the given input_path to the given transformers_cls.

read_csv

Reads the csv file of the given input_path.

read_df_from_json

Reads the json file of the given input_path and converts it to pandas dataframe.

read_json

Reads the json file of the given input_path.

read_onnx

Reads the onnx file of the given input_path.

read_pickle

Reads the pickle file of the given input_path.