scenic icon indicating copy to clipboard operation
scenic copied to clipboard

Running scenic models without downloading datasets

Open briancheung opened this issue 3 years ago • 1 comments

Is there a way to avoid the train_utils.get_dataset() call for running these models if I'm only interested in inference of trained models?

The problem I'm having is that the things that derive from class BaseModel (https://github.com/google-research/scenic/blob/31bbf1a79b1b984a0b4febe6ca1475577fb6121f/scenic/model_lib/base_models/base_model.py#L33) require a dataset_meta_data: Dict[str, Any], which requires an instance created by train_utils.get_dataset().

  def __init__(
      self,
      config: Optional[ml_collections.ConfigDict],
      dataset_meta_data: Dict[str, Any],
  ) -> None:
    if config is None:
      logging.warning('You are creating the model with default config.')
      config = self.default_flax_model_config()
    self.config = config
    self.dataset_meta_data = dataset_meta_data
    self.flax_model = self.build_flax_model()

briancheung avatar Aug 20 '22 18:08 briancheung

+1.

eringrant avatar Aug 24 '22 03:08 eringrant