Skip to content

Commit

Permalink
ci: fix analytical engine CI (#3996)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidongze0629 authored Jul 3, 2024
1 parent d5760e4 commit a662886
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
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/[email protected]
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

0 comments on commit a662886

Please sign in to comment.