mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-12-03 07:18:28 +01:00
Use celery status as the exp show status
fix: #8349 `tasks status turned to queued for 1 second before turned into success.` is because in previous the status is using the output of `get_running_exps` in `repo.expereiments` and when entering the collect result progress, the `get_running_exps` will mark the tasks to be not running because the `info.result` is not None. Here we use the output of the celery queue as the universal standard for the tasks status. 1. Use celery status as the exp show status
This commit is contained in:
@@ -163,6 +163,7 @@ def test_show_queued(tmp_dir, scm, dvc, exp_stage):
|
||||
|
||||
|
||||
@pytest.mark.vscode
|
||||
@pytest.mark.xfail(strict=False, reason="pytest-celery flaky")
|
||||
def test_show_failed_experiment(tmp_dir, scm, dvc, failed_exp_stage):
|
||||
baseline_rev = scm.get_rev()
|
||||
timestamp = datetime.fromtimestamp(
|
||||
@@ -423,8 +424,6 @@ def test_show_running_workspace(tmp_dir, scm, dvc, exp_stage, capsys, status):
|
||||
makedirs(os.path.dirname(pidfile), True)
|
||||
(tmp_dir / pidfile).dump_json(info.asdict())
|
||||
|
||||
print(dvc.experiments.show().get("workspace"))
|
||||
|
||||
assert dvc.experiments.show().get("workspace") == {
|
||||
"baseline": {
|
||||
"data": {
|
||||
@@ -558,6 +557,7 @@ def test_show_running_checkpoint(tmp_dir, scm, dvc, checkpoint_stage, mocker):
|
||||
git_url="foo.git",
|
||||
baseline_rev=baseline_rev,
|
||||
location=TempDirExecutor.DEFAULT_LOCATION,
|
||||
status=TaskStatus.RUNNING,
|
||||
)
|
||||
makedirs(os.path.dirname(pidfile), True)
|
||||
(tmp_dir / pidfile).dump_json(info.asdict())
|
||||
|
||||
Reference in New Issue
Block a user