Soutrik commited on
Commit
53f077b
1 Parent(s): 3e4ba8b

docker-compose updated

Browse files
Files changed (3) hide show
  1. basic_setup.md +9 -1
  2. docker-compose.yaml +23 -23
  3. dvc.yaml +2 -1
basic_setup.md CHANGED
@@ -385,4 +385,12 @@ dvc repro
385
  ```bash
386
  python -m src.train --multirun experiment=catdog_experiment_convnext ++task_name=train ++train=True ++test=False hparam=catdog_classifier_covnext
387
  python -m src.create_artifacts
388
- ```
 
 
 
 
 
 
 
 
 
385
  ```bash
386
  python -m src.train --multirun experiment=catdog_experiment_convnext ++task_name=train ++train=True ++test=False hparam=catdog_classifier_covnext
387
  python -m src.create_artifacts
388
+ ```
389
+
390
+ 14. ## __Latest Execution Command__
391
+
392
+ ```bash
393
+ python -m src.train_optuna_callbacks experiment=catdog_experiment ++task_name=train ++train=True ++test=False
394
+ python -m src.train_optuna_callbacks experiment=catdog_experiment ++task_name=test ++train=False ++test=True
395
+ python -m src.infer experiment=catdog_experiment
396
+ ```
docker-compose.yaml CHANGED
@@ -6,7 +6,8 @@ services:
6
  context: .
7
  command: |
8
  python -m src.train_optuna_callbacks experiment=catdog_experiment ++task_name=train ++train=True ++test=False && \
9
- touch /app/checkpoints/train_done.flag
 
10
  volumes:
11
  - ./data:/app/data
12
  - ./checkpoints:/app/checkpoints
@@ -25,7 +26,7 @@ services:
25
  build:
26
  context: .
27
  command: |
28
- sh -c 'while [ ! -f /app/checkpoints/train_done.flag ]; do sleep 10; done && python -m src.train_optuna_callbacks experiment=catdog_experiment ++task_name=eval ++train=False ++test=True'
29
  volumes:
30
  - ./data:/app/data
31
  - ./checkpoints:/app/checkpoints
@@ -42,27 +43,26 @@ services:
42
  depends_on:
43
  - train
44
 
45
- # Uncomment if you want to use inference service in the future
46
- # inference:
47
- # build:
48
- # context: .
49
- # command: |
50
- # sh -c 'while [ ! -f /app/checkpoints/train_done.flag ]; do sleep 10; done && python -m src.infer experiment=catdog_experiment'
51
- # volumes:
52
- # - ./data:/app/data
53
- # - ./checkpoints:/app/checkpoints
54
- # - ./artifacts:/app/artifacts
55
- # - ./logs:/app/logs
56
- # environment:
57
- # - PYTHONUNBUFFERED=1
58
- # - PYTHONPATH=/app
59
- # shm_size: '4g'
60
- # networks:
61
- # - default
62
- # env_file:
63
- # - .env
64
- # depends_on:
65
- # - train
66
 
67
  volumes:
68
  data:
 
6
  context: .
7
  command: |
8
  python -m src.train_optuna_callbacks experiment=catdog_experiment ++task_name=train ++train=True ++test=False && \
9
+ python -m src.create_artifacts && \
10
+ touch ./checkpoints/train_done.flag
11
  volumes:
12
  - ./data:/app/data
13
  - ./checkpoints:/app/checkpoints
 
26
  build:
27
  context: .
28
  command: |
29
+ sh -c 'while [ ! -f /app/checkpoints/train_done.flag ]; do sleep 10; done && python -m src.train_optuna_callbacks experiment=catdog_experiment ++task_name=test ++train=False ++test=True'
30
  volumes:
31
  - ./data:/app/data
32
  - ./checkpoints:/app/checkpoints
 
43
  depends_on:
44
  - train
45
 
46
+ inference:
47
+ build:
48
+ context: .
49
+ command: |
50
+ sh -c 'while [ ! -f /app/checkpoints/train_done.flag ]; do sleep 10; done && python -m src.infer experiment=catdog_experiment'
51
+ volumes:
52
+ - ./data:/app/data
53
+ - ./checkpoints:/app/checkpoints
54
+ - ./artifacts:/app/artifacts
55
+ - ./logs:/app/logs
56
+ environment:
57
+ - PYTHONUNBUFFERED=1
58
+ - PYTHONPATH=/app
59
+ shm_size: '4g'
60
+ networks:
61
+ - default
62
+ env_file:
63
+ - .env
64
+ depends_on:
65
+ - train
 
66
 
67
  volumes:
68
  data:
dvc.yaml CHANGED
@@ -3,7 +3,8 @@ stages:
3
  cmd: docker-compose run --rm train
4
  deps:
5
  - docker-compose.yaml
6
- - src/train.py
 
7
  - data
8
  outs:
9
  - checkpoints/best-checkpoint.ckpt
 
3
  cmd: docker-compose run --rm train
4
  deps:
5
  - docker-compose.yaml
6
+ - src/train_optuna_callbacks.py
7
+ - src/create_artifacts.py
8
  - data
9
  outs:
10
  - checkpoints/best-checkpoint.ckpt