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

HelixerModel.py not behaving as Helixer.py, quickly dying after being run #155

Closed
MatteoSchiavinato opened this issue Nov 13, 2024 · 4 comments

Comments

@MatteoSchiavinato
Copy link

MatteoSchiavinato commented Nov 13, 2024

Describe the bug
The HelixerModel.py script, suggested in the 3-step advanced usage of the tool, dies shortly after being run. It does not print an error, but rather a warning related to TensorFlow which does not seem like something that would affect the run.

It just dies silently, even using --debug -v.

To Reproduce
This is the command I ran:

    python3 /opt/Helixer/helixer/prediction/HelixerModel.py \
    --load-model-path ${helixer_model} \
    --save-model-path ${alias}_bestmodel.h5 \
    --test-data ${alias}.h5 \
    --overlap \
    --val-test-batch-size 32 \
    -v \
    --compression lzf \
    --cpus 50 \
    --workers 4 \
    --prediction-output-path predictions_h5

I have run it on a machine without GPU, as for Helixer.py, this would mean it would only use the CPUs available.

Error

/usr/lib/python3.10/tensorflow_addons/utils/tfa_eol_msg.py:23: UserWarning: 

TensorFlow Addons (TFA) has ended development and introduction of new features.
TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024.
Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP). 

For more information see: https://github.com/tensorflow/addons/issues/2807 

  warnings.warn(

Expected behavior
I would expect it to do one of the two:

  • use only available CPUs when GPU is not available, as the main script does
  • throw out an error saying that this particular script can only be used when GPU is available

Environment (please complete the following information):
Ubuntu 22.04 docker image (see issue #154)

Additional context

  • The Helixer.py script works fine on this machine.
  • The same behavior pops out if I reduce CPUs and set workers to 0
@felicitas215
Copy link
Collaborator

Hi,
thank you for your message. First, you are trying to use the base HelixerModel class. This is not intended to work or be used. The script you need is HybridModel.py. You don't need to specify the path to the HybridModel.py script. Second, as mentioned in #152 the --cpus argument is deprecated. When training you can use --workers to use more CPUs. When predicting you can only use one device (GPU or CPU).
What are you trying to do with the command? You are mixing arguments for training and predicting, so it's not clear to me. Also, the output file predictions_h5 is not valid, please use predictions.h5.

@MatteoSchiavinato
Copy link
Author

I'm sure this is all the result of using HelixerModel.py instead of HybridModel.py. I was indeed snooping through the argparse declarations to find parameters to use, and was confused by many of them.

Happy that it was just this!

@MatteoSchiavinato
Copy link
Author

What I was trying to achieve was to follow through the 3-step running mode that is explained in the docs. I simply confused the script name, apparently.

However, I am a bit confused by the parameters, since both --load-model-path and --save-model-path are present. Is there any specific documentation on them, that I may read? I haven't found it so far (sorry)

@felicitas215
Copy link
Collaborator

If you click on the links in the README that mention the 'Helixer options documentation' (which will bring you here: https://github.com/weberlab-hhu/Helixer/blob/main/docs/helixer_options.md), you will find an overview of all the main files and their options.

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

No branches or pull requests

2 participants