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

VG captioning on saga: UFuncOutputCastingError #23

Open
elizlee opened this issue Mar 23, 2023 · 0 comments
Open

VG captioning on saga: UFuncOutputCastingError #23

elizlee opened this issue Mar 23, 2023 · 0 comments
Assignees

Comments

@elizlee
Copy link

elizlee commented Mar 23, 2023

Steps to reproduce:

  1. Log into a submit node
  2. Begin an interactive session
    srun --partition=gaia-lg --account=gaia-lg --qos=normal --gpus=4 --mem=30g --pty bash
  3. Use the following command to run the docker:
docker run -it --rm --gpus=4 -e VG_DATA_DIR=/input/data -v /nas/gaia02/data/paper2023/vg/visual_genome_python_driver:/input -v $OUTPUT_DIR:/output -e OUTPUT_FILE=/output/vg_all_output.tsv unified-io-inference:vg_caption_all_only

For me, this results in the following:

INFO:absl:Setting up model...
INFO:absl:Loading parameters...
INFO:absl:Model is ready
INFO:absl:Creating image to description mapping...
INFO:absl:Captioning images from /input/data...
Traceback (most recent call last):
  File "/root/./caption_vg.py", line 131, in <module>
    main()
  File "/root/./caption_vg.py", line 107, in main
    primary_output = model.vqa(image, CAPTIONING_PROMPT)
  File "/root/uio/runner.py", line 313, in vqa
    out = self.run([image], [question.lower()], output_text_len=32,
  File "/root/uio/runner.py", line 176, in run
    image, image_mask = utils.preprocess_image(
  File "/root/uio/utils.py", line 291, in preprocess_image
    input_image = normalize_image(input_image)
  File "/root/uio/utils.py", line 324, in normalize_image
    image -= BIAS.reshape((1, 1, 3))
numpy.core._exceptions._UFuncOutputCastingError: Cannot cast ufunc 'subtract' output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'
@elizlee elizlee changed the title VG captioning on saga: VG captioning on saga: UFuncOutputCastingError Mar 23, 2023
@danielnapierski danielnapierski self-assigned this Mar 24, 2023
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