maxtext.experimental.agent.ckpt_conversion_agent.utils.utils module

maxtext.experimental.agent.ckpt_conversion_agent.utils.utils module#

Utility functions for the utility module

maxtext.experimental.agent.ckpt_conversion_agent.utils.utils.load_prompt_template(filepath)[source]#

Loads a prompt template from a file.

Parameters:

filepath (str)

Return type:

str

maxtext.experimental.agent.ckpt_conversion_agent.utils.utils.load_text_file(file_path)[source]#

Loads a text file.

maxtext.experimental.agent.ckpt_conversion_agent.utils.utils.load_json(file_path)[source]#

Loads a JSON file.

maxtext.experimental.agent.ckpt_conversion_agent.utils.utils.assemble_script(target_model, param_mapping_code, hook_fn_code, shape_mapping_code)[source]#

Assembles the final Python script from generated parts.