apache / apache/dolphinscheduler-sdk-python

[impv] Auto create the whole task workspace to make the task the same workspace when running locally and on the DolphinScheduler platform

未關閉
#59 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
71
分支
26
PR 合併指標
30 天內沒有已合併 PR

描述

For example, If I have the workspace like this: https://github.com/pytorch/examples/tree/main/word_language_model
image

We can submit the task
```python
# [start workflow]
from pydolphinscheduler.core import Workflow
from pydolphinscheduler.core.resource import Resource, LocalResource
from pydolphinscheduler.tasks import Shell

with Workflow(
name="auto_resources_example",
) as workflow:
# [start use_exists_resources]
task_use_resource = Shell(
name="example",
command=f"python main.py --cuda",
auto_resource=True
)
# [end use_exists_resources]

workflow.run()
# [end workflow]
```

Then, all the files will be uploaded to the resource center.
And there is another best way to track the file version, If this is the git repository, we only record the git repository, version, and diff.
Then, we can reproduce the workspace in dolphinscheduler. (Inspired by ClearML)
So, After developing a project locally, we can directly submit it to DolphinScheduler and run it directly. Except for some inconsistent environment variables.

貢獻指南

開啟貢獻指南

研究方向

從範例中所示的 pydolphinscheduler.core.Workflow 和 tasks.Shell 進入點開始,包括 workflow.run() 和 auto_resource=True;範例工作區是包含 main.py 的 word_language_model。確認 Resource Center 目前如何接收檔案,接著定義要讓本機工作區或 Git 儲存庫的版本及其 diff 能夠在 DolphinScheduler 上重現所需的內容,同時考量環境變數不一致的情況。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
git, python
領域
backend, devops
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。