Skip to content

Downloading a Remote NLP Project to Local

Project models and data uploaded to your remote environment can be downloaded to a local environment. This notebook exercise shows you how.

Requirements

Make sure the Jupyter server's environment has these dependencies installed.

If the following widgets do not load, check these required dependencies.

  • plotly ≥ 5.5
  • ipywidgets ≥ 7.7
  • notebook ≥ 6.4

Important

The kernel alone having these dependencies is insufficient. Make sure the Jupyter server's environment also has these dependencies installed.

You may need to close and reopen this notebook for changes to work the first time the server is started with these dependencies installed.

Connect to Truera endpoint

  • Provide your Truera deployment URL (http://app.truera.net).
  • Provide your generated token.
  • Truera Workspace creation will verify your connectivity to Truera services.
TRUERA_URL = "<TRUERA_URL>"
TOKEN = "<TOKEN>"
SPLIT_NAME = "<SPLIT_NAME>"
MODEL_NAME="<MODEL_NAME>"
from truera.client.truera_workspace import TrueraWorkspace
from truera.client.truera_authentication import TokenAuthentication

auth = TokenAuthentication(TOKEN)
tru = TrueraWorkspace(TRUERA_URL, auth)
tru.set_model_execution("remote")

Download remote project to local

PROJECT_NAME = "COVID Tweets Sentiment Classification"
DATA_COLLECTION_NAME = "data_collection"

Set the project locally

tru.set_project(PROJECT_NAME)
tru.set_data_collection(DATA_COLLECTION_NAME)
tru.set_model(MODEL_NAME)
tru.set_data_split(SPLIT_NAME)

Explanations

tru.get_feature_influences()

Compute Metrics

tru.list_performance_metrics()

Widgets

tru.get_explainer().global_token_summary()
tru.get_explainer().record_explanations_attribution_tab()