Skip to content

Commit

Permalink
docs: move cognitive namespace to services namespace (#2118)
Browse files Browse the repository at this point in the history
* docs: move cognitive namespace to services namespace

* add deprecation warnings
  • Loading branch information
mhamilton723 committed Nov 1, 2023
1 parent fd00b87 commit 903dc6b
Show file tree
Hide file tree
Showing 21 changed files with 117 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,12 @@ abstract class AnomalyDetectorBase(override val uid: String) extends CognitiveSe
}
}

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
object DetectLastAnomaly extends ComplexParamsReadable[DetectLastAnomaly] with Serializable

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
class DetectLastAnomaly(override val uid: String) extends AnomalyDetectorBase(uid) with SynapseMLLogging {
logClass(FeatureNames.AiServices.Anomaly)

Expand All @@ -162,8 +166,12 @@ class DetectLastAnomaly(override val uid: String) extends AnomalyDetectorBase(ui

}

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
object DetectAnomalies extends ComplexParamsReadable[DetectAnomalies] with Serializable

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
class DetectAnomalies(override val uid: String) extends AnomalyDetectorBase(uid) with SynapseMLLogging {
logClass(FeatureNames.AiServices.Anomaly)

Expand All @@ -179,8 +187,12 @@ class DetectAnomalies(override val uid: String) extends AnomalyDetectorBase(uid)

}

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
object SimpleDetectAnomalies extends ComplexParamsReadable[SimpleDetectAnomalies] with Serializable

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
class SimpleDetectAnomalies(override val uid: String) extends AnomalyDetectorBase(uid)
with HasOutputCol with SynapseMLLogging {
logClass(FeatureNames.AiServices.Anomaly)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,12 @@ trait MADBase extends HasOutputCol with TimeConverter

}

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
object SimpleFitMultivariateAnomaly extends ComplexParamsReadable[SimpleFitMultivariateAnomaly] with Serializable

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
class SimpleFitMultivariateAnomaly(override val uid: String) extends Estimator[SimpleDetectMultivariateAnomaly]
with MADBase {
logClass(FeatureNames.AiServices.Anomaly)
Expand Down Expand Up @@ -565,8 +569,12 @@ trait DetectMAParams extends Params {
setDefault(topContributorCount -> 10)
}

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
object SimpleDetectMultivariateAnomaly extends ComplexParamsReadable[SimpleDetectMultivariateAnomaly] with Serializable

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
class SimpleDetectMultivariateAnomaly(override val uid: String) extends Model[SimpleDetectMultivariateAnomaly]
with MADBase with HasHandler with DetectMAParams {
logClass(FeatureNames.AiServices.Anomaly)
Expand Down Expand Up @@ -647,8 +655,12 @@ class SimpleDetectMultivariateAnomaly(override val uid: String) extends Model[Si

}

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
object DetectLastMultivariateAnomaly extends ComplexParamsReadable[DetectLastMultivariateAnomaly] with Serializable

@deprecated("The Anomaly Detection Service will be shutting down in 2026," +
" please use IsolationForest for anomaly detection", "v1.0.0")
class DetectLastMultivariateAnomaly(override val uid: String) extends CognitiveServicesBase(uid)
with HasInternalJsonOutputParser with TimeConverter with HasTimestampCol
with HasSetLocation with HasCognitiveServiceInput with HasBatchSize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
},
"source": [
"# Cognitive Services Advanced Guide: Asynchrony, Batching, Multi-Key"
"# AI Services Advanced Guide: Asynchrony, Batching, Multi-Key"
]
},
{
Expand Down Expand Up @@ -98,7 +98,7 @@
},
"outputs": [],
"source": [
"from synapse.ml.cognitive.vision import AnalyzeImage\n",
"from synapse.ml.services.vision import AnalyzeImage\n",
"\n",
"# Create a dataframe with the image URLs\n",
"base_url = \"https://raw.githubusercontent.com/Azure-Samples/cognitive-services-sample-data-files/master/ComputerVision/Images/\"\n",
Expand Down Expand Up @@ -301,7 +301,7 @@
},
"outputs": [],
"source": [
"from synapse.ml.cognitive.text import TextSentiment\n",
"from synapse.ml.services.text import TextSentiment\n",
"\n",
"# Create a dataframe\n",
"text_df = spark.createDataFrame(\n",
Expand Down Expand Up @@ -356,7 +356,7 @@
},
"outputs": [],
"source": [
"from synapse.ml.cognitive.text import TextSentiment\n",
"from synapse.ml.services.text import TextSentiment\n",
"from pyspark.sql.functions import udf\n",
"import random\n",
"\n",
Expand Down Expand Up @@ -418,7 +418,7 @@
"notebookMetadata": {
"pythonIndentUnit": 2
},
"notebookName": "CognitiveServices - Advanced Usage: Async, Batching, and Multi-Key",
"notebookName": "AI Services - Advanced Usage: Async, Batching, and Multi-Key",
"notebookOrigID": 3743502060540796,
"widgets": {}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"metadata": {},
"outputs": [],
"source": [
"from synapse.ml.cognitive import *\n",
"from synapse.ml.services import *\n",
"from synapse.ml.services.geospatial import *\n",
"from synapse.ml.core.platform import *\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"import matplotlib.pyplot as plt\n",
"\n",
"import synapse.ml\n",
"from synapse.ml.cognitive import *"
"from synapse.ml.services.anomaly import *"
]
},
{
Expand Down

0 comments on commit 903dc6b

Please sign in to comment.