Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
liyanzhe.lyz committed Jan 24, 2025
1 parent 594c3c1 commit 4672736
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
15 changes: 14 additions & 1 deletion dlrover/python/tests/test_error_handler.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
# Copyright 2025 The DLRover Authors. All rights reserved.
# 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.

import signal
import sys
import threading
from unittest.mock import Mock

import pytest

from dlrover.python.training_event.error_handler import ErrorHandler
from dlrover.python.training_event.emitter import Process
from dlrover.python.training_event.error_handler import ErrorHandler


@pytest.fixture
Expand Down
17 changes: 15 additions & 2 deletions dlrover/python/training_event/error_handler.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
# Copyright 2025 The DLRover Authors. All rights reserved.
# 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.

import os
import signal
import sys
import threading
import traceback


from .config import get_default_logger, _CONFIG
from .config import get_default_config, get_default_logger
from .emitter import Process
from .exporter import close_default_exporter

_LOGGER = get_default_logger()
_CONFIG = get_default_config()


class ErrorHandler:
Expand Down

0 comments on commit 4672736

Please sign in to comment.