fix(scripts): reset continue state after each code block to avoid combining everything into a single code block

This commit is contained in:
Umut
2021-12-20 13:26:59 +03:00
parent 532dca78cb
commit 511b6bd6c0
2 changed files with 2 additions and 0 deletions

View File

@@ -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-test:cont-->
```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

View File

@@ -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: