dvc-task: update to 0.0.6

This commit is contained in:
Peter Rowlands
2022-07-12 21:39:49 +09:00
committed by Peter Rowlands (변기호)
parent e8448345f1
commit e2ee69ddb2
2 changed files with 1 additions and 44 deletions
-43
View File
@@ -1,43 +0,0 @@
import os
from typing import Any, Dict
from dvc.utils.fs import makedirs
def get_config(wdir: str, mkdir=False) -> Dict[str, Any]:
broker_path = os.path.join(wdir, "broker")
broker_in_path = _unc_path(os.path.join(broker_path, "in"))
broker_processed_path = _unc_path(os.path.join(broker_path, "processed"))
result_path = os.path.join(wdir, "result")
if mkdir:
for path in (broker_in_path, broker_processed_path, result_path):
makedirs(path, exist_ok=True)
return {
"broker_url": "filesystem://",
"broker_transport_options": {
"data_folder_in": broker_in_path,
"data_folder_out": broker_in_path,
"processed_folder": broker_processed_path,
"store_processed": True,
},
"result_backend": "file://{}".format(_unc_path(result_path)),
"result_persistent": True,
"task_serializer": "json",
"result_serializer": "json",
"accept_content": ["json"],
"imports": ("dvc.repo.experiments.queue.tasks", "dvc_task.proc.tasks"),
}
def _unc_path(path: str) -> str:
# Celery/Kombu URLs only take absolute filesystem paths
# (UNC paths on windows)
path = os.path.abspath(path)
if os.name != "nt":
return path
drive, tail = os.path.splitdrive(path.replace(os.sep, "/"))
if drive.endswith(":"):
return f"//?/{drive}{tail}"
return f"{drive}{tail}"
+1 -1
View File
@@ -67,7 +67,7 @@ install_requires =
aiohttp-retry>=2.4.5
scmrepo==0.0.25
dvc-render==0.0.6
dvc-task>=0.0.3
dvc-task@git+https://github.com/iterative/dvc-task.git@0.0.6
dvclive>=0.7.3
dvc-data==0.0.23