This is the core framework for Palico App. This framework has the following responsibilities:
Make sure you have your workspace setup. If you haven't already, follow the Workspace Setup guide.
To properly test our changes, we'll need to publish the palico-app
package to a local npm registry, then consume it from the sample-app
project. We'll use Verdaccio for this purpose.
Setup Verdaccio
npm install -g verdaccio
Point sample-app
to Verdaccio:
cd sample-app
echo "registry=https://registry.npmjs.org/" >> ".npmrc"
echo "@palico-ai:registry=http://localhost:4873/" >> ".npmrc"
Add a reinstall script in sample-app/package.json
:
"scripts": {
"rebuild": "(cd ../palico-ai && nx run-many -t publish-local -p palico-app -p common)",
"reinstall": "npm run rebuild && npm uninstall @palico-ai/app && npm install @palico-ai/app"
}
Make sure Verdaccio is running in a separate console window
verdaccio
After you have made a change to packages/palico-app
, publish these changes to sample-app
:
cd sample-app
npm run reinstall
Start sample-app
and test your changes:
npm start
For adding eval metrics, you can skip all the other documents in this repo and quickly get started by following the steps below:
Fork this repo and clone it
git clone https://github.com/<github_username>/palico-ai
Install npm dependencies
cd palico-ai
npm install
Add your changes for new metric in packages/palico-app/src/experiments/metrics
folder. You will need to include the following changes:
Confirm project builds properly
npx nx run sanity-check
Pull Request