MCPcopy Create free account
hub / github.com/ContextualAI/HALOs / close

Method close

train/utils.py:64–67  ·  view source on GitHub ↗

Close the JSON array and the file.

(self)

Source from the content-addressed store, hash-verified

62 self.file.flush()
63
64 def close(self):
65 """Close the JSON array and the file."""
66 self.file.write('\n]')
67 self.file.flush()
68
69
70def get_base_model_state_dict_from_peft(peft_state_dict, lora_alpha, lora_r):

Callers 4

mainFunction · 0.95
mainFunction · 0.95
process_samples_with_apiFunction · 0.80
_precompute_log_probsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected