-
Notifications
You must be signed in to change notification settings - Fork 819
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor cognitive package to services (#2117)
* chore: move cognitive namespace to services * add better redirects * make find_secret api clearer * run through black * fix import * fix import * fix import * foo * foo * fix import * fix import * fix import * fix * fix * fix * fixes * fixes * fix style * fixes * fix * fix geospatial --------- Co-authored-by: Ubuntu <marhamil@marhamil-gpu-4.g4sx0fkpramudal1bwadxbpp4c.bx.internal.cloudapp.net>
- Loading branch information
1 parent
b0caf2e
commit fd00b87
Showing
146 changed files
with
1,081 additions
and
922 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import warnings | ||
import sys | ||
from synapse.ml.services import * | ||
|
||
warnings.simplefilter(action="always", category=DeprecationWarning) | ||
|
||
# Copy attributes from synapse.ml.services to synapse.ml.cognitive | ||
for attr_name in dir(sys.modules["synapse.ml.services"]): | ||
if not attr_name.startswith("_"): | ||
globals()[attr_name] = getattr(sys.modules["synapse.ml.services"], attr_name) | ||
warnings.warn( | ||
f"Importing '{attr_name}' from 'synapse.ml.cognitive' is deprecated. Use 'synapse.ml.services' instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.anomaly import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.anomaly' is deprecated. Use 'synapse.ml.services.anomaly' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.bing import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.bing' is deprecated. Use 'synapse.ml.services.bing' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.face import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.face' is deprecated. Use 'synapse.ml.services.face' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.form import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.form' is deprecated. Use 'synapse.ml.services.form' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.geospatial import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.geospatial' is deprecated. Use 'synapse.ml.services.geospatial' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.langchain import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.langchain' is deprecated. Use 'synapse.ml.services.langchain' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.language import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.openai' is deprecated. Use 'synapse.ml.services.language' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.openai import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.openai' is deprecated. Use 'synapse.ml.services.openai' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.search import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.search' is deprecated. Use 'synapse.ml.services.search' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.speech import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.speech' is deprecated. Use 'synapse.ml.services.speech' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.text import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.text' is deprecated. Use 'synapse.ml.services.text' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.translate import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.translate' is deprecated. Use 'synapse.ml.services.translate' instead.", | ||
DeprecationWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import warnings | ||
from synapse.ml.services.vision import * | ||
|
||
# Raise a deprecation warning for the entire submodule | ||
warnings.warn( | ||
"Importing from 'synapse.ml.cognitive.vision' is deprecated. Use 'synapse.ml.services.vision' instead.", | ||
DeprecationWarning, | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...e/ml/cognitive/CognitiveServiceBase.scala → ...se/ml/services/CognitiveServiceBase.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...l/cognitive/CognitiveServiceSchemas.scala → ...ml/services/CognitiveServiceSchemas.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
.../cognitive/anomaly/AnomalyDetection.scala → ...l/services/anomaly/AnomalyDetection.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tive/anomaly/AnomalyDetectorSchemas.scala → ...ices/anomaly/AnomalyDetectorSchemas.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...nomaly/MultivariateAnomalyDetection.scala → ...nomaly/MultivariateAnomalyDetection.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../MultivariateAnomalyDetectorSchemas.scala → .../MultivariateAnomalyDetectorSchemas.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...e/ml/cognitive/bing/BingImageSearch.scala → ...se/ml/services/bing/BingImageSearch.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...l/cognitive/bing/ImageSearchSchemas.scala → ...ml/services/bing/ImageSearchSchemas.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...zure/synapse/ml/cognitive/face/Face.scala → ...azure/synapse/ml/services/face/Face.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...napse/ml/cognitive/face/FaceSchemas.scala → ...ynapse/ml/services/face/FaceSchemas.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../cognitive/form/FormOntologyLearner.scala → ...l/services/form/FormOntologyLearner.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...se/ml/cognitive/form/FormRecognizer.scala → ...pse/ml/services/form/FormRecognizer.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ognitive/form/FormRecognizerSchemas.scala → ...services/form/FormRecognizerSchemas.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
.../ml/cognitive/form/FormRecognizerV3.scala → ...e/ml/services/form/FormRecognizerV3.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nitive/form/FormRecognizerV3Schemas.scala → ...rvices/form/FormRecognizerV3Schemas.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/ml/geospatial/AzMapsSearchSchemas.scala → ...ices/geospatial/AzMapsSearchSchemas.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.