def _validate_concurrency()

in project/nanoeval/nanoeval/eval.py [0:0]


    def _validate_concurrency(self) -> None:
        if self.concurrency is not None and self.concurrency <= 0:
            if self.concurrency == 0 and os.environ.get("NANOEVAL_ALLOW_ZERO_CONCURRENCY"):
                pass
            else:
                raise ValueError(
                    "concurrency must be > 0 or None unless NANOEVAL_ALLOW_ZERO_CONCURRENCY is set."
                )