From 511b6bd6c0c537a1159acb8636775bddd2ce1c19 Mon Sep 17 00:00:00 2001 From: Umut Date: Mon, 20 Dec 2021 13:26:59 +0300 Subject: [PATCH] fix(scripts): reset continue state after each code block to avoid combining everything into a single code block --- docs/user/howto/use_quantization.md | 1 + script/make_utils/test_md_python_code.py | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/user/howto/use_quantization.md b/docs/user/howto/use_quantization.md index 9566f1d38..bffa90822 100644 --- a/docs/user/howto/use_quantization.md +++ b/docs/user/howto/use_quantization.md @@ -80,6 +80,7 @@ The `NumpyModule` allows us to runs inference as for a `nn.Module`. Here, the pr We can then quantize the numpy module with `PostTrainingAffineQuantization` as follows: + ```python from concrete.quantization import PostTrainingAffineQuantization numpy_input = numpy.random.uniform(-1, 1, size=(10,14)) # some input with 14 features to calibrate the quantization diff --git a/script/make_utils/test_md_python_code.py b/script/make_utils/test_md_python_code.py index 71660cc2e..3ba7a9177 100644 --- a/script/make_utils/test_md_python_code.py +++ b/script/make_utils/test_md_python_code.py @@ -70,6 +70,7 @@ def get_code_blocks_for_file(md_file: Path) -> Dict[int, List[str]]: "closed (missing ``` ?)" ) current_python_code.append(line) + python_block_continues = False else: match = re.match(DIRECTIVE_COMMENT_PATTERN, line) if match is not None: