BiomedSciAI / fuse-med-ml

A python framework accelerating ML based discovery in the medical field by encouraging code reuse. Batteries included :)
Apache License 2.0
134 stars 34 forks source link

Support a better string representation for `NDict` #328

Closed SagiPolaczek closed 1 year ago

SagiPolaczek commented 1 year ago

Now we can get the tree-like representation of the NDict also a string.

Useful for logging the cfg structure using logging package. For example:

@hydra.main(version_base="1.2")
def main(cfg: DictConfig) -> None:
    cfg = hydra.utils.instantiate(cfg)
    log = logging.getLogger("Fuse")
    log.info("\n"+NDict(cfg).get_tree(True))
SagiPolaczek commented 1 year ago

@CodiumAI-Agent

CodiumAI-Agent commented 1 year ago

PR Analysis

How to use

Tag me in a comment '@CodiumAI-Agent' to ask for a new review after you update the PR. You can also tag me and ask any question, for example '@CodiumAI-Agent is the PR ready for merge?'