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

Fix pyarrow version #3760

Merged
merged 18 commits into from
Jan 13, 2019
3 changes: 3 additions & 0 deletions cmake/Modules/ArrowExternalProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ set(arrow_URL https://github.com/ray-project/arrow.git)
# the patch is available at
# https://github.com/ray-project/arrow/commit/c347cd571e51723fc8512922f1b3a8e45e45b169
# See the discussion in https://github.com/apache/arrow/pull/3177
# WARNING: If the arrow version is updated, you need to also update the
# SETUPTOOLS_SCM_PRETEND_VERSION version string in the ThirdpartyToolchain.cmake
# file
set(arrow_TAG c347cd571e51723fc8512922f1b3a8e45e45b169)

set(ARROW_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/arrow-install)
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/BoostExternalProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ if (RAY_BUILD_BOOST)
BUILD_IN_SOURCE 1
BUILD_BYPRODUCTS ${Boost_BUILD_PRODUCTS}
CONFIGURE_COMMAND ./bootstrap.sh
BUILD_COMMAND bash -c "./b2 cxxflags=-fPIC cflags=-fPIC variant=release link=static --with-filesystem --with-system --with-thread --with-atomic --with-chrono --with-date_time --with-regex -j8 install --prefix=${Boost_INSTALL_PREFIX} > /dev/null"
BUILD_COMMAND bash -c "./b2 cxxflags=\"-fPIC -D_GLIBCXX_USE_CXX11_ABI=0\" cflags=-fPIC variant=release link=static --with-filesystem --with-system --with-thread --with-atomic --with-chrono --with-date_time --with-regex -j8 install --prefix=${Boost_INSTALL_PREFIX} > /dev/null"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you say what this does and what the issue was?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it caused the linker error I posted in #3744. There was a function in boost regex that used std::string and that needs the old ABI.

INSTALL_COMMAND "")
endif ()
1 change: 1 addition & 0 deletions cmake/Modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ if ("${CMAKE_RAY_LANG_PYTHON}" STREQUAL "YES")

# PYARROW_PARALLEL= , so it will add -j to pyarrow build
set(pyarrow_ENV
"SETUPTOOLS_SCM_PRETEND_VERSION=0.11.1-RAY"
Copy link
Collaborator

Choose a reason for hiding this comment

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

So does this need to be updated every time we update arrow? If so, we should include a prominent comment in

set(arrow_URL https://github.com/ray-project/arrow.git)

explaining that people need to update this code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

"PKG_CONFIG_PATH=${ARROW_LIBRARY_DIR}/pkgconfig"
"PYARROW_WITH_PLASMA=1"
"PYARROW_WITH_TENSORFLOW=1"
Expand Down
2 changes: 1 addition & 1 deletion python/build-wheel-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
$PIP_CMD install --upgrade setuptools
# Install setuptools_scm because otherwise when building the wheel for
# Python 3.6, we see an error.
$PIP_CMD install -q setuptools_scm==2.1.0
$PIP_CMD install -q setuptools_scm==3.1.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

What was the issue?

Copy link
Contributor Author

@pcmoritz pcmoritz Jan 13, 2019

Choose a reason for hiding this comment

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

On macos python 2.7 it didn't support SETUPTOOLS_SCM_PRETEND_VERSION properly (the version was just None)

# Fix the numpy version because this will be the oldest numpy version we can
# support.
$PIP_CMD install -q numpy==$NUMPY_VERSION cython==0.29.0
Expand Down
15 changes: 15 additions & 0 deletions test/runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
import random
import re
import setproctitle
import shutil
import string
import subprocess
import sys
import tempfile
import threading
import time
from collections import defaultdict, namedtuple, OrderedDict
Expand Down Expand Up @@ -2567,3 +2569,16 @@ def unique_name_3():
if not success:
raise Exception("Failed to find necessary information with "
"'ray stack'")


def test_pandas_parquet_serialization():
# Only test this if pandas is installed
pytest.importorskip("pandas")

import pandas as pd

tempdir = tempfile.mkdtemp()
filename = os.path.join(tempdir, "parquet-test")
pd.DataFrame({"col1": [0, 1], "col2": [0, 1]}).to_parquet(filename)
# Clean up
shutil.rmtree(tempdir)