Skip to content

Commit

Permalink
[ML] Deprecate machine learning on Intel macOS (#104087)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
droberts195 authored Jan 16, 2024
1 parent 51caf17 commit 8e1f214
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/changelog/104087.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pr: 104087
summary: Deprecate machine learning on Intel macOS
area: Machine Learning
type: deprecation
issues: []
deprecation:
title: Deprecate machine learning on Intel macOS
area: Packaging
details: The machine learning plugin will be permanently disabled on macOS x86_64
in new minor versions released from December 2024 onwards.
impact: To continue to use machine learning functionality on macOS please switch to
an arm64 machine (Apple silicon). Alternatively, it will still be possible to run
Elasticsearch with machine learning enabled in a Docker container on macOS x86_64.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.breaker.CircuitBreaker;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.logging.DeprecationCategory;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.common.settings.ClusterSettings;
import org.elasticsearch.common.settings.IndexScopedSettings;
import org.elasticsearch.common.settings.Setting;
Expand Down Expand Up @@ -68,6 +70,7 @@
import org.elasticsearch.plugins.IngestPlugin;
import org.elasticsearch.plugins.MapperPlugin;
import org.elasticsearch.plugins.PersistentTaskPlugin;
import org.elasticsearch.plugins.Platforms;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.plugins.SearchPlugin;
import org.elasticsearch.plugins.ShutdownAwarePlugin;
Expand Down Expand Up @@ -753,6 +756,7 @@ public void loadExtensions(ExtensionLoader loader) {
public static final int MAX_LOW_PRIORITY_MODELS_PER_NODE = 100;

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

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

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

machineLearningExtension.get().configure(environment.settings());

this.mlUpgradeModeActionFilter.set(new MlUpgradeModeActionFilter(clusterService));
Expand Down

0 comments on commit 8e1f214

Please sign in to comment.