Skip to main content

A simple model that learns to predict Python source code

Project description

Source Code Modeling

This repo trains deep learning models on source code.

Try it yourself

  1. Clone this repo
  2. Install requirements from requirements.txt
  3. Run python_autocomplete/create_dataset.py.
    • It collects repos mentioned in PyTorch awesome list
    • Downloads the zip files of the repos
    • Extract the zips
    • Remove non python files
    • Collect all python code to data/train.py and, data/eval.py
  4. Run python_autocomplete/train.py to train the model. Try changing hyper-parameters like model dimensions and number of layers.
  5. Run evaluate.py to evaluate the model.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labml_python_autocomplete-0.0.3.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distribution

labml_python_autocomplete-0.0.3-py3-none-any.whl (10.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page