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

Logging bug in GUI in debug mode #190

Open
RalfG opened this issue Sep 18, 2024 · 0 comments
Open

Logging bug in GUI in debug mode #190

RalfG opened this issue Sep 18, 2024 · 0 comments
Assignees
Labels

Comments

@RalfG
Copy link
Member

RalfG commented Sep 18, 2024

In the GUI, in debug mode, keras tries to write its progress bar, but fails. In non-debug mode, this is not an issue, most likely due to the redirect to os.devnull. Perhaps in the GUI, we should always do this?

Stack trace:

'NoneType' object has no attribute 'write'
Traceback (most recent call last):
  File "ms2rescore\gui\function2ctk.py", line 301, in run
    self.fn(*self.fn_args, **self.fn_kwargs)
  File "ms2rescore\gui\app.py", line 809, in function
    rescore(configuration=config)
  File "ms2rescore\core.py", line 79, in rescore
    fgen.add_features(psm_list)
  File "ms2rescore\feature_generators\deeplc.py", line 155, in add_features
    self.deeplc_predictor.calibrate_preds(psm_list_calibration)
  File "deeplc\deeplc.py", line 1185, in calibrate_preds
    calibrate_output = self.calibrate_preds_func_pygam(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "deeplc\deeplc.py", line 819, in calibrate_preds_func_pygam
    predicted_tr = self.make_preds(psm_list, calibrate=False, mod_name=mod_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "deeplc\deeplc.py", line 741, in make_preds
    ret_preds = self.make_preds_core(
                ^^^^^^^^^^^^^^^^^^^^^
  File "deeplc\deeplc.py", line 612, in make_preds_core
    ret_preds = mod.predict(
                ^^^^^^^^^^^^
  File "keras\src\utils\traceback_utils.py", line 122, in error_handler
  File "keras\src\utils\traceback_utils.py", line 119, in error_handler
  File "keras\src\backend\tensorflow\trainer.py", line 514, in predict
  File "keras\src\callbacks\callback_list.py", line 126, in on_predict_batch_end
  File "keras\src\callbacks\progbar_logger.py", line 66, in on_predict_batch_end
  File "keras\src\callbacks\progbar_logger.py", line 95, in _update_progbar
  File "keras\src\utils\progbar.py", line 182, in update
  File "keras\src\utils\io_utils.py", line 98, in print_msg
AttributeError: 'NoneType' object has no attribute 'write'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants