Skip to content

Commit

Permalink
Merge branch 'branch-24.06' into 15678
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar authored May 7, 2024
2 parents d408c23 + 2e81857 commit abc7782
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 23 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude: |
Expand All @@ -24,11 +24,11 @@ repos:
files: python/.*
types_or: [python, cython, pyi]
- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.16.0
rev: v0.16.2
hooks:
- id: cython-lint
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.3.0'
rev: 'v1.10.0'
hooks:
- id: mypy
additional_dependencies: [types-cachetools]
Expand All @@ -39,7 +39,7 @@ repos:
"python/dask_cudf/dask_cudf"]
pass_filenames: false
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.1
rev: 1.8.5
hooks:
- id: nbqa-isort
# Use the cudf_kafka isort orderings in notebooks so that dask
Expand All @@ -52,7 +52,7 @@ repos:
types_or: [c, c++, cuda]
args: ["-fallback-style=none", "-style=file", "-i"]
- repo: https://github.com/sirosen/texthooks
rev: 0.6.3
rev: 0.6.6
hooks:
- id: fix-smartquotes
exclude: |
Expand Down Expand Up @@ -124,12 +124,12 @@ repos:
^CHANGELOG.md$
)
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.8.0
rev: v1.13.4
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
rev: v0.4.3
hooks:
- id: ruff
files: python/.*$
Expand Down
6 changes: 2 additions & 4 deletions ci/cudf_pandas_scripts/pandas-tests/diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ MAIN_ARTIFACT=$(rapids-s3-path)cuda12_$(arch)_py${PY_VER}.main-${RAPIDS_FULL_VER
PR_ARTIFACT=$(rapids-s3-path)cuda12_$(arch)_py${PY_VER}.pr-${RAPIDS_FULL_VERSION}-results.json

rapids-logger "Fetching latest available results from nightly"
aws s3api list-objects-v2 --bucket rapids-downloads --prefix "nightly/" --query "sort_by(Contents[?ends_with(Key, '_py${PY_VER}.main-${RAPIDS_FULL_VERSION}-results.json')], &LastModified)[::-1].[Key]" --output text > s3_output.txt

read -r COMPARE_ENV < s3_output.txt
export COMPARE_ENV
aws s3api list-objects-v2 --bucket rapids-downloads --prefix "nightly/" --query "sort_by(Contents[?ends_with(Key, '_py${PY_VER}.main-${RAPIDS_FULL_VERSION}-results.json')], &LastModified)[::].[Key]" --output text | tee s3_output.txt
COMPARE_ENV=$(tail -n 1 s3_output.txt)
rapids-logger "Latest available results from nightly: ${COMPARE_ENV}"

aws s3 cp "s3://rapids-downloads/${COMPARE_ENV}" main-results.json
Expand Down
16 changes: 8 additions & 8 deletions cpp/src/strings/combine/join.cu
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,16 @@ std::unique_ptr<column> join_strings(strings_column_view const& input,
return std::move(*chars_data);
}();

// API returns a single output row which cannot exceed row limit(max of size_type).
CUDF_EXPECTS(chars.size() < static_cast<std::size_t>(std::numeric_limits<size_type>::max()),
"The output exceeds the row size limit",
std::overflow_error);

// build the offsets: single string output has offsets [0,chars-size]
auto offsets_column = [&] {
if (chars.size() < static_cast<std::size_t>(get_offset64_threshold())) {
auto offsets32 = cudf::detail::make_device_uvector_async(
std::vector<int32_t>({0, static_cast<int32_t>(chars.size())}), stream, mr);
return std::make_unique<column>(std::move(offsets32), rmm::device_buffer{}, 0);
}
auto offsets64 = cudf::detail::make_device_uvector_async(
std::vector<int64_t>({0L, static_cast<int64_t>(chars.size())}), stream, mr);
return std::make_unique<column>(std::move(offsets64), rmm::device_buffer{}, 0);
auto offsets = cudf::detail::make_device_uvector_async(
std::vector<size_type>({0, static_cast<size_type>(chars.size())}), stream, mr);
return std::make_unique<column>(std::move(offsets), rmm::device_buffer{}, 0);
}();

// build the null mask: only one output row so it is either all-valid or all-null
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/column/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -2211,7 +2211,7 @@ def _mask_from_cuda_array_interface_desc(obj, cai_mask) -> Buffer:
raise NotImplementedError(f"Cannot infer mask from typestr {typestr}")


def serialize_columns(columns) -> Tuple[List[dict], List]:
def serialize_columns(columns: list[ColumnBase]) -> Tuple[List[dict], List]:
"""
Return the headers and frames resulting
from serializing a list of Column
Expand Down
5 changes: 2 additions & 3 deletions python/cudf/cudf/pandas/fast_slow_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ def _replace_closurevars(
f: types.FunctionType,
attribute_name: Literal["_fsproxy_slow", "_fsproxy_fast"],
seen: Set[int],
) -> types.FunctionType:
) -> Callable[..., Any]:
"""
Return a copy of `f` with its closure variables replaced with
their corresponding slow (or fast) types.
Expand Down Expand Up @@ -1133,12 +1133,11 @@ def _replace_closurevars(
argdefs=f.__defaults__,
closure=g_closure,
)
g = functools.update_wrapper(
return functools.update_wrapper(
g,
f,
assigned=functools.WRAPPER_ASSIGNMENTS + ("__kwdefaults__",),
)
return g


_SPECIAL_METHODS: Set[str] = {
Expand Down

0 comments on commit abc7782

Please sign in to comment.