-
Notifications
You must be signed in to change notification settings - Fork 2
Fab 6024 rebranding #181
base: develop
Are you sure you want to change the base?
Fab 6024 rebranding #181
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ | |
| """ | ||
|
|
||
| from mitmproxy import http | ||
| from cortex.client import Cortex | ||
| from sensa.client import Sensa | ||
| import json | ||
| import re | ||
| import os | ||
|
|
@@ -51,7 +51,7 @@ | |
|
|
||
|
|
||
| def request(flow: http.HTTPFlow) -> None: | ||
| if "cortex.svc.cluster.local" in flow.request.pretty_url: | ||
| if "sensa.svc.cluster.local" in flow.request.pretty_url: | ||
| if "/internal" in flow.request.pretty_url: | ||
| if "/connections" in flow.request.pretty_url: | ||
| try: | ||
|
|
@@ -63,7 +63,7 @@ def request(flow: http.HTTPFlow) -> None: | |
| cortex_project = re.search( | ||
| "/projects/(.*)/connections/", flow.request.pretty_url | ||
| ).group(1) | ||
| client = Cortex.client( | ||
| client = Sensa.client( | ||
| api_endpoint=cortex_endpoint, | ||
| project=cortex_project, | ||
| token=cortex_token, | ||
|
|
@@ -127,5 +127,5 @@ def request(flow: http.HTTPFlow) -> None: | |
| ) | ||
| else: | ||
| flow.request.url = flow.request.pretty_url.replace( | ||
| "http://cortex-internal.cortex.svc.cluster.local", cortex_endpoint | ||
| "http://cortex-internal.sensa.svc.cluster.local", cortex_endpoint | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting, this URI change implies we are 1) renaming the k8s namespace for installation to
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good catch. The namespace change isn't intentional. |
||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,14 @@ | ||
| # Note | ||
|
|
||
| Users of `cortex-python` should install `sensa-python` instead. | ||
|
Comment on lines
+2
to
+3
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would suggest repurposing this file to only be a about migrating
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, we make sure to say that |
||
|
|
||
| # Migration steps from `cortex-client` to `cortex-python` | ||
|
|
||
| The `cortex-python` library and its optional add-ons are replacing the cortex-client library. The new libraries are more lightweight and use-case focussed. `Cortex-python` may be used for development with or without the add-ons. | ||
| The `cortex-python` library and its optional add-ons are replacing the cortex-client library. The new libraries are more lightweight and use-case focussed. `Sensa-python` may be used for development with or without the add-ons. | ||
|
|
||
| ## Uninstall the previous library (`cortex-client`) | ||
|
|
||
| To use the new Cortex libraries, `cortex-python` and `cortex-python-builders` you must uninstall the `cortex-client` library; `cortex-client` and `cortex-python`**cannot** be installed simultaneously in your python environment. | ||
| To use the new Sensa libraries, `cortex-python` and `cortex-python-builders` you must uninstall the `cortex-client` library; `cortex-client` and `cortex-python`**cannot** be installed simultaneously in your python environment. | ||
|
|
||
| ``` | ||
| > pip uninstall cortex-client | ||
|
|
@@ -49,9 +53,9 @@ To import ManagedContentClient: | |
| ``` | ||
| ConnectionClient can be used to save and retrieve connections. | ||
|
|
||
| ## Use Cortex magics | ||
| ## Use Sensa magics | ||
|
|
||
| Cortex magics can be used only when the optional `builders` dependency is installed: | ||
| Sensa magics can be used only when the optional `builders` dependency is installed: | ||
|
|
||
| ``` | ||
| > %reload_ext cortex_builders | ||
|
|
@@ -71,15 +75,15 @@ class to run experiments, save and retrieve your models. | |
| Also, you can use the `action` in the builder class inside client class to build your actions. (Can be used only when optional dependency of builders is installed) | ||
|
|
||
| 4. `SecretsClient` has been deprecated. There is no equivalent replacement functionality in the python library, but | ||
| you can manage secrets through the Cortex Vault in the Cortex Console or via the CLI `cortex variables [command] [options]`. | ||
| you can manage secrets through the Sensa Vault in the Sensa Console or via the CLI `cortex variables [command] [options]`. | ||
|
|
||
| 5. `Message.with_payload()` has been removed. This method was previously deprecated in `cortex-client` v5.5.4. | ||
| Instead, use the `Client.message()` method: | ||
|
|
||
| ``` | ||
| > from cortex.client import Cortex | ||
| > from cortex.client import Sensa | ||
|
|
||
| > cortex = Cortex.client() | ||
| > cortex = Sensa.client() | ||
| > message = cortex.message(payload={'value': 'hello world'}) | ||
| ``` | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| """ | ||
| Metadata for sensa-python | ||
| """ | ||
| __title__ = "sensa-python" | ||
| __description__ = "Python module for the TecnoTree Sensa Platform" | ||
| __url__ = "https://github.com/CognitiveScale/sensa-python" | ||
| __version__ = "6.4.0" | ||
| __author__ = "TecnoTree" | ||
| __author_email__ = "TBD?" # TODO: Add TecnoTree's author email | ||
| __license__ = "Apache 2.0" | ||
| __copyright__ = "TecnoTree LLC. All Rights Reserved." | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to make sure this |
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more of a product question, but do we know what the plan is for these two (extension) packages? Are we going to deprecate or update (rename):
cortex-python-builderscortex-python-profiles<--- I would presume this is to be functionally replaced by the Profiles SDKIs there a backlog issue to address these packages? If not, then we should spin that off