-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e80b60
commit efbd706
Showing
21 changed files
with
40 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Export a Ploomber DAG to Airflow | ||
""" | ||
|
||
import json | ||
import os | ||
from pathlib import Path | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Export to Argo Workflows | ||
""" | ||
|
||
from pathlib import Path | ||
|
||
import click | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
import json | ||
# import json | ||
|
||
import pandas as pd | ||
from ploomber import OnlineModel | ||
# import pandas as pd | ||
# from ploomber import OnlineModel | ||
|
||
import {{package_name}} | ||
# import {{package_name}} | ||
|
||
model = OnlineModel({{package_name}}) | ||
# model = OnlineModel({{package_name}}) | ||
|
||
|
||
def handler(event, context): | ||
body = json.loads(event['body']) | ||
# def handler(event, context): | ||
# body = json.loads(event['body']) | ||
|
||
raise NotImplementedError('Missing implementation ' | ||
'in {{package_name}}/app.py. ' | ||
'Add input parsing logic.') | ||
# raise NotImplementedError('Missing implementation ' | ||
# 'in {{package_name}}/app.py. ' | ||
# 'Add input parsing logic.') | ||
|
||
# NOTE: example implementation for a pipeline that expects a data frame | ||
# in a "get" task input | ||
df = pd.DataFrame(body, index=[0]) | ||
prediction = int(model.predict(get=df)[0]) | ||
# # NOTE: example implementation for a pipeline that expects a data frame | ||
# # in a "get" task input | ||
# df = pd.DataFrame(body, index=[0]) | ||
# prediction = int(model.predict(get=df)[0]) | ||
|
||
return { | ||
"statusCode": 200, | ||
"body": json.dumps({ | ||
"prediction": prediction | ||
}), | ||
} | ||
# return { | ||
# "statusCode": 200, | ||
# "body": json.dumps({ | ||
# "prediction": prediction | ||
# }), | ||
# } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Running pipelines on AWS Batch | ||
""" | ||
|
||
import re | ||
from uuid import uuid4 | ||
import os | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Loading dags | ||
""" | ||
|
||
from pathlib import Path | ||
|
||
from ploomber.constants import TaskStatus | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Export a Ploomber DAG to Kubeflow | ||
""" | ||
|
||
import os | ||
from pathlib import Path | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Setup tasks (requires invoke: pip install invoke) | ||
""" | ||
|
||
import shutil | ||
import sys | ||
import platform | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Clean raw data | ||
""" | ||
|
||
import pandas as pd | ||
|
||
# + tags=["parameters"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Clean raw data | ||
""" | ||
|
||
import pandas as pd | ||
|
||
# + tags=["parameters"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Generate plot | ||
""" | ||
|
||
import pandas as pd | ||
import seaborn as sns | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Clean raw data | ||
""" | ||
|
||
import pandas as pd | ||
|
||
# + tags=["parameters"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Generate plot | ||
""" | ||
|
||
import pandas as pd | ||
|
||
# + tags=["parameters"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Test abstract class implementation | ||
""" | ||
|
||
from pathlib import Path | ||
|
||
import pytest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Common tests for all implementations | ||
""" | ||
|
||
from pathlib import Path | ||
|
||
import pytest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Test generated wheel | ||
""" | ||
|
||
import tarfile | ||
from glob import iglob | ||
from pathlib import Path | ||
|