Skip to content

Commit 154d510

Browse files
add back logging_dir (#42013)
* add back * Apply style fixes --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent e3d4fa6 commit 154d510

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/transformers/training_args.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,12 @@ class TrainingArguments:
885885
)
886886
},
887887
)
888+
logging_dir: Optional[str] = field(
889+
default=None,
890+
metadata={
891+
"help": "Deprecated and will be removed in v5.2. Set env var `TENSORBOARD_LOGGING_DIR` instead. TensorBoard log directory."
892+
},
893+
)
888894
logging_strategy: Union[IntervalStrategy, str] = field(
889895
default="steps",
890896
metadata={"help": "The logging strategy to use."},
@@ -1695,6 +1701,11 @@ def __post_init__(self):
16951701
if isinstance(self.include_num_input_tokens_seen, bool):
16961702
self.include_num_input_tokens_seen = "all" if self.include_num_input_tokens_seen else "no"
16971703

1704+
if self.logging_dir is not None:
1705+
logger.warning(
1706+
"`logging_dir` is deprecated and will be removed in v5.2. Please set `TENSORBOARD_LOGGING_DIR` instead."
1707+
)
1708+
16981709
def __str__(self):
16991710
self_as_dict = asdict(self)
17001711

0 commit comments

Comments
 (0)