Skip to content

Commit

Permalink
Merge branch 'main' into callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoralez committed Nov 7, 2023
2 parents a01dce9 + 73684e5 commit e817979
Show file tree
Hide file tree
Showing 12 changed files with 323 additions and 166 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "build-docs"
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-python@v4
with:
cache: "pip"
python-version: '3.10'
cache-dependency-path: settings.ini
- name: Build docs
run: |
set -ux
python -m pip install --upgrade pip
pip install -Uq nbdev
pip install -e ".[dev]"
mkdir nbs/_extensions
cp -r docs-scripts/mintlify/ nbs/_extensions/
python docs-scripts/update-quarto.py
nbdev_docs
- name: Apply final formats
run: bash ./docs-scripts/docs-final-formatting.bash
- name: Copy over necessary assets
run: |
cp nbs/mint.json _docs/mint.json
cp docs-scripts/imgs/* _docs/
- name: Deploy to Mintlify Docs
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: docs
publish_dir: ./_docs
# The following lines assign commit authorship to the official GH-Actions bot for deploys to `docs` branch.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "docs-scripts"]
path = docs-scripts
url = https://github.com/Nixtla/docs.git
branch = scripts
1 change: 1 addition & 0 deletions docs-scripts
Submodule docs-scripts added at d63d02
21 changes: 11 additions & 10 deletions nbs/common.base_recurrent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -691,11 +691,19 @@
"outputs": [],
"source": [
"#| hide\n",
"# add h=0,1 unit test for _parse_windows \n",
"from neuralforecast.losses.pytorch import MAE\n",
"from neuralforecast.utils import AirPassengersDF\n",
"from neuralforecast.tsdataset import TimeSeriesDataset, TimeSeriesDataModule\n",
"\n",
"from neuralforecast.tsdataset import TimeSeriesDataset, TimeSeriesDataModule"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#| hide\n",
"# add h=0,1 unit test for _parse_windows \n",
"# Declare batch\n",
"AirPassengersDF['x'] = np.array(len(AirPassengersDF))\n",
"AirPassengersDF['x2'] = np.array(len(AirPassengersDF)) * 2\n",
Expand Down Expand Up @@ -729,13 +737,6 @@
"test_eq(set(temporal_data_cols), set(['y', 'x', 'x2']))\n",
"test_eq(windows['temporal'].shape, torch.Size([1,len(['y', 'x', 'x2', 'available_mask']),117,12+1]))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Loading

0 comments on commit e817979

Please sign in to comment.