Skip to content

Conversation

@ArneBinder
Copy link
Owner

@ArneBinder ArneBinder commented Aug 31, 2022

Quickstart:

  1. click on the green button Use this template -> enable Include all branches and choose a repository name, e.g. my_cool_project -> click on Create repository from template
  2. clone the new repo, cd into it and call git switch simple_text_classification
  3. follow the remaining steps of the main Quickstart instructions (without the first step to clone the repo)
  4. setup Weights & Biases: create an account, if you don't already have one, and generate an API key from here
  5. start example training, e.g. on imdb:
    python train.py experiment=imdb (optionally add the parameter trainer.gpus=1 to train on a GPU)
  6. adapt or create any dataset, taskmodule and / or model for your needs

Notes:

  • Maybe have a look at the diff of this PR to see what was needed to get this use-case working.
  • Per coincidence the imdb dataset consists of documents of a type that matches the requirement for SimpleTransformerTextClassificationTaskModule, i.e. they have a text and a label annotation field. If this is not the case, pytorch_ie.Datasets provide a method cast_document_type that allows to re-map or hide any fields of the contained documents.

@ArneBinder ArneBinder changed the title [WIP] simple text classification [DONT MERGE] simple text classification Aug 31, 2022
@ArneBinder ArneBinder force-pushed the simple_text_classification branch from ce53ced to e42f04d Compare September 7, 2022 10:00
@ArneBinder ArneBinder force-pushed the simple_text_classification branch from 754f8fd to 442cbd9 Compare September 14, 2022 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants