Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflow #24

Merged
merged 3 commits into from
Mar 12, 2024
Merged

Update workflow #24

merged 3 commits into from
Mar 12, 2024

Conversation

jrbourbeau
Copy link
Member

No description provided.

pipeline/data.py Outdated
# tables each time the flow is run to produce unique transactions
# xref https://discourse.prefect.io/t/how-to-get-flow-count/3996
# if table in ["lineitem", "orders"]:
# df[f"{table[0]}_orderkey"] += counter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to do more than just add now - 1995 or whatever. We might want to do an affine transform so that the entire previous range (like 1985-1995) gets squeezed into the last hour.

def check_model_endpoint():
r = requests.get("http://0.0.0.0:8080/health")
if not r.json() == ["ok"]:
raise ValueError("Model endpoint isn't healthy")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still doing the serving with --subdomain or no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My hope is that serving is cheap and the ROI is high

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Not added yet -- that's for me to do today

@@ -18,7 +18,7 @@


@task
def save_query(region, part_type):
def save_query(segment):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a better name? Something that's connected to the query itself like "revenue_by_supplier" or something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with unshipped_orders_by_revenue -- further suggestions are welcome


outfile = RESULTS_DIR / region / part_type / "result.snappy.parquet"
).compute()
outfile = RESULTS_DIR / f"{segment}.snappy.parquet"
fs.makedirs(outfile.parent, exist_ok=True)
result.to_parquet(outfile, compression="snappy")


@flow
def query_reduce():
with lock_compact:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cluster creation should go here maybe instead of save_query?

@jrbourbeau jrbourbeau changed the title [WIP] Update workflow Update workflow Mar 12, 2024
@jrbourbeau jrbourbeau marked this pull request as ready for review March 12, 2024 19:35
@jrbourbeau jrbourbeau merged commit a00d25c into main Mar 12, 2024
1 check passed
@jrbourbeau jrbourbeau deleted the update branch March 13, 2024 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants