Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for pyyaml 6.0 #435

Merged
merged 2 commits into from
Nov 4, 2021
Merged

Update for pyyaml 6.0 #435

merged 2 commits into from
Nov 4, 2021

Conversation

thesps
Copy link
Contributor

@thesps thesps commented Nov 3, 2021

From our setup.py we pick up the latest pyyaml with pip install hls4ml. Since pyyaml's 6.0 release a few weeks ago the Loader argument is required by yaml.load, causing a few issues in hls4ml. The pytests currently fail on master branch as a consequence.

This PR & #423 fix all the broken yaml.load occurrences in the code base.

@vloncar
Copy link
Contributor

vloncar commented Nov 3, 2021

For the sake of consistency of used library calls, you may want to change loading of yaml in the converter init

@thesps
Copy link
Contributor Author

thesps commented Nov 3, 2021

Done, but untested. Jenkins tests should probe that, but not pytests I think.

@vloncar
Copy link
Contributor

vloncar commented Nov 3, 2021

It will not break, safe_load is just a shortcut for that load(..., Loader=yaml.SafeLoader). According to the pyyaml code.

@vloncar vloncar merged commit c76c543 into master Nov 4, 2021
thesps added a commit that referenced this pull request Nov 5, 2021
* yaml.safe_load instead of yaml.load

* Use yaml.safe_load in converters __init__.py
thesps added a commit that referenced this pull request Nov 11, 2021
* yaml.safe_load instead of yaml.load

* Use yaml.safe_load in converters __init__.py
jmitrevs pushed a commit that referenced this pull request Dec 2, 2021
* fix batched multiple inputs

* Fixed 'qkeras_mnist_dense' example build problem #423

* Update for pyyaml 6.0 (#435)

* yaml.safe_load instead of yaml.load

* Use yaml.safe_load in converters __init__.py

* `axi_stream_driver` update (#420)

* Update `zcu102` and `pynq-z2` `axi-stream` driver

* Reshape fixes: don't repack stream for flatten; remove final reshape (#443)

* fix 2 reshape issues: don't reshape streams for flatten and remove final reshape

* Add a test for a model with Reshape as the final layer

* swap

* only remove for io_parallel; warn for both io_parallel and io_stream

Co-authored-by: Sioni Summers <[email protected]>

* Reorder loops in im2col_2d_cl given resource strategy issue. Reenable relevant test. Use 5000 MNIST samples rather than full dataset for faster testing

* Support applying Softmax over multidimensional tensors (#384)

* Support softmax over multidimensional tensors

* Style cleanup

* Added axis part in keras_to_hls.py

* Added some extensions to test_softmax.py but multidimensional softmax is still getting bad performances (i.e. below the one set in the assertion)

* Clean up the softmax test

* Make sure io_parallel softmax is not used on multi-dim input

Co-authored-by: nicologhielmetti <[email protected]>

* Disable some unsupported layers

* Set appropriate data type for quantized_relu activations

* Display unsigned types properly in profiling

* Add a QONNX test, update the image

* Don't convert Quant to BatchNorm. Convert weight-Quant to Constant, and activation-quant to Activation

Co-authored-by: Javier M. Duarte <[email protected]>
Co-authored-by: Thea Aarrestad <[email protected]>
Co-authored-by: David Siorpaes <[email protected]>
Co-authored-by: Nicolò Ghielmetti <[email protected]>
Co-authored-by: vloncar <[email protected]>
@jmduarte jmduarte deleted the for_pyyaml6.0 branch November 2, 2022 02:35
calad0i pushed a commit to calad0i/hls4ml that referenced this pull request Jul 1, 2023
* yaml.safe_load instead of yaml.load

* Use yaml.safe_load in converters __init__.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants