You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file augmentations.jl is currently in a broken state following a recent PR #30 merge. The PR introduced a second, incompatible implementation of apply_augmentations and apply_augmentation directly into the same file without removing the original code. The result is syntactically invalid Julia — both functions have duplicate bodies interleaved, with unreachable code after error(...) statements and mismatched end blocks.
What is broken
apply_augmentations contains two loops with conflicting config key paths:
Old version reads from config["augmentations"] and config["order"] at the root level
New version reads from config["augmentation"]["augmentations"] — the correct schema
apply_augmentation contains duplicate elseif branches for "Mirror transform", "Scale transform", "Gaussian blur transform", and "Elastic deformation transform" with different (incompatible) argument signatures
The file does not parse or compile in its current state
Root cause
The repo currently has no CI pipeline, so parse errors and broken code can slip through during merge without any automated safety net. This is a good opportunity to add one.
Fix
A clean version of augmentations.jl has been prepared that:
Uses the correct config schema (config["augmentation"][...])
Unifies probability handling (per-augmentation p_rand with global fallback)
Fixes argument signatures for Scale transform, Mirror transform, and Gaussian blur transform
Adds a proper else error clause for unknown augmentation names
Steps to reproduce
include("augmentations.jl") # ParseError or MethodError at runtime
Expected behaviour
File parses cleanly and augmentations apply correctly according to the config schema.
Description
The file
augmentations.jlis currently in a broken state following a recent PR #30 merge. The PR introduced a second, incompatible implementation ofapply_augmentationsandapply_augmentationdirectly into the same file without removing the original code. The result is syntactically invalid Julia — both functions have duplicate bodies interleaved, with unreachable code aftererror(...)statements and mismatchedendblocks.What is broken
apply_augmentationscontains two loops with conflicting config key paths:config["augmentations"]andconfig["order"]at the root levelconfig["augmentation"]["augmentations"]— the correct schemaapply_augmentationcontains duplicateelseifbranches for"Mirror transform","Scale transform","Gaussian blur transform", and"Elastic deformation transform"with different (incompatible) argument signaturesRoot cause
The repo currently has no CI pipeline, so parse errors and broken code can slip through during merge without any automated safety net. This is a good opportunity to add one.
Fix
A clean version of
augmentations.jlhas been prepared that:config["augmentation"][...])p_randwith global fallback)Scale transform,Mirror transform, andGaussian blur transformelseerror clause for unknown augmentation namesSteps to reproduce
Expected behaviour
File parses cleanly and augmentations apply correctly according to the config schema.
Suggested action
include()on all source filesjulia --project -e 'using Pkg; Pkg.test()'Happy to open a separate PR for the CI setup if that would be helpful.