Skip to content

Try macOS 14

Try macOS 14 #4

Workflow file for this run

name: Experimental - build machine learning model
on:
push:
paths-ignore:
- 'javascript/**'
- 'java/**'
pull_request:
paths-ignore:
- 'javascript/**'
- 'java/**'
permissions:
contents: read
jobs:
train-model:
runs-on: macos-14-xlarge
strategy:
fail-fast: false
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup python 3.10
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.10'
- name: Install requirements
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
python -m pip install jax-metal
- name: Train
run: |
curl -o knbc.tar.bz2 https://nlp.ist.i.kyoto-u.ac.jp/kuntt/KNBC_v1.0_090925_utf8.tar.bz2
tar -xf knbc.tar.bz2
python ./scripts/prepare_knbc.py KNBC_v1.0_090925_utf8 -o source_knbc.txt
python ./scripts/encode_data.py source_knbc.txt -o encoded_data.txt
python ./scripts/train.py encoded_data.txt -o weights.txt
python ./scripts/build_model.py weights.txt -o mymodel.json