-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
cannot pass string values to the report_to variable after init constructor #34445
Comments
cc @muellerzr WDYT? |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Hey @alpertunga-bile, is there any reason why you want to set |
Hello @SunMarc, I am training 5 models with a single script in Google Colab, so I need to change the values according to the selected model. Since there are multiple condition checks and the checks affect multiple values; I am assigning them after the init ctor. Before the updates I had no problem but later it tries to use the I think the solution will provide flexibility and protection from the side effect of the constructor to the user who follows the documentation and uses this assignment pattern. However it seems that this is a rare issue and assignment pattern so the solution will not have any impact on the user experience. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
I'm okay with adding this to get_reporting_integration_callbacks @alpertunga-bile . Feel free to open a PR ! |
System Info
transformers
version: 4.47.0.dev0Who can help?
@muellerzr @SunMarc
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Expected behavior
The script will run without any integration when
report_to
value is assigned withnone
value.Problem
The check for the
report_to
variable is done in thepost_init
function of theTrainingArguments
. If you don't specify it in the constructor then the code set toall
and fetch all the integrations. If you assing a value toreport_to
variable after initialization constructor, the below issue is happening.In the
Trainer
constructor, withget_reporting_integration_callbacks
function the class is fetching the integration callbacks but the function is not checking if string or array is the type of thereport_to
value. Because of that the functions raises ValueError if you assign string to the value because it is trying to check with char rather than string. This behaviour is same for thenone
andall
string values.Solution
Adding below code to the beginning of the get_reporting_integration_callbacks function will fix the issue:
The text was updated successfully, but these errors were encountered: