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.
This commit is contained in:
Nicolas Patry 2025-03-04 18:07:33 +01:00 committed by GitHub
parent 144d99c147
commit 491ed9e11d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 14 additions and 19 deletions

View File

@ -20,19 +20,14 @@ jobs:
runs-on: runs-on:
group: aws-highmemory-32-plus-priv group: aws-highmemory-32-plus-priv
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
id: python id: python
with: with:
python-version: 3.11 python-version: 3.11
- name: Install Rust - uses: dtolnay/rust-toolchain@1.85.0
uses: actions-rs/toolchain@v1
with: with:
# Released on: 02 May, 2024
# https://releases.rs/docs/1.78.0/
toolchain: 1.84.0
override: true
components: rustfmt, clippy components: rustfmt, clippy
- name: Install Protoc - name: Install Protoc
uses: arduino/setup-protoc@v1 uses: arduino/setup-protoc@v1

View File

@ -1,5 +1,5 @@
# Rust builder # Rust builder
FROM lukemathwalker/cargo-chef:latest-rust-1.84.0 AS chef FROM lukemathwalker/cargo-chef:latest-rust-1.85.0 AS chef
WORKDIR /usr/src WORKDIR /usr/src
ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

View File

@ -1,5 +1,5 @@
# Rust builder # Rust builder
FROM lukemathwalker/cargo-chef:latest-rust-1.84.0 AS chef FROM lukemathwalker/cargo-chef:latest-rust-1.85.0 AS chef
WORKDIR /usr/src WORKDIR /usr/src
ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

View File

@ -3,7 +3,7 @@ ARG HABANA_VERSION
ARG PYTORCH_VERSION ARG PYTORCH_VERSION
# Rust builder # Rust builder
FROM lukemathwalker/cargo-chef:latest-rust-1.80 AS chef FROM lukemathwalker/cargo-chef:latest-rust-1.85.0 AS chef
WORKDIR /usr/src WORKDIR /usr/src
ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

View File

@ -1,6 +1,6 @@
ARG PLATFORM=xpu ARG PLATFORM=xpu
FROM lukemathwalker/cargo-chef:latest-rust-1.84.0 AS chef FROM lukemathwalker/cargo-chef:latest-rust-1.85.0 AS chef
WORKDIR /usr/src WORKDIR /usr/src
ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

View File

@ -36,7 +36,7 @@ RUN tar -xzf ${llamacpp_version}.tar.gz \
WORKDIR /app WORKDIR /app
COPY rust-toolchain.toml rust-toolchain.toml COPY rust-toolchain.toml rust-toolchain.toml
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain none RUN curl -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain 1.85.0 --profile minimal -y
ENV PATH="/root/.cargo/bin:$PATH" ENV PATH="/root/.cargo/bin:$PATH"
RUN cargo install cargo-chef --locked RUN cargo install cargo-chef --locked

View File

@ -71,7 +71,7 @@ ARG actions_runtime_token
# Install Rust # Install Rust
ENV PATH="/root/.cargo/bin:$PATH" ENV PATH="/root/.cargo/bin:$PATH"
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y && \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.85.0 --profile minimal -y && \
chmod -R a+w /root/.rustup && \ chmod -R a+w /root/.rustup && \
chmod -R a+w /root/.cargo && \ chmod -R a+w /root/.cargo && \
cargo install sccache --locked cargo install sccache --locked

View File

@ -947,7 +947,7 @@ impl ChatRequest {
let stop = stop.unwrap_or_default(); let stop = stop.unwrap_or_default();
// enable greedy only when temperature is 0 // enable greedy only when temperature is 0
let (do_sample, temperature) = match temperature { let (do_sample, temperature) = match temperature {
Some(temperature) if temperature == 0.0 => (false, None), Some(0.0) => (false, None),
other => (true, other), other => (true, other),
}; };
@ -1010,7 +1010,7 @@ impl ChatRequest {
seed, seed,
top_n_tokens: top_logprobs, top_n_tokens: top_logprobs,
grammar, grammar,
adapter_id: model.filter(|m| *m != "tgi").map(String::from), adapter_id: model.filter(|m| *m != "tgi"),
}, },
}, },
using_tools, using_tools,

View File

@ -723,7 +723,7 @@ pub(crate) async fn completions(
let stop = stop.unwrap_or_default(); let stop = stop.unwrap_or_default();
// enable greedy only when temperature is 0 // enable greedy only when temperature is 0
let (do_sample, temperature) = match temperature { let (do_sample, temperature) = match temperature {
Some(temperature) if temperature == 0.0 => (false, None), Some(0.0) => (false, None),
other => (true, other), other => (true, other),
}; };

View File

@ -1,5 +1,5 @@
[toolchain] [toolchain]
# Released on: June 13, 2024 # Released on: 30 January, 2025
# https://releases.rs/docs/1.79.0/ # https://releases.rs/docs/1.84.1/
channel = "1.84.1" channel = "1.85.0"
components = ["rustfmt", "clippy"] components = ["rustfmt", "clippy"]