Skip to content

Commit

Permalink
Change default output directory to /output
Browse files Browse the repository at this point in the history
  • Loading branch information
olzhasar-reef committed Sep 11, 2024
1 parent 4862f46 commit c310526
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/smoke_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ jobs:
echo -e "\ngenerated batches:"
ls
ls output/
ls /output/
echo -e "\nchecking if prompts are generated fine"
for i in $(seq 1 5); do
if [ $(cat output/prompts_uuid$i.txt | wc -l) -ne 20 ]; then
echo "Missing prompts: $(cat output/prompts_uuid{$i}.txt)"
if [ $(cat /output/prompts_uuid$i.txt | wc -l) -ne 20 ]; then
echo "Missing prompts: $(cat /output/prompts_uuid{$i}.txt)"
exit 1
fi
done
echo "OK"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ docker build -t compute-horde-prompt-gen .

### run image
```bash
docker run -v ./output/:/app/output/ compute-horde-prompt-gen --model_name phi3 --number_of_prompts_per_batch 4 --uuids uuid1,uuid2,uuid3
docker run -v ./output/:/output/ compute-horde-prompt-gen --model_name phi3 --number_of_prompts_per_batch 4 --uuids uuid1,uuid2,uuid3
```

### testint
Expand Down
7 changes: 4 additions & 3 deletions src/compute_horde_prompt_gen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ WORKDIR /app

# Install Python and system dependencies
RUN apt-get update && apt-get install -y \
python3 \
python3-pip
python3 \
python3-pip

# Install PyTorch Hugging Face Transformers and other necessary packages
RUN pip3 install torch
RUN pip3 install transformers sentencepiece accelerate bitsandbytes

# Create an output folder
RUN mkdir /app/output
RUN mkdir /output
RUN chown -R 1000:1000 /output

# Copy your Python script into the container
COPY saved_models/ /app/saved_models/
Expand Down
2 changes: 1 addition & 1 deletion src/compute_horde_prompt_gen/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def generate_prompts(
parser.add_argument(
"--output_folder_path",
type=str,
default="output/",
default="/output/",
help="Folder path to save the generated prompts to",
)

Expand Down

0 comments on commit c310526

Please sign in to comment.