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

Offen
#59 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
71
Forks
26
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie mit den im Beispiel gezeigten Einstiegspunkten pydolphinscheduler.core.Workflow und tasks.Shell, einschließlich workflow.run() und auto_resource=True; der Beispiel-Workspace ist word_language_model mit main.py. Ermitteln Sie, wie das Resource Center derzeit Dateien empfängt, und definieren Sie anschließend, was für eine reproduzierbare lokale Workspace- oder Git-Repository-Version und einen reproduzierbaren Diff auf DolphinScheduler erforderlich ist, wobei inkonsistente Umgebungsvariablen berücksichtigt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git, python
Bereich
backend, devops
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.