How to use the plonk._logging.logger function in plonk

To help you get started, we’ve selected a few plonk 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 dmentipl / plonk / plonk / snap / snap.py View on Github external
def extra_quantities(self):
        """Make extra quantities available."""
        if self._extra_quantities:
            logger.info('Extra quantities already available')
        logger.debug(f'Loading extra quantities: {self.file_path.name}')
        extra_quantities(snap=self)
        self._extra_quantities = True
        return self
github dmentipl / plonk / plonk / utils / sph.py View on Github external
else:
                n_chunks = 1
                array_chunks = [type_indices]

            if verbose and n_chunks > 1:
                logger.info(f'Number of chunks: {n_chunks}', flush=True)
                logger.info(f'Chunk size: {chunk_size}', flush=True)

            for idx, indices in enumerate(array_chunks):
                if verbose:
                    if n_chunks > 1:
                        logger.info(
                            f'Finding neighbours for chunk: {idx}...', flush=True
                        )
                    else:
                        logger.info(f'Finding neighbours...', flush=True)
                _neighbours = snap.get_many_neighbours(indices)
                neighbours = List()
                for neigh in _neighbours:
                    neighbours.append(np.array(neigh))

                if verbose:
                    if n_chunks > 1:
                        logger.info(
                            f'Summing over neighbours for chunk: {idx}...', flush=True
                        )
                    else:
                        logger.info(f'Summing over neighbours...', flush=True)

                result[indices] = compute_function(
                    indices=indices,
                    neighbours=neighbours,