Skip to content

Commit

Permalink
PR Changes
Browse files Browse the repository at this point in the history
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
  • Loading branch information
Abhishek-TAMU committed Aug 7, 2024
1 parent e65cb2d commit 4841119
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
21 changes: 3 additions & 18 deletions tests/utils/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,12 @@
import logging
import os

# First Party
from tests.test_sft_trainer import TRAIN_ARGS

# Local
from tuning.config import configs
from tuning.utils.logging import set_log_level

TRAIN_ARGS = configs.TrainingArguments(
num_train_epochs=5,
per_device_train_batch_size=4,
per_device_eval_batch_size=4,
gradient_accumulation_steps=4,
learning_rate=0.00001,
weight_decay=0,
warmup_ratio=0.03,
lr_scheduler_type="cosine",
logging_steps=1,
include_tokens_per_second=True,
packing=False,
max_seq_length=4096,
save_strategy="epoch",
output_dir="tmp",
)


@mock.patch.dict(os.environ, {}, clear=True)
def test_set_log_level_for_logger_default():
Expand Down
14 changes: 14 additions & 0 deletions tuning/utils/logging.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright The FMS HF Tuning Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Standard
import logging
import os
Expand Down

0 comments on commit 4841119

Please sign in to comment.