Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jan 28, 2021
1 parent cd0e775 commit 3399abb
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ jobs:
# run: |
# # tox --sitepackages
# python -m pip install -e .
# # python flash_examples/generic_task.py
# # python flash_examples/tabular_data.py
# # python flash_examples/text_classification.py
# # python flash_examples/torchvision_classifier.py

- name: Upload pytest test results
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ print(predictions)
```
To run the example:
```bash
python flash_examples/finetuning/text_classification.py
python flash_examples/finetuning/classify_text.py
```

### Tabular classification
Expand Down
2 changes: 1 addition & 1 deletion flash_examples/generic_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
dataset = datasets.MNIST('./data', download=True, transform=transforms.ToTensor())

# 3. Split the data randomly
train, val, test = random_split(dataset, [50000, 5000, 5000])
train, val, test = random_split(dataset, [50000, 5000, 5000]) # type: ignore

# 4. Create the model
classifier = ClassificationTask(model, loss_fn=nn.functional.cross_entropy, optimizer=optim.Adam, learning_rate=10e-3)
Expand Down
Empty file added tests/core/__init__.py
Empty file.
Empty file added tests/examples/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions tests/examples/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def run_test(filepath):
"file",
[
"image_classification.py",
"tabular_classification.py",
# "text_classification.py" TODO: takes too long
"classify_tabular.py",
# "classify_text.py" TODO: takes too long
]
)
def test_finetune_example(tmpdir, file):
Expand Down

0 comments on commit 3399abb

Please sign in to comment.