Closed sdiazlor closed 8 months ago
🤖
The error you're encountering is due to the input_perplexity
and input_entropy
values in FeedbackRecord.metadata
not being valid floats. This could be due to a few reasons:
The values are not provided: In the _NumericMetadataPropertySchema
class, the min
and max
values are optional. If these values are not provided, the _value_in_bounds
method will raise a ValueError if the provided_value
is not within the bounds of min
and max
.
The values are not of the correct type: The _check_allowed_value_type
method checks if the provided value is of type int
or float
. If it is not, a TypeError is raised.
The values are NaN: The _check_nan
method checks if the provided value is NaN (Not a Number). If it is, a ValueError is raised.
To fix this issue, ensure that the input_perplexity
and input_entropy
values in FeedbackRecord.metadata
are valid floats and are within the bounds of min
and max
if they are provided. Also, make sure that these values are not NaN.
You can find more details in the metadata.py file.
As for the expected data type for input_perplexity
and input_entropy
in the FeedbackRecord.metadata
schema, I wasn't able to find specific information within the repository. It's possible that this information is available elsewhere or I may have missed it. If you have more information about the expected data types or if there's a specific part of the code you're working with that could provide more context, please share it. This will help me provide a more accurate answer.
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
@frascuchon, this might also be the case for IntMetaDataProperties
working with 0
rounded numbers (1.0
, 2.0
, etc.)
Thanks @sdiazlor and @davidberenstein1957. If this is a client validation error, it should be an error related to the pydantic behaviour. Maybe @alvarobartt can take a look into it. He can tackle this better than me.
May I ask how are the metadata_properties
for the text-descriptives
defined? Because it seems that the value is float
which is a Python type that should go from float(1) -> 1.0
, so I cannot see the issue with the provided information, could you answer the question above and provide any other information that can be useful? i.e. is the issue only within the to_argilla
method of distilabel
or also in argilla
Python package?
AFAIK @davidberenstein1957 worked on that integration and I'm not really aware about the text-descriptives
details, could you double check @davidberenstein1957? Thanks
@sdiazlor worked on this integration, I checked it. I think the issue is originating in the text-descriptives
integration but is two-fold.
IntegerMetadataProperty
with a FloatMetadataProperty
during the text-descriptives
config. @sdiazlor, would you be able to take a look here?1.0
to an IntegerMetadataProperty
and perhaps also not an integer like1
to a FloatMetadataProperty
. For me this feels buggy but what do you think @alvarobartt, should we allow for this?
Describe the bug Using
distilabel
andto_argilla
method raises this error regarding metadata andtext-descriptives
.Expected behavior I would expect this check to pass given that any integer is a rounded of float.
Environment:
Additional context Add any other context about the problem here.