Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion developers/ocean-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The Ocean CLI offers a wide range of functionalities, enabling you to:
* [**Publish**](publish.md) 📤 data services: downloadable files or compute-to-data.
* [**Edit**](edit.md) ✏️ existing assets.
* [**Consume**](consume.md) 📥 data services, ordering datatokens and downloading data.
* [**Compute to Data**](run-c2d.md) 💻 on public available datasets using a published algorithm.
* [**Compute to Data**](run-c2d.md) 💻 on public available datasets using a published algorithm. Free version of compute-to-data feature is available

## Key Information

Expand Down
36 changes: 36 additions & 0 deletions developers/ocean-cli/run-c2d.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Run C2D Jobs 🚀

## Get Compute Environments

To proceed with compute-to-data job creation, the prerequisite is
to select the preferred environment to run the algorithm on it. This can be
accomplished by running the CLI command `getComputeEnvironments` likewise:
```bash
npm run cli getComputeEnvironments
```


## Start a Compute Job 🎯

Initiating a compute job can be accomplished through two primary methods.
Expand All @@ -15,11 +25,37 @@ In this command, replace `DATASET_DID` with the specific DID of the dataset you

<figure><img src="../../.gitbook/assets/cli/c2dstart.png" alt=""><figcaption>Start a compute job</figcaption></figure>

## Start a Free Compute Job 🎯

For running the algorithms free by starting a compute job, these are the following steps.
**Note**
Only for free start compute, the dataset is **not mandatory** for user to provide in the command line. The required command line parameters are the algorithm DID and environment ID, retrieved from `getComputeEnvironments`
command.
1. The first step involves publishing the algorithm, as explained in the previous section, [Publish a Dataset](./publish.md) Once that's completed, you can proceed to initiate the compute job.
2. Alternatively, you have the option to explore available algorithms and kickstart a free compute-to-data job by combining your preferred choices.

To illustrate the latter option, you can use the following command:

```bash
npm run cli freeStartCompute 'DATASET_DID1' 'DATASET_DID2' 'ALGO_DID' 'ENV_ID'
```
In this command, replace `DATASET_DID` with the specific DID of the dataset you intend to utilize and `ALGO_DID` with the DID of the algorithm you want to apply. By executing this command, you'll trigger the initiation of a compute-to-data job that harnesses the selected dataset and algorithm for processing.


## Download Compute Results 🧮

To obtain the compute results, we'll follow a two-step process. First, we'll employ the `getJobStatus`` method, patiently monitoring its status until it signals the job's completion. Afterward, we'll utilize this method to acquire the actual results.

## Retriving Algorithm Logs

To monitor the algorithm logs execution and setup configuration for algorithm,
this command does the trick!

```bash
npm run cli computeStreamableLogs
```


### Monitor Job Status
To track the status of a job, you'll require both the dataset DID and the compute job DID. You can initiate this process by executing the following command:

Expand Down