Skip to content

Commit 8e1f214

Browse files
author
David Roberts
authored
[ML] Deprecate machine learning on Intel macOS (#104087)
PyTorch is no longer going to provide macOS x86_64 builds after version 2.2. This doesn't instantly affect us, as we build PyTorch from source ourselves and they've said that they will not deliberately break macOS x86_64. They just won't build or test on that platform themselves. As a result it's inevitable that we'll have to make some tweaks to the PyTorch code to get it to build, and as the years go by it will become harder and harder to make the code compile on an unsupported platform. Since PyTorch is such a critical component of Elastic ML we won't be able to keep it running on macOS x86_64 for more than a few releases after PyTorch drops support. This change gives notice of our intentions.
1 parent 51caf17 commit 8e1f214

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

docs/changelog/104087.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
pr: 104087
2+
summary: Deprecate machine learning on Intel macOS
3+
area: Machine Learning
4+
type: deprecation
5+
issues: []
6+
deprecation:
7+
title: Deprecate machine learning on Intel macOS
8+
area: Packaging
9+
details: The machine learning plugin will be permanently disabled on macOS x86_64
10+
in new minor versions released from December 2024 onwards.
11+
impact: To continue to use machine learning functionality on macOS please switch to
12+
an arm64 machine (Apple silicon). Alternatively, it will still be possible to run
13+
Elasticsearch with machine learning enabled in a Docker container on macOS x86_64.

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MachineLearning.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
import org.elasticsearch.cluster.service.ClusterService;
3333
import org.elasticsearch.common.breaker.CircuitBreaker;
3434
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
35+
import org.elasticsearch.common.logging.DeprecationCategory;
36+
import org.elasticsearch.common.logging.DeprecationLogger;
3537
import org.elasticsearch.common.settings.ClusterSettings;
3638
import org.elasticsearch.common.settings.IndexScopedSettings;
3739
import org.elasticsearch.common.settings.Setting;
@@ -68,6 +70,7 @@
6870
import org.elasticsearch.plugins.IngestPlugin;
6971
import org.elasticsearch.plugins.MapperPlugin;
7072
import org.elasticsearch.plugins.PersistentTaskPlugin;
73+
import org.elasticsearch.plugins.Platforms;
7174
import org.elasticsearch.plugins.Plugin;
7275
import org.elasticsearch.plugins.SearchPlugin;
7376
import org.elasticsearch.plugins.ShutdownAwarePlugin;
@@ -753,6 +756,7 @@ public void loadExtensions(ExtensionLoader loader) {
753756
public static final int MAX_LOW_PRIORITY_MODELS_PER_NODE = 100;
754757

755758
private static final Logger logger = LogManager.getLogger(MachineLearning.class);
759+
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(MachineLearning.class);
756760

757761
private final Settings settings;
758762
private final boolean enabled;
@@ -919,6 +923,15 @@ public Collection<?> createComponents(PluginServices services) {
919923
return List.of(new JobManagerHolder(), new MachineLearningExtensionHolder());
920924
}
921925

926+
if ("darwin-x86_64".equals(Platforms.PLATFORM_NAME)) {
927+
String msg = "The machine learning plugin will be permanently disabled on macOS x86_64 in new minor versions released "
928+
+ "from December 2024 onwards. To continue to use machine learning functionality on macOS please switch to an arm64 "
929+
+ "machine (Apple silicon). Alternatively, it will still be possible to run Elasticsearch with machine learning "
930+
+ "enabled in a Docker container on macOS x86_64.";
931+
logger.warn(msg);
932+
deprecationLogger.warn(DeprecationCategory.PLUGINS, "ml-darwin-x86_64", msg);
933+
}
934+
922935
machineLearningExtension.get().configure(environment.settings());
923936

924937
this.mlUpgradeModeActionFilter.set(new MlUpgradeModeActionFilter(clusterService));

0 commit comments

Comments
 (0)