vania-janet/multiturn-rag-retrieval-data huggingface dataset:
This API is idempotent. If you attempt to stop an already completed or stopped application, it will still return 204.

You can use this API to stop an application in the following states: accepted, waiting, submitted, and running.





 Passing the runtime Spark version when submitting an application 

You can use the "runtime" section under "application_details" in the payload JSON script to pass the Spark runtime version when submitting an application. The Spark version passed through the "runtime" section overrides the default runtime Spark version set at the instance level. To learn more about the default runtime version, see [Default Spark runtime](https://cloud.ibm.com/docs/AnalyticsEngine?topic=AnalyticsEngine-serverless-architecture-conceptsdefault-spark-runtime).

Example of the "runtime" section to run an application in Spark 3.3:

{
"application_details": {
"application": "/opt/ibm/spark/examples/src/main/python/wordcount.py",
"arguments": [
"/opt/ibm/spark/examples/src/main/resources/people.txt"
],
"runtime": {
"spark_version": "3.3"
}
}
}





 Using environment variables 

When submitting an application, you can use the "env" section under "application_details" in the payload JSON script to pass environment specific information, which determines the outcome of the application, for example the data sets to use or any secret values.

Example of the "env" section in the payload:

{
"application_details": {
"application": "cos://<application-bucket-name>.<cos-reference-name>/my_spark_application.py",
"arguments": ["arg1", "arg2"],
"conf": {
CE_ID=b59727ee-9c4e-446a-9261-5616f6d1283b
CE_SOURCE=https://cloud.ibm.com/catalog/services/cloud-object-storage/mybucket
CE_SPECVERSION=1.0
CE_TIME=2021-08-17T20:22:02.917Z
CE_TYPE=com.ibm.cloud.cos.document.delete







 What happens when I create a subscription? 

By default, the [subscription cron create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-subscription-cron-create), [subscription cos create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-subscription-cos-create) and the [subscription kafka create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-subscription-kafka-create) commands first check to see whether the destination application or job exists. If the destination check fails because the application or job does not exist in your project, the commands for the subscription create returns an error. If you want to create a subscription without first creating the application, use the --force option. By using the --force option, the command bypasses the destination check. Note that the Ready field of the subscription shows false until the destination application or job is created. Then, the subscription moves to a Ready: true state automatically.

After the subscription is created, the subscription is repeatedly polled for status to verify its readiness. This polling lasts for 15 seconds by default before it times out. You can change the amount of time before the command times out by using the --wait-timeout option. You can also bypass the status polling by setting the --no-wait option to false.
[twilio](https://www.npmjs.com/package/twilio) A wrapper for the Twilio API, related to voice, video, and messaging. 
 [underscore](https://www.npmjs.com/package/underscore) Underscore.js is a utility-belt library for JavaScript that supports the usual functional suspects (each, map, reduce, filter, and so on) without extending any core JavaScript objects. 
 [url-pattern](https://www.npmjs.com/package/url-pattern) Parse URLs for path parameters more easily than from using a regex string matcher. 
 [utf-8-validate](https://www.npmjs.com/package/utf-8-validate) Check whether a buffer contains valid UTF-8 encoded text. 
 [uuid](https://www.npmjs.com/package/uuid) Simple, fast generation of RFC4122 UUIDS. 
 [validator](https://www.npmjs.com/package/validator) A library of string validators and sanitizers. 
 [vcap_services](https://www.npmjs.com/package/vcap_services) Parse and return service credentials from VCAP_SERVICES environment variable that IBM Cloud provides. 
 [when](https://www.npmjs.com/package/when) when.js is a rock solid, battle-tested, and Promises/A+, and when() implementation, including a complete ES6 Promise shim. 
 [winston](https://www.npmjs.com/package/winston) A multi-transport async logging library for Node.js. "CHILL WINSTON! ... I put it in the logs. 
 [ws](https://www.npmjs.com/package/ws) ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and server implementation.
You can also refer to the [Fabric documentation](https://hyperledger-fabric.readthedocs.io/en/release-2.2/chaincode_lifecycle.htmlstep-three-approve-a-chaincode-definition-for-your-organization) for more details on how to use an Init function with the Fabric chaincode lifecycle.

Repackage smart contract

Attention! The IBM Blockchain Platform Extension for VS Code (VS Code extension) referenced throughout the documentation is an open-source project which is no longer active, and therefore not officially supported by IBM. Refer to the [alternatives to the VS Code extension](https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/3159).

After you have updated your smart contract, use [v2](https://cloud.ibm.com/docs/blockchain?topic=blockchain-develop-vscodedevelop-vscode-installing-the-extension) of the VS Code extension to [repackage](https://cloud.ibm.com/docs/blockchain?topic=blockchain-develop-vscodepackaging-a-smart-contract) your smart contract.







 Step one: Write and package your smart contract 

The IBM Blockchain Platform console manages the deployment of smart contracts rather than development. If you are interested in developing smart contracts, you can get started with tutorials provided by the Hyperledger Fabric community and tooling provided by IBM.

Attention! The IBM Blockchain Platform Extension for VS Code (VS Code extension) referenced throughout the documentation is an open-source project which is no longer active, and therefore not officially supported by IBM. Refer to the [alternatives to the VS Code extension](https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/3159).



* To learn how smart contracts can be used to conduct transactions among multiple parties, see the [Developing applications topic](https://hyperledger-fabric.readthedocs.io/en/release-2.2/developapps/developing_applications.html) in the Hyperledger Fabric documentation.
It cannot, however, be used with an en-GB voice.

description (optional string)
: A recommended description of the new custom model.



* Use a localized description that matches the language of the custom model.
* Include a maximum of 128 characters in the description.



The following example example creates a new US English custom model named Test. The required Content-Type header identifies the type of the input as application/json.

IBM Cloud

curl -X POST -u "apikey:{apikey}" --header "Content-Type: application/json" --data "{"name":"Test", "language":"en-US", "description":"Customization test"}" "{url}/v1/customizations"

IBM Cloud Pak for Data

curl -X POST --header "Authorization: Bearer {token}" --header "Content-Type: application/json" --data "{"name":"Test", "language":"en-US", "description":"Customization test"}" "{url}/v1/customizations"

The method returns a JSON object that contains a globally unique identifier (GUID) for the new model. The GUID is used as the customization_id parameter in calls to access the model, such as those for querying, modifying, and using the model and its words.

{
"customization_id": "64f4807f-a5f1-5867-924f-7bba1a84fe97"
}





 Querying a custom model 

To query information about an existing custom model, use the GET /v1/customizations/{customization_id} method. This is the most direct means of seeing all of the information about a model, including its metadata and the word/translation pairs and custom prompts that it contains.

IBM Cloud

curl -X GET -u "apikey:{apikey}" "{url}/v1/customizations/{customization_id}"

IBM Cloud Pak for Data
"name": "{tool_integration_name}"
}'

import com.ibm.cloud.continuous_delivery.cd_toolchain.v2.CdToolchain;
import com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model.;
...
CdToolchain toolchainService = CdToolchain.newInstance();
CreateToolOptions createDraToolOptions = new CreateToolOptions.Builder()
.name({tool_integration_name})
.toolchainId({toolchain_id})
.toolTypeId("draservicebroker")
.build();
Response<ToolchainToolPost> response = toolchainService.createTool(createDraToolOptions).execute();
ToolchainToolPost draTool = response.getResult();

const CdToolchainV2 = require('@ibm-cloud/continuous-delivery/cd-toolchain/v2');
...
(async () => {
const toolchainService = CdToolchainV2.newInstance();
const draPrototypeModel = {
toolchainId: {toolchain_id},
toolTypeId: 'draservicebroker',
name: {tool_integration_name}
};
const draTool = await toolchainService.createTool(draPrototypeModel);
})();

from ibm_continuous_delivery.cd_toolchain_v2 import CdToolchainV2
...
toolchain_service = CdToolchainV2.new_instance()
dra_tool = toolchain_service.create_tool(
name = {tool_integration_name},
toolchain_id = {toolchain_id},
[Clerics extractor](https://cloud.ibm.com/docs-content/v1/content/148d3bd95f946aa1bb53ea1540475f522e6b61c9/watson-knowledge-studio-data/images/clerics.jpg)



Example 2:

As a second example, select tweets that refer to Twitter names of industry analysts with a big data term. To accomplish this, create two dictionaries, one of Twitter usernames of analysts and a second of big data terms and combine them on the workspace canvas with a proximity of one to 25 tokens.

![Twitter extractor](https://cloud.ibm.com/docs-content/v1/content/148d3bd95f946aa1bb53ea1540475f522e6b61c9/watson-knowledge-studio-data/images/analyst.jpg)







 Creating a union 

To combine extractors in a union:



1. Define two or more extractors on the canvas.
2. Click Output in the Extractor Properties pane to ensure that the number and names of output columns for each sequence or extractor are the same. In addition to having the same number of columns and identical column names, output columns in each sequence or extractor must have the same data type. In this context, data type is a span, number, string, character, date, or time. Note that you cannot edit these properties for an extractor or sequence while in a union.
3. On the canvas, without regard to order, click and drag one extractor or sequence above or below another one until the dark blue drop zone indicator indicates you can drop the extractor.

![Union indicator](https://cloud.ibm.com/docs-content/v1/content/148d3bd95f946aa1bb53ea1540475f522e6b61c9/watson-knowledge-studio-data/images/person_union.jpg)
4. Release the mouse button to drop the extractor.
5.
You install the database infrastructure by using Terraform and your web application uses the popular Express framework. The application can then be run locally, or by using Docker. For more information, see [Deploying and Connecting a Cloud Databases Instance](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=cloud-databases-create-instance-tutorial).





 11 October 2022 

Protecting IBM Cloud® Messages for RabbitMQ resources with context-based restrictions
: Context-based restrictions (CBR) give account owners and administrators the ability to define and enforce access restrictions for IBM Cloud® resources based on the context of access requests. Access to Cloud Databases resources can be controlled with CBR and identity and access management (IAM) policies. For more information, see [Protecting Cloud Databases resources with context-based restrictions](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=cloud-databases-cbr&interface=ui).





 25 January 2022 

IBM Cloud® Messages for RabbitMQ 3.8 End of Life in July 2022
: On July 12, 2022, Messages for RabbitMQ version 3.8 reaches its end of life. See blog post announcement [here](https://www.ibm.com/cloud/blog/announcements/messages-for-rabbitmq-38-end-of-life-in-july-2022).





 30 June 2021 

General Availability of IBM Cloud® Messages for RabbitMQ support for IBM Cloud Databases enabled by IBM Cloud Satellite.
: A distributed cloud provides consistent security and services across environments, centralized workload visibility, reduced latency, easier compliance and higher application development velocity. See blog post announcement [here](https://www.ibm.com/cloud/blog/announcements/deploy-managed-cloud-native-databases-anywhere-with-ibm-cloud-satellite).





 21 July 2020 

IBM Cloud Messages for RabbitMQ 3.8 is Now Preferred
: RabbitMQ 3.8 Preferred status.
sed -i "/scalactic_2.11-3.0.5.jar/d" $FILE &&
sed -i "/scalaj-http_2.11-2.3.0.jar/d" $FILE &&
sed -i "/service-commons_2.11-22.1.0.jar/d" $FILE &&
sed -i "/shapeless_2.11-2.3.3.jar/d" $FILE &&
/opt/ibm/wex/zing/bin/entrypoint.sh /opt/ibm/wex/zing/bin/controller.sh
env:
- name: INGESTION_POD_NAME
Show more

Added lines from - command: to /opt/ibm/wex/zing/bin/entrypoint.sh/opt/ibm/wex/zing/bin/controller.sh and removed - before env:
3. Save the changes. It will restart the converter pod.

<-- </ol> -->

<-- </ul> --><-- </section "id="section-2sept2020ki-fixed" "> --><-- </section "id="section-2sept2020ki" "> --><-- <section "id="section-19jun2020ki" "> --> 2.1.3, 19 June 2020: <-- <ul> --> * Entity Subtypes in IBM Watson® Knowledge Studio Machine Learning models are not supported in Discovery for Cloud Pak for Data 2.1.3 or later. For instructions on converting existing models, contact the Support center]IBM Support Center] !!! ! ! ! . * You cannot upload CSV files that include a space in the file name (for example: file 1.csv) to a Content Mining project. Rename the file to work around the issue. * When performing Project level relevancy training, if you have multiple collections, and two or more of those collections contains a duplicate document_id, then project level relevancy training will fail.
Conflicted documents harm performance. A highly concurrent update-in-place pattern also increases the likelihood that writes get rejected. In that situation, the _rev parameter isn’t the expected one, which forces your application to retry and delay processing.

This conflicted-document scenario is significantly more likely to happen for updates that occur more often than once a second. Use immutable documents for updates that occur more than once every 10 seconds to be on the safe side.





Rather than using views as search indexes, you can use the search get me all person documents and make the search extract the data for you. For example, you can retrieve all 10,000 person documents to calculate the combined hours worked. However, it's better to use a view with a composite key to pre-calculate the hours worked by year, month, day, half-day, and hour by using the _sum built-in reduce. You save work in your application and allow the database to concentrate on serving many small requests. This method is preferable to reading huge amounts of data from disk to service a single large request.





It's straightforward. First, both maps and reduces are precomputed, so the result of a reduce function is a cheap operation. The operation cost is low even when compared to the significant amounts of IO required to stream hundreds or even thousands of documents from the on-disk storage.

At a deeper level, when a node receives a view request, it asks the nodes that hold the shard replicas of the view's database for the results of the view request from the documents in each shard. As it receives the answers, taking the first answer for each shard replica, the node that services the view request combines the results and streams the final result to the client. As more documents are involved, it takes longer for each replica to stream the results from disk and across the network. The node that services the request also has much more work to do in combining the results from each database shard.

Overall, the goal is for a view request to require the minimum amount of data from each shard. This practice minimizes the time that the data is in transit and being combined to form the final result. Using the power of views to precompute aggregate data is one way to achieve this aim.
* An [ibm_cd_toolchain_tool_pipeline resource](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cd_toolchain_tool_pipeline) that is the tool integration that binds the Tekton pipeline into the toolchain.
* An [ibm_cd_tekton_pipeline resource](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cd_tekton_pipeline) that is the Tekton pipeline.



The following example shows a toolchain that is constructed by declaring these resources.

data "ibm_resource_group" "group" {
name = "default"
}

resource "ibm_cd_toolchain" "cd_toolchain" {
name = "my toolchain"
resource_group_id = data.ibm_resource_group.group.id
}

resource "ibm_cd_toolchain_tool_pipeline" "cd_pipeline_integration" {
toolchain_id = ibm_cd_toolchain.cd_toolchain.id
parameters {
name = "my pipeline integration"
}
}

resource "ibm_cd_tekton_pipeline" "cd_pipeline" {
pipeline_id = ibm_cd_toolchain_tool_pipeline.cd_pipeline_integration.tool_id
worker {
id = "public"
}
}
Show more
With Continuous Integration (CI) in place, the template infrastructure configuration can be implemented in multiple environments such as the development, UAT, QA, or production environment with minimal changes applied effectively.





 Modular Infrastructure 

Breaking down infrastructure into [modules](https://github.com/terraform-ibm-modules/documentation) allows for reuse, improved reliability and an easier adoption path. Similar to the use of modules and packages in programming languages. Following are the benefits to this practice.



* Frequently used configurations can be codified as modules and reused multiple times across environments.
* Reliability increases as modules can be tested and become hardened over time with use.
* Composition from reusable modules lowers the skills barrier to IaC adoption.
* Changes are easier to make and test at a module level.
* The risk of change reduces as configuration changes are localized.







 Declarative versus imperative approaches to IaC 

With adopting IaC, an aspect to consider is what approach your tooling takes. There are two different styles, declarative or imperative, also sometimes described as procedural.

A declarative approach defines the desired state of the system, including the resources you need and any properties they should have, and the tool will configure it for you. The tool itself will determine the operations to get to the desired state from any starting point.

An imperative approach instead defines the specific commands needed to achieve the desired configuration, and those commands then need to be executed in the correct order.

Chef is thought of as an imperative tool. Terraform is classed as declarative. Ansible is declarative but also can be used with imperative commands.





 Declarative Terraform and lifecycle management 

Schematics supports both Terraform and Ansible as IaC tools with Schematics Workspaces and Actions. When lifecycle management is important with environments being regularly stood up and torn down, using Terraform with Schematics Workspaces is recommended. Terraform keeps a record of the current state of your deployed cloud infrastructure and Schematics is able to remove your infrastructure in reverse dependency order without manual intervention.





 Idempotence 

A benefit of the declarative approached used by Terraform and Ansible is idempotence.
Show more









 Code samples using iaesdk 

In addition to the sample code snippets in this section, you can work with Go code samples from the [IBM Analytics Engine V3 API reference](https://cloud.ibm.com/apidocs/ibm-analytics-engine-v3?code=gointroduction).

The following code samples show you how to:



* Retrieve the details of a single instance:

(ibmAnalyticsEngineApi IbmAnalyticsEngineApiV3) GetInstance(getInstanceOptions GetInstanceOptions) (result Instance, response core.DetailedResponse, err error)

Example request:

func main() {
// Construct an instance of the GetInstanceOptions model
getInstanceOptionsModel := new(ibmanalyticsengineapiv3.GetInstanceOptions)
getInstanceOptionsModel.InstanceID = core.StringPtr("dc0e9889-eab2-4t9e-9441-566209499546")

_, response, _ := ibmAnalyticsEngineApiService.GetInstance(getInstanceOptionsModel)
fmt.Println(response)
}
* Deploy a Spark application on a given serverless Spark instance:

(ibmAnalyticsEngineApi IbmAnalyticsEngineApiV3) CreateApplication(createApplicationOptions CreateApplicationOptions) (result ApplicationResponse, response core.DetailedResponse, err error)

Sample request:

func main() {
// Construct an instance of the CreateApplicationOptions model
createApplicationOptionsModel := new(ibmanalyticsengineapiv3.CreateApplicationOptions)
createApplicationOptionsModel.InstanceID = core.StringPtr("dc0e9889-eab2-4t9e-9441-566209499546")
Main: main()

Now that your function is created from repository source code, you can update the function to meet your needs by using the [ibmcloud ce function update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-function-update) command. If you want to update your source to use with your function, you must provide the --build-source option on the function update command.

When your function is created from repository source code or from [local source](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-create-local) with the CLI, the resulting build run is not based on a build configuration. Build runs that complete are ultimately automatically deleted. Build runs that are not based on a build configuration are deleted after 1 hour if the build run is successful. If the build run is not successful, this build run is deleted after 24 hours. You can only display information about this build run with the CLI. You cannot view this build run in the console.



 Including dependencies for your Function 

You can create Functions in many different programming languages. When your Function code grows complex, you can add code modules as dependencies for your Function. Each language has its own modules to use with your Function code. For example, Node.js dependencies are usually existing npm modules, whereas Python uses Python packages. These dependencies must be declared and created in a file with your source code



 Including modules for a Node.js Function 

Create a function that includes a dependency for a specific Python module by creating a package.json file. In this case, both the source code and package file are located in the same folder.



1. Create your source code by writing your code into a main.js file. For example, copy the following code example into a file called main.js.

function main(args) {
const oneLinerJoke = require('one-liner-joke');
let getRandomJoke = oneLinerJoke.getRandomJoke();

return {
For copies of the source code for this software, send an email to [devlic@us.ibm.com](mailto:devlic@us.ibm.com) identifying the IBM product and the AGPL-licensed program for which you are requesting the source code.

GOLANGCI-LINT





 Creative Commons Attribution 2.5 license 

The Program includes some or all of the following that IBM obtained under the Creative Commons Attribute 2.5 License:

GuardedBy.java ([https://github.com/stephenc/jcip-annotations/blob/master/src/main/java/net/jcip/annotations/GuardedBy.java](https://github.com/stephenc/jcip-annotations/blob/master/src/main/java/net/jcip/annotations/GuardedBy.java)), JCIP-ANNOTATIONS ([https://github.com/stephenc/jcip-annotations](https://github.com/stephenc/jcip-annotations)), net.jcip.annotations ([https://mvnrepository.com/artifact/net.jcip/jcip-annotations](https://mvnrepository.com/artifact/net.jcip/jcip-annotations))

The URL to the license is [https://creativecommons.org/licenses/by/2.5/](https://creativecommons.org/licenses/by/2.5/)





 Creative Commons Attribution 3.0 Generic 

The Program includes some or all of the following works licensed under the Creative Commons. The URL to the license is [https://creativecommons.org/licenses/by/3.0/legalcode](https://creativecommons.org/licenses/by/3.0/legalcode)