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

Error When Specifying Multiple Ages for --target_age Parameter In Replicate #67

Open
RazaProdigy opened this issue Jan 6, 2024 · 0 comments

Comments

@RazaProdigy
Copy link

RazaProdigy commented Jan 6, 2024

Description

When attempting to use the --target_age parameter with a comma-separated list of ages (e.g., "0,10,20,30,40"), I encounter a ValueError during the type conversion to int in the add_aging_channel function. It seems that the code is not handling the comma-separated string correctly and is trying to convert the entire string to an integer, which is not possible.

Steps to Reproduce

  1. Run the age transformation model with the --target_age parameter specified as a comma-separated list of ages.
  2. Observe the error when the model attempts to process the input.

Expected behavior

I would expect the model to process each age value individually from the comma-separated list.

Actual behavior

The code fails with a ValueError because it attempts to convert the entire comma-separated string into an integer.

Error Message

Traceback (most recent call last):
File "/root/.pyenv/versions/3.8.14/lib/python3.8/site-packages/cog/serve/result.py", line 66, in predict
input_image_age = [age_transformer(input_image.cpu())].to("cuda")
File "/src/datasets/augmentations.py", line 16, in add_aging_channel
target_age = int(target_age) / 100
ValueError: invalid literal for int() with base 10: '0,10,20,30,40'

API/Model Version:

Latest: 9222a21c

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

1 participant