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

Add Dask engine to dataset generation functions #404

Merged
merged 7 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
intersphinx_mapping = {
"python": ("https://docs.python.org/3.8", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"dask": ("https://docs.dask.org/en/stable/", None),
"tables": ("https://www.pytables.org/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"networkx": ("https://networkx.org/documentation/stable/", None),
Expand Down
8 changes: 8 additions & 0 deletions docs/source/simulated_populations/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,11 @@ or United States), unzip the contents to the desired location on your computer.
Once you've unzipped the simulated population data, you can pass the directory
path to the :code:`source` parameter of the :ref:`dataset generation functions
<dataset_generation_functions>` to generate large-scale datasets!

If you're using one of the larger populations, you'll also want to take a look at the
:code:`engine` parameter.
By default, pseudopeople generates datasets using Pandas, which does not fully parallelize
across cores and requires the entire dataset to fit into RAM.
However, by passing "dask" to the :code:`engine` parameter, you can run the dataset
generation on a Dask cluster, which can spill data to disk and even distribute
the computation across multiple computers!
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@
"jupyter",
]

dask_requirements = ["dask"]

test_requirements = [
"pytest",
"pytest-mock",
]
] + dask_requirements

lint_requirements = [
"black==22.3.0",
Expand Down Expand Up @@ -109,6 +111,7 @@
+ test_requirements
+ interactive_requirements
+ lint_requirements,
"dask": dask_requirements,
rmudambi marked this conversation as resolved.
Show resolved Hide resolved
},
# entry_points="""
# [console_scripts]
Expand Down
Loading
Loading