Skip to content

Update branch - #2

Merged
henriqueribeiro merged 121 commits into
feature/_frame-shapefrom
master
May 3, 2018
Merged

henriqueribeiro merged 121 commits into
feature/_frame-shapefrom
master

Conversation

@henriqueribeiro

Copy link
Copy Markdown
Owner
  • Tests added / passed
  • Passes flake8 dask
  • Fully documented, including docs/source/changelog.rst for all changes
    and one of the docs/source/*-api.rst files for new API

mrocklin and others added 30 commits February 24, 2018 10:03
* Mod before truncate in shufle_group

Fixes dask#2730

This caused some rows to be missed during task-based shuffles
So that pip-installing fastparquet from master works (was previously
conda-installed).
* Support categories= argument for pyarrow

* Support categories= in older pyarrow versions

* Set unknown categories

* Rebase changelog
This PR adds in resample.agg that allows for something like df['col'].resample('1min').agg(['mean', 'min']).
* Test `broadcast_shapes`/`broadcast_chunks` w/1 arg

Adds tests for `broadcast_shapes` and `broadcast_chunks` with one
argument. Didn't appear there was one before for either case. Hence this
adds one for this important base case.

* Support `broadcast_chunks` with no arguments

Make sure that if `broadcast_chunks` gets no arguments, it return an
empty tuple.

* Test `broadcast_shapes`/`broadcast_chunks` w/o arg

Adds tests for `broadcast_shapes` and `broadcast_chunks` when no
argument is provided. Didn't appear there was one before for either
case. Also it failed for `broadcast_chunks` previously. Hence this adds
test for this base case.
* Add base-level API page

* Update diagnostics documentation

1.  Separate diagnostics pages into single and distributed
2.  Add cover page for diagnostics
3.  Add standalone graphviz page
4.  Rearrange diagnostics-single doc to show user-facing docs first
    then dev docs
5.  Add API to diagnostics-single page

* remove code errant block

* remove inspect.rst
* Add broadcast_arrays

Implements `broadcast_arrays` for Dask Arrays. Builds off of all the
other `broadcast_*` functions already in `dask.array.core`.

* Export `broadcast_arrays` to the public API

Make `broadcast_arrays` available in the `dask.array` package.

* Test broadcast_arrays

Perform a simple test with `broadcast_arrays` that compares the results
from the NumPy implementation with the Dask Array implementation.

* Wrap long import line in `dask.array.creation`

About to make it longer and it is already over the line length limit. So
go ahead and wrap it in advance.

* Rewrite meshgrid to use broadcast_arrays

Simplify the code in `meshgrid` a bit by making use of
`broadcast_arrays`, which does all the bookkeeping for broadcasting the
shape and chunks.

* Document broadcast_arrays in dask.array API

Include `broadcast_arrays` for auto-documenting in the `dask.array`
public API.

* Note Dask Array's broadcast_arrays in changelog
* Clean up old documentation

This cleans up documentation.
There is no particular theme to these changes.
I just went through in a single pass and rearranged things that had
become somewhat stale..

* [skip ci] add fullstop

* add faq back into index
enviornments ->
environments
* Fixed two issues with dask/core when keys are not strings

The first issue on lines 306-315 in subs is fixing the assumption that if type_arg is type(key) then arg is an ndarray, when it can actually be any non-core python type at this point in the branching.

The second issue is where '->'.join(cycle) will fail (in trying to create an error message) if the elements of cycle cannot be added to strings.  This is resolved by calling str(x) on each before joining.

* Forgot to check ndarray on type(key)

* Added test for user class substitution, modified subs to fall back to == if len() or zip() call fails

* Changelog

* Update to catch len() error in python <= 3.4 and >= 3.5

* Added comment and added name to changelog
* Support mixed operations between arrays and dataframes

This allows mixing of Dask array and dataframe objects in element-wise
computations *if* they are well aligned.

    df.x - df.y.values

* Support array-dataframe operations with mixed dimensions

* changelog, flake8
Somehow we wound up with two development release sections. This merges
them back together.

[ci skip]
* Provide optional axis argument with squeeze

The `squeeze` method in NumPy takes an optional `axis` as does the
function. However we only support `axis` in the Dask Array function and
not the method. This brings the Dask Array `squeeze` method up to parity
with its NumPy counterpart by adding the optional `axis` argument.

* Cover different axis arguments to squeeze

* Test squeeze function too

* Make use of item selection in squeeze

To generalize squeeze a bit and simplify it as well, just make use of
item selection to squeeze axes.

* Always check and normalize axes in squeeze
* Support delayed and single-partition bags in Bag.join

This can significantly improve performance when joining against larger
collections due to serialization overhead on the distributed scheduler.

There is still more work to do here for multi-partition joins.

Experiments also show that GC is having a profound effect on performance
here.

* [skip ci] add changelog entry
The `fft_wrap` docstring is a bit out of date relative to what the
function is capable of. So refresh it note that higher dimensionality is
supported and that it works on real and complex data.

[ci skip]
As NumPy 1.10.4+ is the oldest version of NumPy that we test against,
set that as the lower bound for Dask's optional NumPy requirement. Also
some things that Dask is doing internally assume NumPy 1.10 at a minimum
(e.g. wrapping `cbrt`).
…k#3216)

* Loading of partitioned parquet should result in known categories

Fix for the fastparquet side

* Add tests and fix a bit

* Also test index categories

* fixes
* Implemented logic to add extra arguments to apply

Note this change could break existing code because meta becomes just an
extra keyword

* Implemented dd.core.Scalar test

* Updated tests with/without meta

* Partial implementation, trouble with keyword arguments

* Fixed delayed implementation

* Docstrings

* Added changelog

* Make flake8 happy

* Reuse of to_task_dask and test adaptation

* Refining docstrings, general cleanup
shoyer and others added 29 commits April 16, 2018 19:34
* Use safe_wraps for wrapping isin()

Fixes GH3388

* Move safe_wraps to dask.array.utils
Fixup and test for persist with traverse keyword when used with
distributed scheduler.
…ask#3387)

* Update test_parquet to check divisions for fastparquet and pyarrow >=0.9.0

pyarrow tests currently pass for <0.9.0 and fail for >=0.9.0

* WIP towards preserving divisions when reading parquet files using pyarrow

* Sort ParquetDatasetPieces naturally so that part numbers are processed in order

* Handle converting divisions to timestamps
But getting tests to pass required multiplying int64 time by 1000 and I'm not sure why.

* Use pyarrow schema to convert time to nanoseconds before passing to pandas

Refactor division logic into a new method and base it entirely on the
pyarrow schema (not the pandas metadata)

* Skip test_columns_name for write_parquet 'fastparquet' when reading with 'pyarrow'

This was causing a SIGSEGV error and the comments already state that fastparquet doesn't write column_names

* Encode string divisions

* Clarify parquet string encoding comment

* Use storage name when looking up column metadata for divisions

* Compute divisions column index on the row group of the first piece, rather than on the schema.
These differ in the case of partitioned datasets

* Get numpy datatype from the pandas metadata if available, otherwise get it from parquet schema as before

* Add `infer_divisions` kwarg to read_parquet function

* Updated changelog

* Fixes for pyarrow=0.8

* flake8

* Parquet testing updates so that more tests have 10+ parquet pieces
This ensures that we're testing natural sorting

* Refactor natural sorting logic
  - Move nat_sort_key into dask.utils
  - Natural sort paths resulting from globstring patterns before passing lists of paths to the engines
  - Only natural sort pyarrow parquet pieces if a single input path resulted in multiple pieces

* Compute division column index for each pyarrow parquet piece

* Move LooseVersion import to top of dataframe/io/parquet.py

* Don't assume unix file separators

* Refactor _to_ns to use a lookup table

* Rename nat_sort_key to natural_sort_key and add wikipedia reference

* Remove unnecessary  check_{engine} guards

* Remove unnecessary check_pa_divs assignment

* Rename check_divs -> should_check_divs

* flake8

* Fix natural_sort_key doctest

* Python 2 fix. str -> string_types
This was deprecated in 0.16.0. Since we've already had a major release
since then, remove the deprecation.
This was causing dask.distributed tests to fail
* Fix nonempty_index for CategoricalIndex

* Handle duplicate data for cat MultiIndex in CategoricalIndex
We apparently forgot to mention this except in the header.
This integrates this message into a broader message about being part
of the PyData ecosystem.
- Support `axis` in `topk`
- Add `argtopk`
- Support `split_every` in `topk`
* Remove support for numpy < 1.11.0

Downstream libraries have bumped the minimum numpy version they support,
and we should too.

* Fix failing __array_ufunc__ test

Numpy `out` parameter with dask dataframes requires numpy >= 1.13
* Fixes typo in array creation docs

* Renames variable in for loop
* Implement gradient for Dask Arrays

Creates the equivalent of NumPy's `gradient` function for Dask Arrays.
Simply wraps the NumPy `gradient` function using `map_overlap` to allow
`gradient` to computed on each chunk with a halo.

Currently only supports uniform spacings specified by concrete scalars.
Though this could be relaxed in the future if there is demand.

* Expose `gradient` to the top-level Dask Array API

* Test Dask Array's `gradient` against NumPy's

Make sure that Dask Array's `gradient` gets comparable answers to
NumPy's `gradient` even across chunks.

* Document `gradient` in the Dask Array API docs

* Note Dask Array's `gradient` in the changelog
)

* Add newline before `return` in `coerce_boundary`

* Use `get` on `depth` in `add_dummy_padding`

As `depth` may not be defined for all axes, use `get` to retrieve the
value defaulting to `0` when not specified.

* Test map_overlap on non-trivial depth and boundary

Includes a test where only the non-trivial parts of the depth and
boundary are specified.

* Note `map_overlap` takes partial depth/boundary
* In agg, reference result.columns only if results is a DataFrame
…k#3450)

On Debian the Python executable is named python3, so the test fails
because it tries to run the Python 2 interpreter.

Using sys.executable should be the safest option as the test server
will be launched using the same interpreter that the test suite is
running under.
This makes it easier to quickly create a non-trival dataframe for
testing or training.

These values are what we use by default in dask-examples
* Adds check for 0-dimensional numpy array
* Adds string subclass check to dataframe.__getitem__

* Switch to using dask.compat string_types

* Adds changelog entry
* Add dask-jobqueue and dask-drmaa links to HPC setup docs

* [skip ci] add realistic example
Fixes dask#3464 , a rgression which found metadata in parquet pieces
before actually reading, but did not pass on the filesystem
@henriqueribeiro
henriqueribeiro merged commit 501eb90 into feature/_frame-shape May 3, 2018
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.