-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: remove all traps; return Result of Record
nft_get_story returns a StoryRecordResult . InferenceRecordResult returned by inference, nft_story_xxx . update scripts for InferenceRecordResult Remove all references to charles Remove trap calls Refactor trap in set_canister_mode initialize returns StatusCodeRecordResult , and does not trap nft_whitelist, nft_init, nft_mint: no trap; StatusCodeRecordResult nft_metadata; no trap; NFTCollectionRecordResult no trap in get_users; UsersRecordResult fix pytest no trap in get_user_metadata StatusCodeRecordResult everywhere; No more traps Return Err when malloc fails fix pytest . . .
- Loading branch information
Showing
31 changed files
with
897 additions
and
426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
{ | ||
"charles": { | ||
"ic": "lkh5o-3yaaa-aaaag-acguq-cai" | ||
}, | ||
"llama2": { | ||
"ic": "4c4bn-daaaa-aaaag-abvcq-cai" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
#!/bin/sh | ||
|
||
dfx identity use default | ||
|
||
####################################################################### | ||
# For Linux & Mac | ||
####################################################################### | ||
|
||
echo " " | ||
echo "--------------------------------------------------" | ||
echo "Stopping the local network" | ||
dfx stop | ||
|
||
echo " " | ||
echo "--------------------------------------------------" | ||
echo "Starting the local network as a background process" | ||
dfx start --clean --background | ||
|
||
####################################################################### | ||
echo "--------------------------------------------------" | ||
echo "Building the wasm with wasi-sdk" | ||
# icpp build-wasm --to-compile all | ||
icpp build-wasm --to-compile mine | ||
|
||
####################################################################### | ||
echo " " | ||
echo "--------------------------------------------------" | ||
echo "Deploying the wasm to a canister on the local network" | ||
dfx deploy llama2_260K | ||
|
||
####################################################################### | ||
echo " " | ||
echo "--------------------------------------------------" | ||
echo "Setting canister_mode to chat-principal" | ||
dfx canister call llama2_260K set_canister_mode chat-principal | ||
|
||
####################################################################### | ||
echo " " | ||
echo "--------------------------------------------------" | ||
echo "Checking health endpoint" | ||
dfx canister call llama2_260K health | ||
|
||
####################################################################### | ||
echo " " | ||
echo "--------------------------------------------------" | ||
echo "Initializing the canister configurations" | ||
python -m scripts.nft_init --network local --canister llama2_260K --nft-supply-cap 0 --nft-symbol "" --nft-name "" --nft-description "" | ||
|
||
####################################################################### | ||
echo " " | ||
echo "--------------------------------------------------" | ||
echo "Uploading the model & tokenizer" | ||
python -m scripts.upload --network local --canister llama2_260K --model stories260K/stories260K.bin --tokenizer stories260K/tok512.bin | ||
|
||
####################################################################### | ||
echo " " | ||
echo "--------------------------------------------------" | ||
echo "Checking readiness endpoint" | ||
dfx canister call llama2_260K ready | ||
|
||
####################################################################### | ||
echo " " | ||
echo "--------------------------------------------------" | ||
echo "Running the full smoketests with pytest" | ||
pytest --network=local | ||
|
||
####################################################################### | ||
# echo "--------------------------------------------------" | ||
# echo "Stopping the local network" | ||
# dfx stop | ||
|
||
# ####################################################################### | ||
# echo " " | ||
# echo "--------------------------------------------------" | ||
# echo "Building the OS native debug executable with clang++" | ||
# icpp build-native --to-compile all | ||
# # icpp build-native --to-compile mine | ||
|
||
# ####################################################################### | ||
# echo " " | ||
# echo "--------------------------------------------------" | ||
# echo "Running the OS native debug executable" | ||
# ./build-native/mockic.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.