Skip to content

Fix hardcoded absolute paths in BYOL/Inference scripts#169

Open
Vikasboura wants to merge 2 commits intoML4SCI:mainfrom
Vikasboura:fix-hardcoded-path
Open

Fix hardcoded absolute paths in BYOL/Inference scripts#169
Vikasboura wants to merge 2 commits intoML4SCI:mainfrom
Vikasboura:fix-hardcoded-path

Conversation

@Vikasboura
Copy link

@Vikasboura Vikasboura commented Mar 6, 2026

This PR fixes hardcoded absolute paths in the BYOL and inference scripts within the
Transformers_Classification_DeepLense_Kartik_Sachdev module.

Changes:

• Replaced absolute paths (e.g. /home/kartik/...) with cross-platform path construction.
• Added BASE_DIR using os.path.dirname(os.path.abspath(file)).
• Used os.path.join() for building dataset and model paths.

Files updated:

• finetune.py
• finetune_byol.py
• inference.py
• self_supervised/examples/byol/finetune_byol.py
• self_supervised/examples/byol/inference_byol.py
• self_supervised/examples/byol/load_pretrained_byol.py

This improves portability across Windows, Linux, and macOS.

Fixes #143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

{Bug] Hardcoded Absolute Paths in BYOL/Inference Scripts (Transformers Classification DeepLense)

1 participant