Skip to content

Various Experiments, possibly ML related

License

Notifications You must be signed in to change notification settings

r-sukanya/misc-exp

Repository files navigation

Various Experiments, possibly ML related

asyncio testing in notebooks | Prototyping to tested code | Causality and function approximations | Keyword detection from scratch

Support | Getting started | View on nbviewer

asyncio testing in notebooks

blog post source

How can you test asyncio code inside notebooks? This blog post sketches how to test asyncio code using pytest inside nobteooks. The post also discusses how threading can help to run multiple asyncio event loops inside the same interpreter.

Prototyping to tested code

slides | source

How can pytest be used in Jupyter notebooks? And why does it make sense? This talk discusses how Jupyter notebooks form an effective environment for prototyping and how code can be refactored code into modules. A particular emphasis is placed on testing and the use of ipytest.

Causality and function approximations

blog post | source

How do causal analysis and function approximations interact? This blog post demonstrates how results for tabular methods break down for models with finite capacity.

Keyword detection from scratch

blog post | source

Detecting keywords in speech from data-collection to modelling, includes code to listen continuously for commands.

Support

  • chmp: support code as a python package

Getting started

This project uses pipenv to organize dependencies and common scripts. To setup a virtual environment with all requirements use:

pipenv sync --dev

After that the following tasks can be performed:

# run all pre-commit tasks (docs, formatting, tests)
pipenv run precommit

# run pre-commit tasks and integration tests
pipenv run precommit-full

# run notebook integration tests
pipenv run integration

# run tests
pipenv run test

# update the documentation
pipenv run docs