Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOISSUE: Add Documentation for Running Algo with Args #41

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

WashingtonKK
Copy link
Contributor

What type of PR is this?

This is an enhancement since it adds documentation for running an algo that requires command line args.

What does this do?

It adds documentation for running an algo that requires command line args.

Which issue(s) does this PR fix/relate to?

  • No issue related

Have you included tests for your changes?

Not needed for docs.

Did you document any new/modified features?

Yes, this adds documentation for a feature in cocos.

Notes

Signed-off-by: WashingtonKK <[email protected]>
./build/cocos-cli algo ./test/manual/algo/addition.py ./private.pem -a python --args="--a" --args="100" --args="--b" --args="20"
```

Details of how to run the full addition example with args can be found [here](https://github.com/ultravioletrs/cocos/blob/7a2789fb5fda48282ef0c1d516aa8ba36421f5f1/test/manual/algo/README.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Port this documentation to here since this is the main documentation place

@@ -477,6 +477,16 @@ Terminal recording session

For real-world examples to test with cocos, see our [AI repository](https://github.com/ultravioletrs/ai).

## Running Python Algorithms with arguments

To run a python algo that requires command line arguments, you can append the algo command on cli with the arguments needed as shown in the addition example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not only python arguments are for all algos

To run a python algo that requires command line arguments, you can append the algo command on cli with the arguments needed as shown in the addition example:

```bash
./build/cocos-cli algo ./test/manual/algo/addition.py ./private.pem -a python --args="--a" --args="100" --args="--b" --args="20"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include more detail on how to add arguments, order, how may you need to add, show how the added args will be passed by agent to the algo

Signed-off-by: WashingtonKK <[email protected]>

add full docs for args

Signed-off-by: WashingtonKK <[email protected]>
@@ -382,10 +382,10 @@ MANAGER_QEMU_OVMF_VARS_FILE=/usr/share/edk2/x64/OVMF_VARS.fd \
go run main.go
```

Export the agent grpc url from computation server logs
Export the agent grpc url from computation server logs, by default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this sentence sounds incomplete at the end

@@ -477,6 +477,65 @@ Terminal recording session

For real-world examples to test with cocos, see our [AI repository](https://github.com/ultravioletrs/ai).

## Running Algorithms with arguments

To run an algo that requires command line arguments, you can append the algo command on cli with the arguments needed as shown in the addition example, which we will run with args below:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

algorithm

Signed-off-by: WashingtonKK <[email protected]>
Copy link

@smithjilks smithjilks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -382,10 +382,10 @@ MANAGER_QEMU_OVMF_VARS_FILE=/usr/share/edk2/x64/OVMF_VARS.fd \
go run main.go
```

Export the agent grpc url from computation server logs
Export the agent grpc url from computation server logs, by default port 6100 will be used. If the port is not available, a different (random) port will be used, within the range 6100 - 6200. The port will be indicated on the computation server logs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allocated

Signed-off-by: WashingtonKK <[email protected]>
@drasko drasko merged commit 66171a2 into ultravioletrs:main Sep 11, 2024
1 check passed
@WashingtonKK WashingtonKK deleted the updateAlgoArgs branch September 11, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants