Skip to content

Commit

Permalink
fix(pipeline): docker model missing + integration data missing in out…
Browse files Browse the repository at this point in the history
…put (#43)

* chore(all): clean

* chore(all): clean

* chore(all): clean

* chore(all): clean

* chore(all): clean

* chore(all): clean

* chore(all): clean

* chore(all): clean

* chore(all): clean

* chore(all): clean

* chore(all): clean
  • Loading branch information
guillaume-chervet authored Oct 24, 2024
1 parent cd906f8 commit 065993b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/docker_with_model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,17 @@ jobs:
RESOURCE_GROUP=${{ inputs.resource_group }}
WORKSPACE_NAME=${{ inputs.workspace_name }}
AZURE_LOCATION=${{ inputs.location }}
DOWNLOAD_PATH=production/api/core/model
DOWNLOAD_PATH=../production/api/core/model
cd train
chmod +x ./run_download_model.sh
echo './run_download_model.sh "$MODEL_VERSION" "$RESOURCE_GROUP" "$WORKSPACE_NAME" "$AZURE_LOCATION" "${{ secrets.AZURE_SUBSCRIPTION_ID }}" "$DOWNLOAD_PATH"'
./run_download_model.sh "$MODEL_VERSION" "$RESOURCE_GROUP" "$WORKSPACE_NAME" "$AZURE_LOCATION" "${{ secrets.AZURE_SUBSCRIPTION_ID }}" "$DOWNLOAD_PATH"
cd ..
cd production/api/core/model
# az ml model download --name cats-dogs-others --version $MODEL_VERSION --resource-group $RESOURCE_GROUP --workspace-name $WORKSPACE_NAME
# find files recursively and copy them to the current directory root
find ./ -name '*.keras' -exec cp "{}" ./ \;
ls
ls -l
rm -r ./cats-dogs-others
- name: Log in to Docker Hub
uses: docker/login-action@v2
Expand Down
5 changes: 4 additions & 1 deletion train/output/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@


def copy_files(input_path: str, output_path: str):
print(f"Copying files from {input_path} to {output_path}")
path_source = Path(input_path)
path_destination = Path(output_path)

path_destination.mkdir(parents=True, exist_ok=True)

for file in path_source.glob("*"):
print(f"Copying {file.name}")
if file.is_file():
with file.open("rb") as f_source:
content = f_source.read()
Expand All @@ -33,4 +35,5 @@ def copy_files(input_path: str, output_path: str):
copy_files(extraction_images_input, str(Path(main_output) / "extraction_images"))
copy_files(extraction_hash_input, str(Path(main_output) / "extraction_hash"))
copy_files(model_input, str(Path(main_output) / "model"))
copy_files(integration_input, str(Path(main_output) / "integration"))
copy_files(str(Path(integration_input) / "ground_truth"), str(Path(main_output) / "integration" / "ground_truth"))
copy_files(str(Path(integration_input) / "mlcli"), str(Path(main_output) / "integration" / "mlcli"))

0 comments on commit 065993b

Please sign in to comment.