docstr: Convert to json, properties or yaml
  
  :param input_file: input file, if not specified stdin
  :param output_file: output file, if not specified stdout
  :param output_format: json, properties or yaml
  :return: json, properties or yaml string representation
docstr_tok: ["Convert","to","json",",","properties","or","yaml",":","param","input_file",":","input","file",",","if","not","specified","stdin",":","param","output_file",":","output","file",",","if","not","specified","stdout",":","param","output_format",":","json",",","properties","or","yaml",":","return",":","json",",","properties","or","yaml","string","representation"]
code: def convert_from_file(
      cls,
      input_file=None,
      output_file=None,
      output_format="json",
      indent=2,
      compact=False,
  ):
      """Convert to json, properties or yaml
  
      :param input_file: input file, if not specified stdin
      :param output_file: output file, if not specified stdout
      :param output_format: json, properties or yaml
      :return: json, properties or yaml string representation
      """
  
      if input_file is None:
          content = sys.stdin.read()
          config = ConfigFactory.parse_string(content)
      else:
          config = ConfigFactory.parse_file(input_file)
  
      res = cls.convert(config, output_format, indent, compact)
      if output_file is None:
          print(res)
      else:
          with open(output_file, "w") as fd:
              fd.write(res)
  
file_path: clearml/clearml/utilities/pyhocon/converter.py
imports: import json
  import re
  import sys
  from .None import ConfigFactory
  from .config_tree import ConfigQuotedString
  from .config_tree import ConfigSubstitution
  from .config_tree import ConfigTree
  from .config_tree import ConfigValues
  from .config_tree import NoneValue
label_desc: Use image node_id 7 for calling the HOCONConverter obj's underlying member method code with example usage: obj.convert_from_file(cls, input_file, output_file, output_format, indent, compact) without return types