ora-io / opml Goto Github PK
View Code? Open in Web Editor NEWOPML: OPtimistic Machine Learning on Blockchain
License: MIT License
OPML: OPtimistic Machine Learning on Blockchain
License: MIT License
Generating prompts returns "reading 'MPChallenge" error on the https://www.ora.io/app/opml/sd page.
When running `` on Mac M1, it crashed with the same error msg described here.
According to the issue it should be fixed in this commit.
Yet in opML we used a fork https://github.com/geohot/unicorn which doesn't include that fix, and updating the submodule itself doesn't simply fix it, since the Unicorn API version is different:
Different API version between core & binding (UC_ERR_VERSION)
In conclusion, I assume we'd better to adopt the upstream Unicorn version instead of the fork?
I am running the code on a macbook with MacOs 14.2.1 and Apple M3 Pro
# CI will checkout submodules on its own (and fails on these commands)
if [[ -z "$GITHUB_ENV" ]]; then
git submodule init;
git submodule update;
fi
cd unicorn/build && make -j8
[ 1%] Building C object CMakeFiles/mips64-softmmu.dir/qemu/cpu-exec.c.o
[ 2%] Building C object CMakeFiles/mips-softmmu.dir/qemu/cpu-exec.c.o
[ 2%] Building C object CMakeFiles/mips64el-softmmu.dir/qemu/cpu-exec.c.o
[ 2%] Building C object CMakeFiles/mips64el-softmmu.dir/qemu/cputlb.c.o
[ 3%] Building C object CMakeFiles/mips64-softmmu.dir/qemu/cpus.c.o
[ 3%] Building C object CMakeFiles/mipsel-softmmu.dir/qemu/cpus.c.o
[ 4%] Building C object CMakeFiles/mips64el-softmmu.dir/qemu/cpus.c.o
[ 5%] Building C object CMakeFiles/mipsel-softmmu.dir/qemu/cpu-exec.c.o
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/cputlb.c:22:
/Users/gauravsingh/Code/opml/unicorn/qemu/include/config.h:2:10: fatal error: 'config-target.h' file not found
#include "config-target.h"
^~~~~~~~~~~~~~~~~
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/cpu-exec.c:22:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/tcg/tcg.h:28:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu-common.h:98:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/target-mips/cpu.h:13:
/Users/gauravsingh/Code/opml/unicorn/qemu/include/config.h:2:10: fatal error: 'config-target.h' file not found
#include "config-target.h"
^~~~~~~~~~~~~~~~~
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/cpus.c:29:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/sysemu/sysemu.h:5:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu/timer.h:5:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu-common.h:98:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/target-mips/cpu.h:13:
/Users/gauravsingh/Code/opml/unicorn/qIn file included from /Users/gauravsingh/Code/opml/unicorn/qemu/cpu-exec.c:22:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/tcg/tcg.h:28:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu-common.h:98:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/target-mips/cpu.h:13:
/Users/gauravsingh/Code/opml/unicorn/qemu/include/config.h:2:10: fatal error: 'config-target.h' file not found
#include "config-target.h"
^~~~~~~~~~~~~~~~~
emu/include/config.h:2:10: fatal error: 'config-target.h' file not found
#include "config-target.h"
^~~~~~~~~~~~~~~~~
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/cpu-exec.c:22:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/tcg/tcg.h:28:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu-common.h:98:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/target-mips/cpu.h:13:
/Users/gauravsingh/Code/opml/unicorn/qemu/include/config.h:2:10: fatal error: 'config-target.h' file not found
#include "config-target.h"
^~~~~~~~~~~~~~~~~
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/cpu-exec.c:22:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/tcg/tcg.h:28:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu-common.h:98:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/target-mips/cpu.h:13:
/Users/gauravsingh/Code/opml/unicorn/qemu/include/config.h:2:10: fatal error: 'config-target.h' file not found
#include "config-target.h"
^~~~~~~~~~~~~~~~~
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/cpus.c:29:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/sysemu/sysemu.h:5:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu/timer.h:5:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu-common.h:98:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/target-mips/cpu.h:13:
/Users/gauravsingh/Code/opml/unicorn/qemu/include/config.h:2:10: fatal error: 'config-target.h' file not found
#include "config-target.h"
^~~~~~~~~~~~~~~~~
1 error generated.
1 error generated.
11 error generated.
error generated.
make[3]: *** [CMakeFiles/mips64-softmmu.dir/qemu/cpu-exec.c.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [CMakeFiles/mips64el-softmmu.dir/qemu/cpus.c.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/cpus.c:29:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/sysemu/sysemu.h:5:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu/timer.h:5:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu-common.h:98:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/target-mips/cpu.h:13:
/Users/gauravsingh/Code/opml/unicorn/qemu/include/config.h:2:10: fatal error: 'config-target.h' file not found
#include "config-target.h"
^~~~~~~~~~~~~~~~~
make[3]: *** [CMakeFiles/mips64el-softmmu.dir/qemu/cpu-exec.c.o] Error 1
make[3]: *** [CMakeFiles/mipsel-softmmu.dir/qemu/cpu-exec.c.o] Error 1
make[3]: *** Waiting for unfinished jobs....
1 error generated.
1 error generated.
make[3]: *** [CMakeFiles/mips-softmmu.dir/qemu/cpu-exec.c.o] Error 1
make[3]: *** Waiting for unfinished jobs....
1 error generated.
1 error generated.
make[3]: *** [CMakeFiles/mipsel-softmmu.dir/qemu/cpus.c.o] Error 1
make[3]: *** [CMakeFiles/mips64-softmmu.dir/qemu/cpus.c.o] Error 1
make[2]: *** [CMakeFiles/mips64-softmmu.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
make[3]: *** [CMakeFiles/mips64el-softmmu.dir/qemu/cputlb.c.o] Error 1
make[2]: *** [CMakeFiles/mips64el-softmmu.dir/all] Error 2
[ 7%] Building C object CMakeFiles/mips-softmmu.dir/qemu/cputlb.c.o
[ 7%] Building C object CMakeFiles/mips-softmmu.dir/qemu/exec.c.o
[ 8%] Building C object CMakeFiles/mipsel-softmmu.dir/qemu/cputlb.c.o
[ 9%] Building C object CMakeFiles/mips-softmmu.dir/qemu/cpus.c.o
In file included from In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/exec.c/Users/gauravsingh/Code/opml/unicorn/qemu/cputlb.c::2122:
:
/Users/gauravsingh/Code/opml/unicorn/qemu/include/config.h/Users/gauravsingh/Code/opml/unicorn/qemu/include/config.h::22::1010:: fatal error: fatal error: 'config-target.h' file not found'config-target.h' file not found
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/cputlb.c:22:
#include "config-target.h"
/Users/gauravsingh/Code/opml/unicorn/qemu/include/config.h:2:#include "config-target.h" ^~~~~~~~~~~~~~~~~
10 ^~~~~~~~~~~~~~~~~:
fatal error: 'config-target.h' file not found
#include "config-target.h"
^~~~~~~~~~~~~~~~~
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/cpus.c:29:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/sysemu/sysemu.h:5:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu/timer.h:5:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/include/qemu-common.h:98:
In file included from /Users/gauravsingh/Code/opml/unicorn/qemu/target-mips/cpu.h:13:
/Users/gauravsingh/Code/opml/unicorn/qemu/include/config.h:2:10: fatal error: 'config-target.h' file not found
#include "config-target.h"
^~~~~~~~~~~~~~~~~
1 error generated.
make[3]: *** [CMakeFiles/mips-softmmu.dir/qemu/cpus.c.o] Error 1
1 error generated.
make[3]: *** [CMakeFiles/mips-softmmu.dir/qemu/exec.c.o] Error 1
1 error generated.
1 error generated.
make[3]: make[3]: *** [CMakeFiles/mipsel-softmmu.dir/qemu/cputlb.c.o] Error 1*** [CMakeFiles/mips-softmmu.dir/qemu/cputlb.c.o] Error 1
make[2]: *** [CMakeFiles/mips-softmmu.dir/all] Error 2
make[2]: *** [CMakeFiles/mipsel-softmmu.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [unicorn/build/libunicorn.so] Error 2
Can I deploy opml to a blockchain testnet?
Can the results of AI model inference be sent to the chain? What command to use?Thanks!
Can I use other LLm, like mistral?
If so, what do I need to modify? Thanks!
interface IOpml {
function uploadModel(bytes32 modelHash, bytes32 programHash, string calldata description) external returns (uint256 modelId);
function initOpmlRequest(uint256 modelId, bytes calldata input) external returns (uint256 requestId);
function uploadResult(uint256 requestId, bytes calldata output) external;
function startChallenge(uint256 requestId, bytes calldata output, bytes32 finalState, uint256 stepCount) external returns (uint256 challengeId);
function respondState(uint256 challengeId, bytes32 stateHash) external;
function proposeState(uint256 challengeId, bytes32 stateHash) external;
function assertStateTransition(uint256 challengeId) external;
function isFinalized(uint256 requestId) external view returns (bool);
function getOutput(uint256 requestId) external view returns (bytes memory output);
}
This is Opml in OAO contract, But I can’t find your relevant implementation in the OPML open source address(https://github.com/ora-io/opml). Is OPML not really open source yet?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.