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

Point reproduce in Python segments to HuggingFace URLs #2316

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nikhilwoodruff
Copy link
Contributor

Fixes #2315

Description

Point dataset strings to URLs instead

Changes

As above.

Screenshots

image ## Tests

No tests added.

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
policyengine-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 6:27am

Copy link
Collaborator

@anth-volk anth-volk left a comment

Choose a reason for hiding this comment

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

Hey @nikhilwoodruff, thanks for this quick turnaround. My main thought is in my comment below, but TL;DR, would it be more logical (and equally as fast) to solve this in us-data? Looking forward to your thoughts.

@@ -189,9 +189,9 @@ export function getImplementationCode(
if (hasDatasetSpecified) {
datasetText = DEFAULT_DATASETS[dataset];
} else if (isState) {
datasetText = "pooled_3_year_cps_2023";
datasetText = "hf://policyengine/policyengine-us-data/pooled_3_year_cps_2023.h5";
Copy link
Collaborator

Choose a reason for hiding this comment

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

question, blocking: Would it be more sustainable to modify this setting in us-data and keep the app the same?

It seems to me we always want the API and country packages both to prefer HuggingFace datasets over GitHub. It also seems like it'd be relatively simple to modify us-data to either recognize this preference, or just only download from once source or the other, instead of our current method where we still send data updates to both GitHub and HuggingFace.

Could we just modify us-data to do this? Seems unwieldy to ask users to remember this entire link.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As per the policyengine.py design doc, I think we should move away from us-data being a package dependency so I'd vote against this.

In the medium term we'll move to policyengine.py, which abstracts the huggingface URL away behind constants, and update the reproduce in python segment accordingly. Right now the reproduce in python segment is broken without this, so I'd suggest still keeping this solution in the -app repo here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

Point reproduce in Python segments to HuggingFace URLs
2 participants