class_docstr: Model specification given adjacency matrix and labeling.
class_docstr_tok: ["Model","specification","given","adjacency","matrix","and","labeling","."]
docstr: Computes the isomorphism-invariant graph hash of this spec.
  
  Args:
    canonical_ops: list of operations in the canonical ordering which they
      were assigned (i.e. the order provided in the config['available_ops']).
  
  Returns:
    MD5 hash of this spec which can be used to query the dataset.
docstr_tok: ["Computes","the","isomorphism-invariant","graph","hash","of","this","spec",".","Args",":","canonical_ops",":","list","of","operations","in","the","canonical","ordering","which","they","were","assigned","(","i.e",".","the","order","provided","in","the","config","[","'available_ops","'","]",")",".","Returns",":","MD5","hash","of","this","spec","which","can","be","used","to","query","the","dataset","."]
code: def hash_spec(self, canonical_ops):
      """Computes the isomorphism-invariant graph hash of this spec.
  
      Args:
        canonical_ops: list of operations in the canonical ordering which they
          were assigned (i.e. the order provided in the config['available_ops']).
  
      Returns:
        MD5 hash of this spec which can be used to query the dataset.
      """
      # Invert the operations back to integer label indices used in graph gen.
      labeling = (
          [-1]
          + [canonical_ops.index(op) for op in self.ops[1:-1]]
          + [-2]
      )
      return hash_module(self.matrix, labeling)
  
file_path: singa/examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/src/third_pkg/sp101_lib/model_spec.py
imports: import copy
  import hashlib
  import itertools
  import numpy
label_desc: Use image node_id 3 for calling the NASBench101ModelSpec obj's underlying member method code with example usage: obj.hash_spec(canonical_ops) and returns: hash_module