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

ci: fix analytical engine CI #3996

Merged
merged 9 commits into from
Jul 3, 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
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,29 @@ jobs:

- name: Build Wheel Package
run: |
# change the version for nightly release
# 0.15.0 -> 0.15.0a20220808
time=$(date "+%Y%m%d")
version=$(cat ${GITHUB_WORKSPACE}/VERSION)
if [[ "${{ GITHUB.REF }}" == "refs/heads/main" ]]; then
echo "${version}a${time}" > ${GITHUB_WORKSPACE}/VERSION;
fi

cd ${GITHUB_WORKSPACE}/python
python3 setup_gsctl.py bdist_wheel
# move wheels into one folder to upload to PyPI
mkdir ${GITHUB_WORKSPACE}/upload_pypi
mv ${GITHUB_WORKSPACE}/python/dist/*.whl ${GITHUB_WORKSPACE}/upload_pypi/
cd ${GITHUB_WORKSPACE}
tar -zcf gsctl.tar.gz ${GITHUB_WORKSPACE}/upload_pypi/*.whl

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: gsctl-${{ github.sha }}
path: |
gsctl.tar.gz
retention-days: 5

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.2
Expand Down
13 changes: 9 additions & 4 deletions analytical_engine/core/io/property_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,24 @@ inline void SplitTable(const std::string& data, int num,
inline void DistributeChunk(const rpc::Chunk& chunk, int num,
std::vector<rpc::Chunk>& distributed_chunk) {
distributed_chunk.resize(num);
const auto& attrs = chunk.attr();
std::string protocol = attrs.at(rpc::PROTOCOL).s();
// Copy to a map to avoid the undefined reference issue (inside
// protobuf's internal code: Map::at()') on MacOS
std::map<int, rpc::AttrValue> params;
for (auto& pair : chunk.attr()) {
params[pair.first] = pair.second;
}
std::string protocol = params.at(rpc::PROTOCOL).s();
std::vector<std::string> distributed_values;
const std::string& data = chunk.buffer();
if (protocol == "pandas") {
SplitTable(data, num, distributed_values);
} else {
distributed_values.resize(num, attrs.at(rpc::SOURCE).s());
distributed_values.resize(num, params.at(rpc::SOURCE).s());
}
for (int i = 0; i < num; ++i) {
distributed_chunk[i].set_buffer(std::move(distributed_values[i]));
auto* attr = distributed_chunk[i].mutable_attr();
for (auto& pair : attrs) {
for (auto& pair : params) {
(*attr)[pair.first].CopyFrom(pair.second);
}
}
Expand Down
1 change: 1 addition & 0 deletions k8s/utils/precompile.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ def parse_sys_args():
return parser.parse_args()

WORKSPACE = Path(os.path.join("/", tempfile.gettempprefix(), "gs", "builtin")).resolve()
ENABLE_JAVA_SDK = "OFF"

if __name__ == "__main__":
args = parse_sys_args()
Expand Down
Loading