-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
update codecarbon #35243
update codecarbon #35243
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (don't know the reason why it was pinned to 1.2.0 previously)
CircleCI jobs don't install codecarbon
so no need to build and check before merge. We can see next dailiy CI next week.
Thanks
will let at least one of @muellerzr or @SunMarc to approve too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ! Left a comment
.gitignore
Outdated
|
||
# folders generated in test_trainer.py | ||
/test | ||
/regression | ||
/None | ||
/examples/checkpoint-* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know which test is causing this. ? We try to put everything that are saved in temp folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your comment! Let me see...
I've searched the lines maybe related to:
".test"
transformers/tests/trainer/test_trainer.py
Line 1193 in bc6ae0d
args = TrainingArguments("./test", report_to="none") |
transformers/tests/trainer/test_trainer.py
Line 1454 in bc6ae0d
"./test", |
transformers/tests/trainer/test_trainer.py
Line 1476 in bc6ae0d
"./test", |
transformers/tests/trainer/test_trainer.py
Line 1508 in bc6ae0d
"./test", learning_rate=1e9, logging_steps=5, logging_nan_inf_filter=False, report_to="none" |
transformers/tests/trainer/test_trainer.py
Line 1516 in bc6ae0d
"./test", learning_rate=1e9, logging_steps=5, logging_nan_inf_filter=True, report_to="none" |
transformers/tests/trainer/test_trainer.py
Line 1579 in bc6ae0d
args = TrainingArguments("./test", report_to="none", dataloader_persistent_workers=False) |
transformers/tests/trainer/test_trainer.py
Line 1623 in bc6ae0d
"./test", |
transformers/tests/trainer/test_trainer.py
Line 1682 in bc6ae0d
"./test", |
"./regression":
transformers/tests/trainer/test_trainer.py
Line 555 in bc6ae0d
output_dir = kwargs.pop("output_dir", "./regression") |
transformers/tests/trainer/test_trainer.py
Line 738 in bc6ae0d
args = TrainingArguments("./regression", learning_rate=0.1, report_to="none") |
transformers/tests/trainer/test_trainer.py
Line 990 in bc6ae0d
args = TrainingArguments("./regression", report_to="none") |
transformers/tests/trainer/test_trainer.py
Line 1009 in bc6ae0d
"./regression", |
"./examples"
transformers/tests/trainer/test_trainer.py
Line 3188 in bc6ae0d
training_args = TrainingArguments(output_dir="./examples", use_cpu=True, report_to="none") |
transformers/tests/trainer/test_trainer.py
Line 3206 in bc6ae0d
output_dir="./examples", |
transformers/tests/trainer/test_trainer.py
Line 3240 in bc6ae0d
args = RegressionTrainingArguments(output_dir="./examples", max_steps=4) |
transformers/tests/trainer/test_trainer.py
Line 3255 in bc6ae0d
args = RegressionTrainingArguments(output_dir="./examples") |
transformers/tests/trainer/test_trainer.py
Line 3282 in bc6ae0d
args = RegressionTrainingArguments(output_dir="./examples") |
"./None"
I couldn't find any directly specified part, but I've seen "./None" folder is made every time I run test_trainer
. I suspect that there are some lines which don't pass output_dir to TrainingArguments, or the variables passed to TrainingArguments are occasionally None.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure all of these are the main cause, but when I ran test_trainer.py
, it surely made the folders I wrote in .gitignore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found 117 lines which use with tempfile.TemporaryDirectory() as tmp_dir:
and pass tmp_dir to TrainingArguments, so most of the test experiments properly utilizes temp dir, and the lines I picked above seem to be irregular.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found another non-tmp-dir specified in test_trainer.py
"./generation"
transformers/tests/trainer/test_trainer.py
Line 786 in bc6ae0d
"./generation", |
transformers/tests/trainer/test_trainer.py
Line 801 in bc6ae0d
"./generation", |
transformers/tests/trainer/test_trainer.py
Line 883 in bc6ae0d
"./generation", |
transformers/tests/trainer/test_trainer.py
Line 898 in bc6ae0d
"./generation", |
I replaced "./test", "./examples", "./generation", and "./regression" with tmp_dir. The only part left we need to find is the causes of producing "./None" dir, I think. |
Maybe I did something unnecessary... New failure Testing push_to_hub requires the checkpoint dir which is not temporary I guess? I'm ready to revert the last commit and just leave .gitignore intact. I want your review @SunMarc . |
Hi, the last commit of changing won't work as the tmp_dir is created within the scope of
outside the |
It's my trivial mistake. Thank you for pointing it out. |
I guess it's good to just revert that commit , keep this PR as doing what it intends to do. For the temp. directory, we can address them in another PR (if eventually we really wish ) |
This reverts commit 310a6d9.
.gitignore
Outdated
|
||
# folders generated in test_trainer.py | ||
/test | ||
/regression | ||
/None | ||
/examples/checkpoint-* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's also revert this one in this PR :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I reverted it!
@ArthurZucker We need an approval from you :-) 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the update! 🤗
What does this PR do?
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.