Skip to content

Commit

Permalink
REL: Use legate/cupynumeric 24.11 packages and advertise 24.11.00 (#6)
Browse files Browse the repository at this point in the history
This changes the VERSION file only. The actual release version will
happen by additionally tagging the merge commit once done.

Signed-off-by: Sebastian Berg <[email protected]>
  • Loading branch information
seberg authored Nov 26, 2024
1 parent 6334781 commit 9fde799
Show file tree
Hide file tree
Showing 19 changed files with 58 additions and 52 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/conda-python-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
build:
strategy:
fail-fast: false
# available legate-core and cunumeric packages:
# available legate and cupynumeric packages:
#
# * https://anaconda.org/legate/legate-core
# * https://anaconda.org/legate/cunumeric
# * https://anaconda.org/legate/legate
# * https://anaconda.org/legate/cupynumeric
#
# Valid set of RAPIDS ci-conda image tags:
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- conda-python-build
strategy:
fail-fast: false
# As of the last time this was updated, legate-core / cunumeric packages were published for only:
# As of the last time this was updated, legate-core / cupynumeric packages were published for only:
#
# * architectures: amd64 only
# * CUDA: >=12.2
Expand Down
45 changes: 23 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ In the future, we plan to introduce a high-level pure Python package that implem
You can install `legate-dataframe` packages from the [conda legate channel](https://anaconda.org/legate/)
using
```bash
conda -c legate/label/experimental -c rapidsai -c conda-forge legate-dataframe
conda -c legate -c rapidsai -c conda-forge legate-dataframe
```
To include development releases add the `legate/label/experimental` channel.

## Build

Legate-dataframe uses the Legate C++ API from Legate-core and cuNumeric.
cuNumeric is only used in Python tests and examples so it isn't strictly necessary.
Legate-dataframe uses the Legate C++ API from Legate-core and cuPyNumeric.
cuPyNumeric is only used in Python tests and examples so it isn't strictly necessary.

The current tested versions are legate and cuNumeric 25.01 nightlies available from
The current tested versions are legate and cuPyNumeric 24.11 release available from
the [conda legate channel](https://anaconda.org/legate/).

### Legate-dataframe
Expand All @@ -36,28 +37,28 @@ Then we can build, install, and test the project:
```

## Feature Status
| Feature | Status | Limitations
|-------------------------------------|:----------------------:|----------------------------------|
| Copy to/from cuDF DataFrame | :white_check_mark: | |
| Parquet read & write | :white_check_mark: | |
| CSV read & write | :white_check_mark: | |
| Zero-copy to/from cuNumeric arrays | :white_check_mark: | |
| Hash based inner join | :white_check_mark: | |
| Hash based left join | :white_check_mark: | |
| Hash based full/outer join | :white_check_mark: | |
| GroupBy Aggregation | :white_check_mark: | Basic aggs. like SUM and NUNIQUE |
| Numeric data types | :white_check_mark: | |
| Datetime data types | :white_check_mark: | |
| String data types | :white_check_mark: | |
| Null masked columns | :white_check_mark: | |
| Feature | Status | Limitations
|--------------------------------------|:----------------------:|----------------------------------|
| Copy to/from cuDF DataFrame | :white_check_mark: | |
| Parquet read & write | :white_check_mark: | |
| CSV read & write | :white_check_mark: | |
| Zero-copy to/from cuPyNumeric arrays | :white_check_mark: | |
| Hash based inner join | :white_check_mark: | |
| Hash based left join | :white_check_mark: | |
| Hash based full/outer join | :white_check_mark: | |
| GroupBy Aggregation | :white_check_mark: | Basic aggs. like SUM and NUNIQUE |
| Numeric data types | :white_check_mark: | |
| Datetime data types | :white_check_mark: | |
| String data types | :white_check_mark: | |
| Null masked columns | :white_check_mark: | |

## Example

### Python
```python
import tempfile
import cudf
import cunumeric
import cupynumeric
from legate.core import get_legate_runtime
from legate_dataframe import LogicalColumn, LogicalTable
from legate_dataframe.lib.parquet import parquet_read, parquet_write
Expand Down Expand Up @@ -87,9 +88,9 @@ def main(tmpdir):
tbl2 = parquet_read(glob_string=f"{tmpdir}/*.parquet")

# LogicalColumn implements the `__legate_data_interface__` interface,
# which makes it possible for other Legate libraries, such as cuNumeric,
# which makes it possible for other Legate libraries, such as cuPyNumeric,
# to operate on columns seamlessly.
ary = cunumeric.add(tbl1["a"], tbl2["b"])
ary = cupynumeric.add(tbl1["a"], tbl2["b"])
assert ary.sum() == 0
ary[:] = [4, 3, 2, 1]

Expand Down Expand Up @@ -120,7 +121,7 @@ if __name__ == "__main__":

int main(int argc, char** argv)
{
// First we initialize Legate and cuNumeric
// First we initialize Legate and cuPyNumeric
int32_t errcode = legate::start(argc, argv);
if (errcode != 0) {
throw std::runtime_error("legate::start() errorcode: " + std::to_string(errcode));
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.09.00
24.11.00
1 change: 1 addition & 0 deletions ci/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ CONDA_OVERRIDE_CUDA="${RAPIDS_CUDA_VERSION}" \
LEGATEDATAFRAME_PACKAGE_VERSION="$(head -1 ./VERSION)" \
rapids-conda-retry mambabuild \
--channel legate \
--channel legate/label/rc \
--channel legate/label/experimental \
--channel rapidsai \
--channel conda-forge \
Expand Down
1 change: 1 addition & 0 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ rapids-mamba-retry install \
--override-channels \
--channel "${RAPIDS_LOCAL_CONDA_CHANNEL}" \
--channel legate \
--channel legate/label/rc \
--channel legate/label/experimental \
--channel rapidsai \
--channel conda-forge \
Expand Down
1 change: 1 addition & 0 deletions ci/test_all_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ rapids-mamba-retry install \
--name test-env \
--channel "${RAPIDS_LOCAL_CONDA_CHANNEL}" \
--channel legate \
--channel legate/label/rc \
--channel legate/label/experimental \
--channel rapidsai \
--channel conda-forge \
Expand Down
5 changes: 3 additions & 2 deletions conda/environments/all_cuda-124_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
channels:
- rapidsai
- legate
- legate/label/rc
- legate/label/experimental
- conda-forge
- nvidia
Expand All @@ -17,14 +18,14 @@ dependencies:
- cuda-sanitizer-api
- cuda-version=12.4
- cudf==24.08.*,>=0.0.0a0
- cunumeric==25.01.*,>=0.0.0.dev0
- cupy>=12.0.0
- cupynumeric==24.11.*
- cxx-compiler
- cython>=3.0.0
- dask-cuda==24.08.*
- dask-cudf==24.08.*
- gcc_linux-64=11.*
- legate==25.01.*,>=0.0.0.dev0
- legate==24.11.01
- libcudf==24.08.*,>=0.0.0a0
- librmm==24.08.*,>=0.0.0a0
- make
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/legate-dataframe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cuda11_compiler:
- nvcc

legate_version:
- "=25.01.*,>=0.0.0.dev0"
- "=24.11.01"

rapids_version:
- =24.08.*
8 changes: 4 additions & 4 deletions conda/recipes/legate-dataframe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ build:
- {{ compiler('cuda') }}
- cuda-python
- cuda-cudart-dev
- cunumeric # only a build dependency to help resolver
- cupynumeric # only a build dependency to help resolver

requirements:
build:
Expand All @@ -58,9 +58,9 @@ requirements:
- cuda-python >=12.0,<13.0a0,<=12.6.0
- legate {{ legate_version }}
# Only to ensure a nightly legate version we pick up
# is compatible with an existing cunumeric version.
# is compatible with an existing cupynumeric version.
# (may also stabilize not using debug/sanitizer builds)
- cunumeric
- cupynumeric
- cython>=3.0.0
- python
- pip
Expand All @@ -78,7 +78,7 @@ requirements:
# Relying on run_exports from legate to pin an appropriate range of versions.
#
# legate uses {{ pin_subpackage(name, min_pin="x.x.x", max_pin="x.x.x") }}, which means
# that if legate-dataframe builds against, say, legate=24.09.0 and then a legate-core=24.09.1 is
# that if legate-dataframe builds against, say, legate=24.09.0 and then a legate=24.09.1 is
# released, a new legate-dataframe would be required.
- legate
- numpy >=1.23,<3.0.0a0
Expand Down
5 changes: 3 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ files:
channels:
- rapidsai
- legate
- legate/label/rc
- legate/label/experimental
- conda-forge
- nvidia
Expand Down Expand Up @@ -153,7 +154,7 @@ dependencies:
common:
- output_types: [conda, requirements, pyproject]
packages:
- cunumeric==25.01.*,>=0.0.0.dev0
- cupynumeric==24.11.*
- pytest>=7.0
- dask-cuda==24.08.*
- dask-cudf==24.08.*
Expand Down Expand Up @@ -195,7 +196,7 @@ dependencies:
common:
- output_types: [conda, pyproject, requirements]
packages:
- legate==25.01.*,>=0.0.0.dev0
- legate==24.11.01

depends_on_libcudf:
common:
Expand Down
4 changes: 2 additions & 2 deletions python/benchmarks/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def f():

@contextlib.contextmanager
def run_legate(args):
import cunumeric
import cupynumeric
from legate.core import get_legate_runtime

from legate_dataframe import LogicalColumn, LogicalTable
Expand All @@ -97,7 +97,7 @@ def blocking_timing() -> float:
return time.perf_counter()

def create_table(args, name: str) -> LogicalTable:
key, data = create_key_and_data(args, module=cunumeric)
key, data = create_key_and_data(args, module=cupynumeric)
return LogicalTable(
columns=(LogicalColumn(key.astype(args.dtype)), LogicalColumn(data)),
column_names=(f"{name}-key", f"{name}-data"),
Expand Down
6 changes: 3 additions & 3 deletions python/examples/hello_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import tempfile

import cudf
import cunumeric
import cupynumeric
from legate.core import get_legate_runtime

from legate_dataframe import LogicalColumn, LogicalTable
Expand Down Expand Up @@ -41,9 +41,9 @@ def main(tmpdir):
tbl2 = parquet_read(glob_string=f"{tmpdir}/*.parquet")

# LogicalColumn implements the `__legate_data_interface__` interface,
# which makes it possible for other Legate libraries, such as cuNumeric,
# which makes it possible for other Legate libraries, such as cuPyNumeric,
# to operate on columns seamlessly.
ary = cunumeric.add(tbl1["a"], tbl2["b"])
ary = cupynumeric.add(tbl1["a"], tbl2["b"])
assert ary.sum() == 0
ary[:] = [4, 3, 2, 1]

Expand Down
4 changes: 2 additions & 2 deletions python/legate_dataframe/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def as_cudf_dataframe(obj: Any, default_column_name: str = "data") -> cudf.DataF
default_column_name
The column name to use if no name are defined. This is useful when
comparing `cudf.DataFrame` to legate objects that doesn't have column
names such as `legate_dataframe.Column` or `cunumeric.NDArray`.
names such as `legate_dataframe.Column` or `cupynumeric.NDArray`.
Returns
-------
Expand Down Expand Up @@ -70,7 +70,7 @@ def assert_frame_equal(
default_column_name
The column name to use if no name are defined. This is useful when
comparing `cudf.DataFrame` to legate objects that doesn't have column
names such as `legate_dataframe.Column` or `cunumeric.NDArray`.
names such as `legate_dataframe.Column` or `cupynumeric.NDArray`.
kwargs
Extra keyword arguments that are passthrough as-is to
`cudf.testing.assert_frame_equal`
Expand Down
2 changes: 1 addition & 1 deletion python/legate_dataframe/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _track_provenance(func):
All calls which directly launch tasks should be decorated.
This e.g. adds Python line number to profiling results. Similar to
cunumeric, we use `functools.update_wrapper` which the legate core
cupynumeric, we use `functools.update_wrapper` which the legate core
version did not at the time of writing.
"""
wrapped_func = _track_provenance_legate()(func)
Expand Down
6 changes: 3 additions & 3 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ license = {text = "Apache 2.0"}
requires-python = ">=3.10"
dependencies = [
"cudf==24.08.*,>=0.0.0a0",
"legate==25.01.*,>=0.0.0.dev0",
"legate==24.11.01",
"numpy >=1.23,<3.0.0a0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.

Expand All @@ -32,7 +32,7 @@ License = "https://github.com/rapidsai/legate-dataframe/blob/main/LICENSE"

[project.optional-dependencies]
test = [
"cunumeric==25.01.*,>=0.0.0.dev0",
"cupynumeric==24.11.*",
"dask-cuda==24.08.*",
"dask-cudf==24.08.*",
"pytest>=7.0",
Expand All @@ -42,7 +42,7 @@ test = [
requires = [
"cmake>=3.26.4,!=3.30.0",
"cython>=3.0.0",
"legate==25.01.*,>=0.0.0.dev0",
"legate==24.11.01",
"libcudf==24.08.*,>=0.0.0a0",
"ninja",
"scikit-build>=0.18.0",
Expand Down
4 changes: 2 additions & 2 deletions python/tests/test_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
def test_join(tmp_path, monkeypatch):
"""Test examples/hello_world.py"""

# join.py imports cunumeric
pytest.importorskip("cunumeric")
# join.py imports cupynumeric
pytest.importorskip("cupynumeric")

monkeypatch.syspath_prepend(str(benchmarks_path))
args = SimpleNamespace()
Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_cunumeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from legate_dataframe import LogicalColumn

num = pytest.importorskip("cunumeric")
num = pytest.importorskip("cupynumeric")


def test_column_round_trip():
Expand Down
4 changes: 2 additions & 2 deletions python/tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
def test_hello_world(tmp_path, monkeypatch):
"""Test examples/hello_world.py"""

# hello_world.py imports cunumeric
pytest.importorskip("cunumeric")
# hello_world.py imports cupynumeric
pytest.importorskip("cupynumeric")

monkeypatch.syspath_prepend(str(examples_path))
import_module("hello_world").main(tmp_path)

0 comments on commit 9fde799

Please sign in to comment.