Skip to content

Commit dee9242

Browse files
committed
Updated Readme, defaulted composes to use one GPU default
1 parent 1eb27c3 commit dee9242

File tree

6 files changed

+29
-13
lines changed

6 files changed

+29
-13
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ After that, change the docker-compose to point to your files (including filename
2121
You can build the docker file beforehand using
2222

2323
```
24-
docker build . -t ciselab/codebert-code2text
24+
docker build . -t ciselab/codebert-code2text:1.3 -t ciselab/codebert-code2text:latest
2525
```
2626

2727
Or you can comment-in the build parts in the docker-compose.yml
@@ -33,7 +33,7 @@ docker-compose up
3333
```
3434

3535
To verify that all your compose attributes are set correctly, I recommend to run first on a reduced set (e.g. 5 lines per file).
36-
This is represented in the *docker-compose-minimal.yml*.
36+
This is represented in the *docker-compose-minimal.yml*. It should take less than 30 minutes to give you an overview.
3737

3838

3939
```
@@ -84,14 +84,14 @@ The *preprocess.py* in the Dataset.zip sometimes failes to unzip all of the data
8484
If this error occurs, some of the .jsonls will still be gzipped.
8585
To fix this, simply run `gunzip` on the remaining files and re-run the preprocess.py.
8686

87-
====================================================================================
87+
------
88+
8889

8990
Due to file-locks, it is not possible to use a model OR a dataset at two experiments at the same time.
9091
If you want to run two experiments at once using the same model, you need to make a copy.
9192
A short test from me showed that they give the same results when all parameters are equal.
9293

93-
94-
====================================================================================
94+
------
9595

9696
Another issue is from windows, atleast default windows.
9797
if you get an error like
@@ -108,7 +108,7 @@ This is due to windows changing the line-breaks / file encodings. Thanks windows
108108
Its might easier/faster to pull the image from this repository, or you have to [edit the entrypoint to be compatible with windows](https://askubuntu.com/questions/966488/how-do-i-fix-r-command-not-found-errors-running-bash-scripts-in-wsl).
109109

110110

111-
====================================================================================
111+
------
112112

113113
```
114114
xxx | RuntimeError: CUDA out of memory. Tried to allocate 62.00 MiB (GPU 0; 12.00 GiB total capacity; 10.57 GiB already allocated; 0 bytes free; 10.71 GiB reserved in total by PyTorch)
@@ -118,7 +118,7 @@ This happens in old Pytorch versions.
118118

119119
Reduce batch size. To the best of my knowledge, nothing else can be done about this in old pytorch versions.
120120

121-
====================================================================================
121+
------
122122

123123
Another thing that can happen is that the container stops after printing "starting epoch" like such:
124124

changes.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,12 @@ this file holds the changes applied to the existing project from CodeXGlue
88
- moved old readme to initial readme, started my own
99
- prepare.sh to run the download from initial readme and make minimal datasets
1010
- Added a switch for model-loading in the entrypoint
11-
- Moved to Cuda Container, removed conda environment.yml in favour of pip requirements.txt
11+
12+
1.3
13+
---------
14+
15+
16+
- Moved to Cuda Container, removed conda environment.yml in favour of pip requirements.txt
17+
- Added a lot of known problems
18+
- Updated Code to match CodeXGlue Repository (has been changed since initial checkout)
19+
- Updated Composes to only use one GPU default

docker-compose-minimal.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ services:
1515
resources:
1616
reservations:
1717
devices:
18-
- capabilities: [gpu]
18+
- driver: nvidia
19+
count: 1
20+
capabilities: [gpu]

docker-compose-pretrained-minimal.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ services:
2121
resources:
2222
reservations:
2323
devices:
24-
- capabilities: [gpu]
24+
- driver: nvidia
25+
count: 1
26+
capabilities: [gpu]

docker-compose-python.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ services:
1818
resources:
1919
reservations:
2020
devices:
21-
- capabilities: [gpu]
21+
- driver: nvidia
22+
count: 1
23+
capabilities: [gpu]

docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
- ./dataset/java/:/dataset:ro
88
- ./compose_output:/experiment/output
99
environment:
10-
epochs: 5
10+
epochs: 10
1111
train_file: /dataset/train.jsonl
1212
valid_file: /dataset/valid.jsonl
1313
test_file: /dataset/test.jsonl
@@ -16,4 +16,6 @@ services:
1616
resources:
1717
reservations:
1818
devices:
19-
- capabilities: [gpu]
19+
- driver: nvidia
20+
count: 1
21+
capabilities: [gpu]

0 commit comments

Comments
 (0)