Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/build-and-push-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
- component-name: torchtune-trainer
dockerfile: cmd/trainers/torchtune/Dockerfile
platforms: linux/amd64,linux/arm64
- component-name: data-cache
dockerfile: cmd/data_cache/Dockerfile
platforms: linux/amd64,linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/test-rust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Unit and Integration Test - Rust

on:
- pull_request

jobs:
test:
name: Test
runs-on: ubuntu-latest
if: ${{ github.repository == 'kubeflow/trainer' }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- name: Cache Rust dependencies
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This would speed up builds by caching rust dependencies using cargo.lock for runs in the repo

uses: Swatinem/rust-cache@v2
with:
workspaces: "pkg/data_cache"

- name: Run Rust unit tests
run: make test-rust
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ test-python-integration: ## Run Python integration test.

PYTHONPATH=$(PROJECT_DIR) pytest ./test/integration/initializers

.PHONY: test-rust
test-rust: ## Run Rust unit test.
cargo test --lib --bins --manifest-path ./pkg/data_cache/Cargo.toml

.PHONY: test-e2e-setup-cluster
test-e2e-setup-cluster: kind ## Setup Kind cluster for e2e test.
KIND=$(KIND) K8S_VERSION=$(K8S_VERSION) ./hack/e2e-setup-cluster.sh
Expand Down
125 changes: 54 additions & 71 deletions pkg/data_cache/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/data_cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ edition = "2024"

[dependencies]
tracing = "0.1.41"
tracing-subscriber = "0.3"
tokio = "1.41.1"
tracing-subscriber = "0.3.20"
tokio = "1.44.2"
datafusion = "47.0.0"
arrow = "55.0.0"
arrow-schema = "55.0.0"
Expand Down
2 changes: 1 addition & 1 deletion pkg/data_cache/src/head/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ impl ExecutionPlan for DataFileTableExec {
&self.plan_properties
}

fn children(&self) -> Vec<&Arc<(dyn ExecutionPlan + 'static)>> {
fn children(&self) -> Vec<&Arc<dyn ExecutionPlan + 'static>> {
vec![]
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/data_cache/src/head/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl ExecutionPlan for DistributedWriterExec {
&self.plan_properties
}

fn children(&self) -> Vec<&Arc<(dyn ExecutionPlan + 'static)>> {
fn children(&self) -> Vec<&Arc<dyn ExecutionPlan + 'static>> {
vec![]
}

Expand Down
Loading
Loading