Remove preview label from --torch-backend (#14119)

This is now used in enough places that I'm comfortable committing to
maintaining it under our versioning policy.

Closes #14091.
This commit is contained in:
Charlie Marsh 2025-06-17 16:49:00 -04:00 committed by GitHub
parent 8808e67cff
commit 6c096246d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 52 additions and 51 deletions

View file

@ -388,20 +388,18 @@ pub(crate) async fn pip_compile(
}
// Determine the PyTorch backend.
let torch_backend = torch_backend.map(|mode| {
if preview.is_disabled() {
warn_user!("The `--torch-backend` setting is experimental and may change without warning. Pass `--preview` to disable this warning.");
}
TorchStrategy::from_mode(
mode,
python_platform
.map(TargetTriple::platform)
.as_ref()
.unwrap_or(interpreter.platform())
.os(),
)
}).transpose()?;
let torch_backend = torch_backend
.map(|mode| {
TorchStrategy::from_mode(
mode,
python_platform
.map(TargetTriple::platform)
.as_ref()
.unwrap_or(interpreter.platform())
.os(),
)
})
.transpose()?;
// Initialize the registry client.
let client = RegistryClientBuilder::try_from(client_builder)?

View file

@ -344,20 +344,18 @@ pub(crate) async fn pip_install(
}
// Determine the PyTorch backend.
let torch_backend = torch_backend.map(|mode| {
if preview.is_disabled() {
warn_user!("The `--torch-backend` setting is experimental and may change without warning. Pass `--preview` to disable this warning.");
}
TorchStrategy::from_mode(
mode,
python_platform
.map(TargetTriple::platform)
.as_ref()
.unwrap_or(interpreter.platform())
.os(),
)
}).transpose()?;
let torch_backend = torch_backend
.map(|mode| {
TorchStrategy::from_mode(
mode,
python_platform
.map(TargetTriple::platform)
.as_ref()
.unwrap_or(interpreter.platform())
.os(),
)
})
.transpose()?;
// Initialize the registry client.
let client = RegistryClientBuilder::try_from(client_builder)?

View file

@ -277,20 +277,18 @@ pub(crate) async fn pip_sync(
}
// Determine the PyTorch backend.
let torch_backend = torch_backend.map(|mode| {
if preview.is_disabled() {
warn_user!("The `--torch-backend` setting is experimental and may change without warning. Pass `--preview` to disable this warning.");
}
TorchStrategy::from_mode(
mode,
python_platform
.map(TargetTriple::platform)
.as_ref()
.unwrap_or(interpreter.platform())
.os(),
)
}).transpose()?;
let torch_backend = torch_backend
.map(|mode| {
TorchStrategy::from_mode(
mode,
python_platform
.map(TargetTriple::platform)
.as_ref()
.unwrap_or(interpreter.platform())
.os(),
)
})
.transpose()?;
// Initialize the registry client.
let client = RegistryClientBuilder::try_from(client_builder)?