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

AMPLIFY_PREDICT exits with a ValueError while checking input #373

Open
m3hdad opened this issue May 5, 2024 · 1 comment
Open

AMPLIFY_PREDICT exits with a ValueError while checking input #373

m3hdad opened this issue May 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@m3hdad
Copy link

m3hdad commented May 5, 2024

Description of the bug

AMPLIFY_PREDICT fails on some protein sequences.
The issue is discussed on slack here.
Two input sequences for which AMPLIFY_PREDICT fails/passes are available on Slack.

Pyrodigal and Prodigal were tested as annotation tools.
AMPlify v.2.0.0 tested which failed on similar sequences.

Removing stop codon before running AMPlify solves the issue.

.command.err on AMPLIFY_PREDICT:

Command output:

  Loading balanced models...
  /usr/local/share/amplify/models/balanced/AMPlify_balanced_model_weights_1.h5
  /usr/local/share/amplify/models/balanced/AMPlify_balanced_model_weights_2.h5
  /usr/local/share/amplify/models/balanced/AMPlify_balanced_model_weights_3.h5
  /usr/local/share/amplify/models/balanced/AMPlify_balanced_model_weights_4.h5
  /usr/local/share/amplify/models/balanced/AMPlify_balanced_model_weights_5.h5

  Predicting...

Command error:
  2024-05-02 17:39:17.292177: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
  2024-05-02 17:39:17.345481: I tensorflow/core/common_runtime/process_util.cc:69] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.
  Using TensorFlow backend.
  Traceback (most recent call last):
    File "/usr/local/share/amplify/src/AMPlify.py", line 309, in <module>
      main()
    File "/usr/local/share/amplify/src/AMPlify.py", line 213, in main
      y_score_valid, y_indv_list_valid = ensemble(out_model, X_seq_valid)
    File "/usr/local/share/amplify/src/AMPlify.py", line 101, in ensemble
      indv_pred.append(model_list[i].predict(X).flatten())
    File "/usr/local/lib/python3.6/site-packages/keras/engine/training.py", line 1149, in predict
      x, _, _ = self._standardize_user_data(x)
    File "/usr/local/lib/python3.6/site-packages/keras/engine/training.py", line 751, in _standardize_user_data
      exception_prefix='input')
    File "/usr/local/lib/python3.6/site-packages/keras/engine/training_utils.py", line 128, in standardize_input_data
      'with shape ' + str(data_shape))
  ValueError: Error when checking input: expected Input to have 3 dimensions, but got array with shape (0, 1)

Command used and terminal output

No response

Relevant files

No response

System information

No response

@m3hdad m3hdad added the bug Something isn't working label May 5, 2024
@jfy133
Copy link
Member

jfy133 commented May 15, 2024

Revisting this @m3hdad just now made me think: do you think this should be solved here or upstream in AMPLify itself?

What do yout think? One hand we can 'fix it' in the pipeline, but 'manual' modification of the input/output files isn't a great idea for a pipeline.

If you agree, could you make an issue on the AMPlify repo, and maybe we can see how fast they are in solving it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants