Skip to content

Update for pyyaml 6.0 #435

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

Merged
merged 2 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hls4ml/converters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def construct_keras_model(loader, node):

print('Loading configuration from', config_file)
with open(config_file, 'r') as file:
parsed_config = yaml.load(file, Loader=yaml.SafeLoader)
parsed_config = yaml.safe_load(file)
return parsed_config

def convert_from_config(config):
Expand Down
2 changes: 1 addition & 1 deletion test/pytest/test_cnn_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def mnist_model():
def hls_model(settings):
io_type = settings[0]
strategy = settings[1]
config = yaml.load(open('../../example-models/config-files/qkeras_mnist_cnn_config.yml').read())
config = yaml.safe_load(open('../../example-models/config-files/qkeras_mnist_cnn_config.yml').read())
config['KerasJson'] = '../../example-models/keras/qkeras_mnist_cnn.json'
config['KerasH5'] = '../../example-models/keras/qkeras_mnist_cnn_weights.h5'
config['OutputDir'] = 'hls4mlprj_cnn_mnist_{}_{}'.format(io_type, strategy)
Expand Down