Skip to content

Commit 491ed9e

Browse files
authored
Patch rust release. (#3069)
* Patch rust release. * Trying to remove the rust-toolchain hardcoded in action. * Upgrade rust toolchain. * Put back the toolchain ? * Fix neuron dockerfile. * Move to the proper version of Rust. * 1.85 since the GH action doesn't respect the override. * Typo. * Fixing the github action. * Fixing docker llamacpp. * Fixing the github action. * Update clippy.
1 parent 144d99c commit 491ed9e

File tree

10 files changed

+14
-19
lines changed

10 files changed

+14
-19
lines changed

.github/workflows/tests.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,14 @@ jobs:
2020
runs-on:
2121
group: aws-highmemory-32-plus-priv
2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
2424
- name: Set up Python
2525
uses: actions/setup-python@v4
2626
id: python
2727
with:
2828
python-version: 3.11
29-
- name: Install Rust
30-
uses: actions-rs/toolchain@v1
29+
- uses: dtolnay/[email protected]
3130
with:
32-
# Released on: 02 May, 2024
33-
# https://releases.rs/docs/1.78.0/
34-
toolchain: 1.84.0
35-
override: true
3631
components: rustfmt, clippy
3732
- name: Install Protoc
3833
uses: arduino/setup-protoc@v1

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Rust builder
2-
FROM lukemathwalker/cargo-chef:latest-rust-1.84.0 AS chef
2+
FROM lukemathwalker/cargo-chef:latest-rust-1.85.0 AS chef
33
WORKDIR /usr/src
44

55
ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

Dockerfile_amd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Rust builder
2-
FROM lukemathwalker/cargo-chef:latest-rust-1.84.0 AS chef
2+
FROM lukemathwalker/cargo-chef:latest-rust-1.85.0 AS chef
33
WORKDIR /usr/src
44

55
ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

Dockerfile_gaudi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG HABANA_VERSION
33
ARG PYTORCH_VERSION
44

55
# Rust builder
6-
FROM lukemathwalker/cargo-chef:latest-rust-1.80 AS chef
6+
FROM lukemathwalker/cargo-chef:latest-rust-1.85.0 AS chef
77
WORKDIR /usr/src
88

99
ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

Dockerfile_intel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG PLATFORM=xpu
22

3-
FROM lukemathwalker/cargo-chef:latest-rust-1.84.0 AS chef
3+
FROM lukemathwalker/cargo-chef:latest-rust-1.85.0 AS chef
44
WORKDIR /usr/src
55

66
ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

Dockerfile_llamacpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ RUN tar -xzf ${llamacpp_version}.tar.gz \
3636

3737
WORKDIR /app
3838
COPY rust-toolchain.toml rust-toolchain.toml
39-
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain none
39+
RUN curl -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain 1.85.0 --profile minimal -y
4040
ENV PATH="/root/.cargo/bin:$PATH"
4141
RUN cargo install cargo-chef --locked
4242

Dockerfile_trtllm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ARG actions_runtime_token
7171

7272
# Install Rust
7373
ENV PATH="/root/.cargo/bin:$PATH"
74-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y && \
74+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.85.0 --profile minimal -y && \
7575
chmod -R a+w /root/.rustup && \
7676
chmod -R a+w /root/.cargo && \
7777
cargo install sccache --locked

router/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ impl ChatRequest {
947947
let stop = stop.unwrap_or_default();
948948
// enable greedy only when temperature is 0
949949
let (do_sample, temperature) = match temperature {
950-
Some(temperature) if temperature == 0.0 => (false, None),
950+
Some(0.0) => (false, None),
951951
other => (true, other),
952952
};
953953

@@ -1010,7 +1010,7 @@ impl ChatRequest {
10101010
seed,
10111011
top_n_tokens: top_logprobs,
10121012
grammar,
1013-
adapter_id: model.filter(|m| *m != "tgi").map(String::from),
1013+
adapter_id: model.filter(|m| *m != "tgi"),
10141014
},
10151015
},
10161016
using_tools,

router/src/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ pub(crate) async fn completions(
723723
let stop = stop.unwrap_or_default();
724724
// enable greedy only when temperature is 0
725725
let (do_sample, temperature) = match temperature {
726-
Some(temperature) if temperature == 0.0 => (false, None),
726+
Some(0.0) => (false, None),
727727
other => (true, other),
728728
};
729729

rust-toolchain.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
# Released on: June 13, 2024
3-
# https://releases.rs/docs/1.79.0/
4-
channel = "1.84.1"
2+
# Released on: 30 January, 2025
3+
# https://releases.rs/docs/1.84.1/
4+
channel = "1.85.0"
55
components = ["rustfmt", "clippy"]

0 commit comments

Comments
 (0)