class_docstr: An algorithm hyperparameter with optional validation.
  
  Implemented as a python descriptor object.
class_docstr_tok: ["An","algorithm","hyperparameter","with","optional","validation",".","Implemented","as","a","python","descriptor","object","."]
docstr: Return all non-None ``hyperparameter`` values on ``obj`` as a ``dict[str,str].``
  
  Args:
      obj:
docstr_tok: ["Return","all","non-None","``","hyperparameter","``","values","on","``","obj","``","as","a","``","dict","[","str",",","str","]",".","``","Args",":","obj",":"]
code: def serialize_all(obj):
      """Return all non-None ``hyperparameter`` values on ``obj`` as a ``dict[str,str].``
  
      Args:
          obj:
      """
      if "_hyperparameters" not in dir(obj):
          return {}
      hps = {}
      for k, v in obj._hyperparameters.items():
          if v is not None:
              if isinstance(v, list):
                  v = json.dumps(v)
              elif is_pipeline_variable(v):
                  v = v.to_string()
              else:
                  v = str(v)
              hps[k] = v
      return hps
  
file_path: sagemaker-python-sdk/src/sagemaker/amazon/hyperparameter.py
imports: from __future__ import absolute_import
  import json
  from sagemaker.workflow import is_pipeline_variable
label_desc: Use image node_id 6 for calling the Hyperparameter obj's underlying member method code with example usage: obj.serialize_all(obj) and returns: hps, dict