Skip to content

Commit 2342c52

Browse files
authored
fix: convert DEV_MODE to int, mention in contributing.md (#82)
* fix: convert DEV_MODE to int, mention in contributing.md * fix: explicit version file [skip ci]
1 parent d709d99 commit 2342c52

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CONTRIBUTING.md

+8
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ To develop and test Code-Generator:
5555
- [templates](https://github.com/pytorch-ignite/code-generator/tree/master/templates) - Directory containing ML/DL Templates
5656
- [tests](https://github.com/pytorch-ignite/code-generator/tree/master/tests) - Directory containing test related files
5757

58+
When developing the app and new templates, run the app in dev mode:
59+
60+
```sh
61+
DEV_MODE=1 streamlit run app/streamlit_app.py
62+
```
63+
64+
This allows to run and debug the generated templates from the `dist` folder.
65+
5866
> TIP
5967
>
6068
> If you are adding a new template, use Single Model, Singe Optimizer Template from

app/streamlit_app.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
from codegen import CodeGenerator
88
from utils import import_from_file
99

10-
__version__ = "0.1.0"
11-
DEV_MODE = os.getenv("DEV_MODE", 0) == 1
10+
DEV_MODE = int(os.getenv("DEV_MODE", 0)) == 1
1211

1312
FOLDER_TO_TEMPLATE_NAME = {
1413
"Image Classification": "image_classification",

version.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1.0

0 commit comments

Comments
 (0)