Skip to content

Commit 2b0e93a

Browse files
committed
Make tests pass
Configuring VS Code for Python is well explained... in the extension documentation. I should have read that first
1 parent e0b12bb commit 2b0e93a

File tree

6 files changed

+6
-32
lines changed

6 files changed

+6
-32
lines changed

.gitignore

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,6 @@ coverage.xml
5252
*.mo
5353
*.pot
5454

55-
# Django stuff:
56-
*.log
57-
local_settings.py
58-
db.sqlite3
59-
60-
# Flask stuff:
61-
instance/
62-
.webassets-cache
63-
64-
# Scrapy stuff:
65-
.scrapy
6655

6756
# Sphinx documentation
6857
docs/_build/
@@ -80,12 +69,6 @@ ipython_config.py
8069
# pyenv
8170
.python-version
8271

83-
# celery beat schedule file
84-
celerybeat-schedule
85-
86-
# SageMath parsed files
87-
*.sage.py
88-
8972
# Environments
9073
.env
9174
.venv
@@ -95,13 +78,6 @@ ENV/
9578
env.bak/
9679
venv.bak/
9780

98-
# Spyder project settings
99-
.spyderproject
100-
.spyproject
101-
102-
# Rope project settings
103-
.ropeproject
104-
10581
# mkdocs documentation
10682
/site
10783

@@ -111,3 +87,4 @@ venv.bak/
11187
dmypy.json
11288

11389
*~demo.*
90+
.vscode/**

demo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ def main():
1313
# do one pass through the algorithm
1414
modified = morph.once(my_model)
1515

16+
print(modified) # proof that the thing wasn't tampered with
17+
1618
my_dataloader = DataLoader(TensorDataset(torch.randn(2, 28, 28)))
1719

1820
# get back the class that will do work

morph/.vscode/settings.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

morph/nn/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ def make_children_list(children_or_named_children):
99
"""
1010
return [c for c in children_or_named_children]
1111

12+
#################### NEW LAYERS ####################
13+
1214
def new_layer(base_layer: nn.Module, type_name: str, in_dim: int, out_dim: int) -> nn.Module:
1315

1416
has_bias = layer_has_bias(base_layer)

morph/nn/utils_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import torch.nn as nn
22
import unittest
33

4-
from utils import new_input_layer, new_output_layer
5-
4+
from .utils import new_input_layer, new_output_layer
65

76
class TestLayer(unittest.TestCase):
87
def test_new_input_layer_only_touches_output_Linear(self):

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
author_email='stevethecoder34@gmail.com', # Type in your E-Mail
1515
# Provide either the link to your github or to your website
1616
url='https://github.com/stephenjfox/Morph.py',
17-
# I explain this later on
1817
download_url='https://github.com/stephenjfox/Morph.py/archive/v0.0.6.tar.gz',
1918
keywords=[
2019
'machine learning', 'deep learning', 'nas', 'architecture',

0 commit comments

Comments
 (0)