ultravioletrs / cocos

Cocos AI - Confidential Computing System for AI
https://ultraviolet.rs/cocos.html
Apache License 2.0
23 stars 9 forks source link

COCOS-151 - Add compression/decompression option for CLI/Agent #200

Closed SammyOina closed 1 month ago

SammyOina commented 1 month ago

What type of PR is this?

This is a feature that allows on the fly compression and decompression

What does this do?

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

Have you included tests for your changes?

No

Did you document any new/modified feature?

Yes

Notes

go run ./cmd/cli/main.go data ./test/manual/data private.pem -d  
# ls /datasets
iris.csv
SammyOina commented 1 month ago

➜  cocos git:(cocos-151) ✗ ./build/cocos-cli data ./test/manual/data private.pem -d

2024/08/16 12:29:55 Uploading dataset CSV: ./test/manual/data

Uploading data...  100% [====================================================>] 

{"time":"2024-08-16T12:29:55.989831624+03:00","level":"ERROR","msg":"Failed to send Data"}

2024/08/16 12:29:55 Error uploading dataset: rpc error: code = Unknown desc = malformed data, filename does not match manifest

image

How do you handle and verify file name in this structure since it does not work

Use the base name of the directory, check code to see how directories are handled

SammyOina commented 1 month ago

This scheme works with the test computations server but not with prism, please check where the issue lies.

Which scheme, and what does not work?

SammyOina commented 1 month ago
➜  cocos git:(cocos-151) ✗ ./build/cocos-cli data ./test/manual/data private.pem -d
2024/08/16 12:29:55 Uploading dataset CSV: ./test/manual/data
Uploading data...  100% [====================================================>] 
{"time":"2024-08-16T12:29:55.989831624+03:00","level":"ERROR","msg":"Failed to send Data"}
2024/08/16 12:29:55 Error uploading dataset: rpc error: code = Unknown desc = malformed data, filename does not match manifest

image

How do you handle and verify file name in this structure since it does not work

base name here will be data if you can refer here https://github.com/SammyOina/cocos-ai/blob/1cde120d705e73cdc7fdb7993011804ba1da8c65/cli/datasets.go#L53