From 8279494da83e467e47ca008ab26e601e8553e038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maik=20Fr=C3=B6be?= Date: Tue, 14 May 2024 14:28:39 +0200 Subject: [PATCH 1/2] change batch size to 12 --- Dockerfile | 7 +++++++ README.md | 18 ++++++++++++++++++ test.py | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d2d57a7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +# docker build -t v5 . +FROM registry.webis.de/code-research/tira/tira-user-team-chenteam-chen123hhh/tira:v4-tira-docker-software-id-resonnt-halite + +ADD test.py /workspace/clef/test.py + +ENTRYPOINT [ "python", "/workspace/clef/test.py", "$inputDataset/dataset.jsonl", "$outputDir" ] + diff --git a/README.md b/README.md new file mode 100644 index 0000000..74ffbd7 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ + +Build via: + +``` +docker build -t v5 . +``` + +Run via: + +``` +tira-run \ + --input-dataset generative-ai-authorship-verification-panclef-2024/pan24-generative-authorship-tiny-smoke-20240417-training \ + --image v5 \ + --tira-vm-id team-chenteam-chen123hhh \ + --skip-local-test \ + --push true +``` + diff --git a/test.py b/test.py index 0e658d7..3f371f1 100644 --- a/test.py +++ b/test.py @@ -81,7 +81,7 @@ def __getitem__(self, idx): # os.environ["CUDA_VISIBLE_DEVICES"] = '2' device = 'cuda' if torch.cuda.is_available() else 'cpu' print(f'Using {device} device') - batch_size = 24 + batch_size = 12 checkpoint = "/t-ng/Bert/bert_model/MyModel" input_path = sys.argv[1] output_dir = sys.argv[2] From 6454e9890fe76b320414b1674e292461138b8cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maik=20Fr=C3=B6be?= Date: Tue, 14 May 2024 15:34:22 +0200 Subject: [PATCH 2/2] fix model path --- test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index 3f371f1..2328a0a 100644 --- a/test.py +++ b/test.py @@ -81,8 +81,8 @@ def __getitem__(self, idx): # os.environ["CUDA_VISIBLE_DEVICES"] = '2' device = 'cuda' if torch.cuda.is_available() else 'cpu' print(f'Using {device} device') - batch_size = 12 - checkpoint = "/t-ng/Bert/bert_model/MyModel" + batch_size = 8 + checkpoint = "/workspace/clef/MyModel" input_path = sys.argv[1] output_dir = sys.argv[2] # --------------------------------------------------------------------------