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

Logger bug fix #551

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions textattack/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import transformers

import textattack
from textattack.shared.utils import logger

from .attack import Attack
from .attack_args import AttackArgs
Expand All @@ -25,8 +26,6 @@
from .models.wrappers import ModelWrapper
from .training_args import CommandLineTrainingArgs, TrainingArgs

logger = textattack.shared.utils.logger
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we still initiate the logger, but this time with something like logger = logger?

Copy link
Contributor Author

@agv7 agv7 Oct 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the logger variable gets defined through the import itself, so it might not be needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hanyu-Liu-123 is this ready to merge? The import makes sense!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you @ankitgv0



class Trainer:
"""Trainer is training and eval loop for adversarial training.
Expand Down