Conversation
Fixing access to non-existing private attribute '_metrics' occuring e.g. when running regression test #4: Traceback (most recent call last): File "/home/kane/intel/smlp/regr_smlp/code/../../src/run_smlp.py", line 18, in <module> main(sys.argv) File "/home/kane/intel/smlp/regr_smlp/code/../../src/run_smlp.py", line 15, in main smlpInst.smlp_flow() File "/home/kane/intel/smlp/src/smlp_py/smlp_flows.py", line 317, in smlp_flow model = self.modelInst.build_models(args.model, X, y, X_train, y_train, X_test, y_test, X_new, y_new, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kane/intel/smlp/src/smlp_py/smlp_models.py", line 472, in build_models model = self.model_train(feat_names_dict, resp_names, algo, X_train, X_test, y_train, y_test, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kane/intel/smlp/src/smlp_py/smlp_models.py", line 353, in model_train model = self._instKeras.keras_main(resp_names, keras_algo, X_train, X_test, y_train, y_test, hparams_dict, plots, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kane/intel/smlp/src/smlp_py/train_keras.py", line 924, in keras_main model = self._keras_train_multi_response(resp_names, algo, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kane/intel/smlp/src/smlp_py/train_keras.py", line 865, in _keras_train_multi_response history = self._nn_train(model, epochs, batch_size, weights_precision, self.model_checkpoint_pattern, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kane/intel/smlp/src/smlp_py/train_keras.py", line 475, in _nn_train self._log_model_summary(model, epochs, batch_size, sample_weights_dict, callbacks) File "/home/kane/intel/smlp/src/smlp_py/train_keras.py", line 380, in _log_model_summary compiled_metrics = model.compiled_metrics._metrics # Access the private _metrics attribute ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'DeprecatedCompiledMetric' object has no attribute '_metrics'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix access to non-existing private attribute
_metricsoccuring e.g. when running regression test no. 4:Also affects regression tests 13, 28, 149, 150, 151, 152, 154, 155, 156, 157, 158, 172, 173, 174, 175, 176, 177, 178, 179, 180.