Skip to content

Commit

Permalink
remove unnecessary logging configs (#2733)
Browse files Browse the repository at this point in the history
Summary:
# Before submitting

- [ ] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
- [x] Did you read the [contributor guideline](https://github.com/pytorch/fairseq/blob/master/CONTRIBUTING.md)?
- [ ] Did you make sure to update the docs?
- [x] Did you write any new necessary tests?

## What does this PR do?
It's sufficient to set logging.basicConfig in the most outside calling code like train.py or generate.py. Actually the setting of logging.basicConfig () (like [here](https://github.com/pytorch/fairseq/blob/master/fairseq_cli/generate.py#L54)) will been overwritten if logging.basicConfig is set in the inner part of the whole code.

## PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

## Did you have fun?
Make sure you had fun coding �

Pull Request resolved: #2733

Reviewed By: alexeib

Differential Revision: D24418987

Pulled By: myleott

fbshipit-source-id: 862d200023357de8947799f380e513f4c411b143
  • Loading branch information
freewym authored and myleott committed Jan 5, 2021
1 parent 33b87bd commit af72ea1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions fairseq/data/audio/speech_to_text_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
from fairseq.data.audio.feature_transforms import CompositeAudioFeatureTransform


logging.basicConfig(
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
level=logging.INFO,
)
logger = logging.getLogger(__name__)


Expand Down
5 changes: 0 additions & 5 deletions fairseq/tasks/speech_to_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
from fairseq.tasks import FairseqTask, register_task


logging.basicConfig(
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
level=logging.INFO,
)
logger = logging.getLogger(__name__)


Expand Down

0 comments on commit af72ea1

Please sign in to comment.