Assets in deployment spaces
Learn about various asset types that you can use in your deployment spaces and the ways of adding and promoting these assets to a space.
The way to add an asset to a space depends on the asset type. You can add some assets directly to a space. For example, you can add a model that was created outside of Cloud Pak for Data to your deployment space.
Other asset types originate in a project and must be transferred from a project to a space. The third class includes asset types that you can add to a space only as a dependency of another asset. These asset types do not display in the Assets tab in the UI.
Note these considerations for importing assets into a space:
- Upon import, some assets are automatically assigned a version number, starting with version 1. This version numbering prevents overwriting existing assets if you import their updated versions later.
- Assets or references that are required to run jobs in the space must be part of the import package, or must be added separately. If you don't add these supporting assets or references, jobs fail.
Asset types that you can directly add to a space
- Connection
- Data asset (from a connection or an uploaded file)
- Model
For more information, see:
- For data assets and connections: Adding data assets to a deployment space
- For models: Importing models into a deployment space
Assets types that are created in projects and can be transferred into a space
- Code package
- Connection
- Data asset (from a connection or an uploaded file)
- Data Refinery flow
- Data Replication
- DataStage Build stage
- DataStage Custom stage
- DataStage Data definition
- DataStage flow
- DataStage Function library
- DataStage Java Class library
- DataStage Match specification
- DataStage Operational Decision Manager component
- DataStage subflow
- DataStage Schema library
- DataStage Standardization rule
- DataStage Wrapped stage
- Environment
- Function
- Job
- Model
- Notebook
- Parameter set
- Pipeline
- Script
- Shiny App
For Shiny apps, see Deploying shiny apps. For other asset types, see Transferring assets to your deployment space.
Asset types that can be added to a space only as a dependency
- Hardware Specification
- Package Extension
- Software Specification
- Watson Machine Learning Experiment
- Watson Machine Learning Model Definition
Transferring assets to your deployment space
Before transferring your assets to a deployment space, you must consider the project type that your assets are located in.
- Your assets are located in a standard Watson Studio project
- Your assets are located in a deprecated Git-based project
- Your assets are located in a standard Git-based project
If you're programmatically transferring a model between two different platform instances, you must follow additional steps. For details, see Programmatically Transferring models between platform instances.
Transferring assets from standard Watson Studio projects
If your asset is located in a standard Watson Studio project, you can transfer the asset to the deployment space by promoting it.
For more information, see Promoting assets to a deployment space.
If the asset that you want to transfer to a deployment space is a notebook that uses a custom environment, you must transfer the environment as well. In some cases, you must transfer the environment as a separate step. You can locate your custom environment in the Manage tab and then promote it.
Alternatively, you can export the project and then import it into the deployment space. For more information, see:
If you export the whole project, any matching custom environments are exported as well.
If your use case requires it, you can create a code package from some of the assets in your project by using cpdcli or cpdctl and then importing manually into the space.
For more information, see Adding code packages to a deployment space.
Transferring assets from a deprecated Git-based project
The available scenarios are the same as the ones that apply to transferring assets from a standard Watson Studio project.
Before you move assets to a deployment space, you must synchronize your changes with the Git repository. If your asset depends on any other assets, like custom environments, you must synchronize them, too.
Transferring assets from a standard Git-based project
Before you move assets to a deployment space, you must synchronize your changes with the Git repository. If your asset depends on any other assets, like custom environments, you must synchronize those assets as well. To transfer your assets from a standard Git-based project, export the project and then import it into the deployment space. For more information, see:
If you export the whole project, any matching custom environments are exported as well.
If your specific use case requires it, you can also create a code package from some of the assets in your project by using cpdcli or cpdctl and then import it manually into the space.
For more information, see Adding code packages to a deployment space.
Programmatically transferring models between platform instances
If you are programmatically transferring models between various platform instances, follow this procedure:
- Log into your first instance.
- Download the model as a
tar.gzfile. - Log into your second instance.
- Prepare
meta_propsfor storing your model. - Store the model, where
my_model.tar.gzis a path to local file.
See this example code:
# Log into your first instance.
# Download the model to a tar.gz file
client.repository.download("<model ID>", 'my_model.tar.gz')
# Log into your second instance
# Prepare meta_props for storing your model
sw_spec_uid = client.software_specifications.get_uid_by_name("<name of software specification>")
meta_props = {
client.repository.ModelMetaNames.NAME: "New model",
client.repository.ModelMetaNames.SOFTWARE_SPEC_UID: sw_spec_uid,
client.repository.ModelMetaNames.TYPE: "type of software specification"}
# Store model, where my_model.tar.gz is a path to a local file
client.repository.store_model("my_model.tar.gz", meta_props=meta_props)
For more details on how to use the Python client, see the Python client documentation.
For information on importing models that were trained outside Cloud Pak for Data, see Importing models to a deployment space.
Learn more
For more information about working with space assets, see: