class_docstr: Helper class to deduplicate samples.
  
  Different from the deduplication on the HPO side,
  this class simply checks if a sample has been tried before, and does nothing else.
class_docstr_tok: ["Helper","class","to","deduplicate","samples",".","Different","from","the","deduplication","on","the","HPO","side",",","this","class","simply","checks","if","a","sample","has","been","tried","before",",","and","does","nothing","else","."]
code: def __init__(self, raise_on_dup: bool = False):
      self._history = set()
      self._raise_on_dup = raise_on_dup
  
file_path: nni/nni/nas/strategy/utils.py
imports: from __future__ import annotations
  import logging
  from typing import Any, Type, TypeVar, Callable
  from nni.mutable import SampleValidationError
label_desc: Use image node_id 1 to create a new DeduplicationHelper object  with example: obj = DeduplicationHelper(raise_on_dup)