forked from mindspore-Ecosystem/mindspore
!31332 Fix bug in terminating a failed pipeline
Merge pull request !31332 from h.farahat/fix_reset
This commit is contained in:
commit
5f75c701d5
|
@ -58,8 +58,10 @@ Status TreeConsumer::Init(std::shared_ptr<DatasetNode> d) {
|
|||
}
|
||||
|
||||
Status TreeConsumer::Terminate() {
|
||||
CHECK_FAIL_RETURN_UNEXPECTED(tree_adapter_->AllTasks() != nullptr, " Execution tree has not been built");
|
||||
return tree_adapter_->AllTasks()->ServiceStop();
|
||||
if (tree_adapter_->AllTasks() != nullptr) {
|
||||
return tree_adapter_->AllTasks()->ServiceStop();
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
#ifndef ENABLE_SECURITY
|
||||
|
|
|
@ -14,15 +14,16 @@
|
|||
# ============================================================================
|
||||
"""
|
||||
@File : conftest.py
|
||||
@Desc : common fixtures for pytest
|
||||
@Desc : common fixtures for pytest dataset
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from mindspore.dataset.engine.iterators import _cleanup, _unset_iterator_cleanup
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
@pytest.fixture(scope="function", autouse=True)
|
||||
def close_iterators():
|
||||
yield
|
||||
# Note: code after `yield` is teardown code
|
||||
_cleanup()
|
||||
_unset_iterator_cleanup()
|
||||
|
|
|
@ -209,7 +209,7 @@ def test_reset_mindrecord(add_and_remove_cv_file): # pylint: disable=unused-arg
|
|||
run_reset(data, num_epochs=num_epochs, failure_point=failure_point, reset_step=reset_step)
|
||||
|
||||
|
||||
def skip_test_reset_np_error():
|
||||
def test_reset_np_error():
|
||||
"""
|
||||
Feature: dataset recovery
|
||||
Description: Simple test of data pipeline reset feature for error cases (step is negative, or larger than expected)
|
||||
|
|
Loading…
Reference in New Issue