MCPcopy
hub / github.com/MaartenGr/BERTopic / load_cfg_from_json

Function load_cfg_from_json

bertopic/_save_utils.py:453–457  ·  view source on GitHub ↗

Load configuration from json.

(json_file: Union[str, os.PathLike])

Source from the content-addressed store, hash-verified

451
452
453def load_cfg_from_json(json_file: Union[str, os.PathLike]):
454 """Load configuration from json."""
455 with open(json_file, "r", encoding="utf-8") as reader:
456 text = reader.read()
457 return json.loads(text)
458
459
460class NumpyEncoder(json.JSONEncoder):

Callers 2

load_local_filesFunction · 0.85
load_files_from_hfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected