How to use the batchflow.base.Baseset.get_default_iter_params function in batchflow

To help you get started, we’ve selected a few batchflow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github analysiscenter / batchflow / batchflow / pipeline.py View on Github external
self._clear_queue(self._prefetch_queue)
            self._clear_queue(self._batch_queue)
            self._clear_queue(self._prefetch_count)

            self._stop_executor(self._executor)
            self._stop_executor(self._service_executor)

            self._executor = None
            self._service_executor = None
            self._prefetch_count = None
            self._prefetch_queue = None
            self._batch_queue = None
            self._rest_batch = None
            self._batch_generator = None
            self._iter_params = Baseset.get_default_iter_params()

        if 'vars' in what or 'variables' in what:
            self._init_all_variables()

        if 'models' in what:
            self.models.reset()
github analysiscenter / batchflow / batchflow / pipeline.py View on Github external
self._clear_queue(self._prefetch_queue)
            self._clear_queue(self._batch_queue)
            self._clear_queue(self._prefetch_count)

            self._stop_executor(self._executor)
            self._stop_executor(self._service_executor)

            self._executor = None
            self._service_executor = None
            self._prefetch_count = None
            self._prefetch_queue = None
            self._batch_queue = None
            self._rest_batch = None
            self._batch_generator = None
            self._iter_params = Baseset.get_default_iter_params()

        if 'vars' in what or 'variables' in what:
            self._init_all_variables()

        if 'models' in what:
            self.models.reset()
github analysiscenter / batchflow / batchflow / pipeline.py View on Github external
::

            for batch in pipeline.gen_batch(C('batch_size'), shuffle=True, n_epochs=2, drop_last=True):
                # do whatever you want
        """
        if len(args) == 0 and len(kwargs) == 0:
            if self._lazy_run is None:
                raise RuntimeError("gen_batch without arguments requires a lazy run at the end of the pipeline")
            args, kwargs = self._lazy_run

        self._dataset = self._eval_expr(self.dataset)
        args_value = self._eval_expr(args)
        kwargs_value = self._eval_expr(kwargs)
        self.reset(reset)
        self._iter_params = iter_params or self._iter_params or Baseset.get_default_iter_params()
        self._debug = debug

        return self._gen_batch(*args_value, iter_params=self._iter_params, **kwargs_value)
github analysiscenter / batchflow / batchflow / pipeline.py View on Github external
::

            for batch in pipeline.gen_batch(C('batch_size'), shuffle=True, n_epochs=2, drop_last=True):
                # do whatever you want
        """
        if len(args) == 0 and len(kwargs) == 0:
            if self._lazy_run is None:
                raise RuntimeError("gen_batch without arguments requires a lazy run at the end of the pipeline")
            args, kwargs = self._lazy_run

        self.evaluated_dataset = None
        self.evaluated_dataset = self._eval_expr(self._dataset or self.dataset)
        args_value = self._eval_expr(args)
        kwargs_value = self._eval_expr(kwargs)
        self.reset(reset)
        self._iter_params = iter_params or self._iter_params or Baseset.get_default_iter_params()

        return self._gen_batch(*args_value, iter_params=self._iter_params, **kwargs_value)