Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ jobs:
push: false
- name: Start a docker compose
run: docker-compose up -d
- name: Update fonduer to the latest commit
run: |
docker-compose exec -T -u 0 jupyter apt-get update
docker-compose exec -T -u 0 jupyter apt-get install -y git
docker-compose exec -T jupyter pip install --upgrade git+https://github.com/HazyResearch/fonduer.git
- name: Run a command inside a container
run: |
cat << EOF | docker exec -i fonduer-tutorials_jupyter_1 /bin/bash -
cat << EOF | docker-compose exec -T jupyter /bin/bash -
# Convert ipynb to py
find . -name "*.ipynb" -not -path '*/\.*' | xargs jupyter nbconvert --to script
sed -i -e "s/get_ipython().run_line_magic('matplotlib', 'inline')/import matplotlib\nmatplotlib.use('Agg')/" */*.py
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3"
version: "3.6"
services:

jupyter:
Expand Down
3 changes: 2 additions & 1 deletion hardware/max_storage_temp_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@
"metadata": {},
"outputs": [],
"source": [
"corpus_parser = Parser(session, structural=True, lingual=True, visual=True, pdf_path=pdf_path)\n",
"from fonduer.parser.visual_parser import PdfVisualParser\n",
"corpus_parser = Parser(session, structural=True, lingual=True, visual_parser=PdfVisualParser(pdf_path))\n",
"%time corpus_parser.apply(doc_preprocessor, parallelism=PARALLEL)"
]
},
Expand Down
3 changes: 2 additions & 1 deletion hardware_image/transistor_image_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@
"metadata": {},
"outputs": [],
"source": [
"from fonduer.parser.visual_parser import PdfVisualParser\n",
"corpus_parser = Parser(\n",
" session, structural=True, lingual=True, visual=True, pdf_path=pdf_path, flatten=[]\n",
" session, structural=True, lingual=True, visual_parser=PdfVisualParser(pdf_path), flatten=[]\n",
")\n",
"corpus_parser.apply(doc_preprocessor, parallelism=PARALLEL)"
]
Expand Down