-
Notifications
You must be signed in to change notification settings - Fork 136
Add Support for Final Validation After Fine-Tuning #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Geo99pro
wants to merge
31
commits into
opendatalab:main
Choose a base branch
from
Geo99pro:feature/final-validation-after-finetuning
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
c58f32e
fix:Update NCCL environment variable and improve AMP usage in trainin…
Geo99pro fbffec7
fix: Add conditional batch normalization to dilated convolution in Di…
Geo99pro ebc4c45
fix: Update autocast usage in check_train_batch_size function for imp…
Geo99pro f24bc62
fix: Update autocast usage in check_amp function for improved compati…
Geo99pro 48106f5
fix: Update autocast usage in VarifocalLoss for improved compatibilit…
Geo99pro 1ec3dae
fix: Add FP16 conversion function for model optimization in torch_utils
Geo99pro e13be8b
fix: Update environment variable for NCCL blocking wait and adjust au…
Geo99pro 0d6735c
fix: Simplify dilated convolution by always applying batch normalization
Geo99pro 899d4f0
fix: Update autocast usage in check_train_batch_size for improved com…
Geo99pro e98471a
fix: Update autocast usage in check_amp function for improved compati…
Geo99pro 01334b6
fix: Update autocast usage in VarifocalLoss to improve compatibility …
Geo99pro fcf431f
refactor: Remove convert_to_fp16 function and streamline model handli…
Geo99pro 5bcbb15
fix: Update environment variable for NCCL blocking wait and improve a…
Geo99pro 2d49145
fix: Enhance dilated_conv method to conditionally apply batch normali…
Geo99pro 615db39
fix: Update autocast usage in check_train_batch_size for improved com…
Geo99pro e7e1479
fix: Update autocast usage in check_amp function for improved compati…
Geo99pro 909ef27
fix: Update autocast usage in VarifocalLoss to align with PyTorch bes…
Geo99pro 88eaaa6
fix: Add convert_to_fp16 function for model half precision conversion
Geo99pro 015f105
feat: Add Dockerfile for environment setup with CUDA 11.8 and Python 3.9
Geo99pro d0ad89f
fix: Update Dockerfile to authorize reading and writing to the home d…
Geo99pro 916c7b2
fix: Refactor autocast usage in BaseTrainer for improved compatibilit…
Geo99pro 7314f9a
fix: Update autocast usage in check_train_batch_size for improved cla…
Geo99pro 6b95b99
fix: Update autocast usage in check_amp for improved clarity and comp…
Geo99pro 74ba0b2
fix: Update autocast usage in VarifocalLoss for improved clarity and …
Geo99pro 7ba2a65
fix: Update Dockerfile to copy entire project directory for improved …
Geo99pro caa205a
fix: Update torch.load to include weights_only parameter for improved…
Geo99pro 6e7d25a
fix: Update Dockerfile to change HOME environment variable and stream…
Geo99pro b40901a
fix: Remove the HOME environment variable and streamline the Docker f…
Geo99pro dcf77f9
feat: Add requirements.txt for dependency management
Geo99pro 7e35688
feat: Add requirements.txt for dependency management
Geo99pro 1f4dc4c
Merge branch 'feature/final-validation-after-finetuning' of https://g…
Geo99pro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Change the version of cuda and cudnn according to user cuda and cudnn version | ||
| FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| # Install libraries and dependencies | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| software-properties-common \ | ||
| ffmpeg \ | ||
| libsm6 \ | ||
| libxext6 \ | ||
| git \ | ||
| curl \ | ||
| unzip \ | ||
| wget \ | ||
| tar \ | ||
| build-essential \ | ||
| libopenmpi-dev \ | ||
| libcairo2-dev \ | ||
| pkg-config \ | ||
| cmake \ | ||
| libpoppler-cpp-dev \ | ||
| poppler-utils \ | ||
| && add-apt-repository ppa:deadsnakes/ppa \ | ||
| && apt-get update \ | ||
| && apt-get install -y --no-install-recommends python3.9 python3.9-distutils python3.9-dev python3-pip \ | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN pip install --upgrade setuptools | ||
|
|
||
| # Update Python symlink to point to Python 3.9 | ||
| RUN ln -sf /usr/bin/python3.9 /usr/bin/python \ | ||
| && ln -sf /usr/bin/python3.9 /usr/bin/python3 \ | ||
| && pip install huggingface-hub | ||
|
|
||
| COPY requirements.txt . | ||
|
|
||
| RUN pip install -r requirements.txt | ||
|
|
||
| CMD [ "bash" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello sir @JulioZhao97, I've added a requirements file to better manage the dependencies that will make it easy to use docker. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| albucore==0.0.23 | ||
| albumentations==2.0.5 | ||
| annotated-types==0.7.0 | ||
| blinker==1.4 | ||
| certifi==2025.1.31 | ||
| charset-normalizer==3.4.1 | ||
| contourpy==1.3.0 | ||
| cryptography==3.4.8 | ||
| cycler==0.12.1 | ||
| dbus-python==1.2.18 | ||
| distro==1.7.0 | ||
| eval_type_backport==0.2.2 | ||
| filelock==3.18.0 | ||
| fonttools==4.56.0 | ||
| fsspec==2025.3.0 | ||
| httplib2==0.20.2 | ||
| huggingface-hub==0.29.3 | ||
| idna==3.10 | ||
| importlib-metadata==4.6.4 | ||
| importlib_resources==6.5.2 | ||
| jeepney==0.7.1 | ||
| Jinja2==3.1.6 | ||
| keyring==23.5.0 | ||
| kiwisolver==1.4.7 | ||
| launchpadlib==1.10.16 | ||
| lazr.restfulclient==0.14.4 | ||
| lazr.uri==1.0.6 | ||
| MarkupSafe==3.0.2 | ||
| matplotlib==3.9.4 | ||
| more-itertools==8.10.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.2.1 | ||
| numpy==2.0.2 | ||
| nvidia-cublas-cu12==12.4.5.8 | ||
| nvidia-cuda-cupti-cu12==12.4.127 | ||
| nvidia-cuda-nvrtc-cu12==12.4.127 | ||
| nvidia-cuda-runtime-cu12==12.4.127 | ||
| nvidia-cudnn-cu12==9.1.0.70 | ||
| nvidia-cufft-cu12==11.2.1.3 | ||
| nvidia-curand-cu12==10.3.5.147 | ||
| nvidia-cusolver-cu12==11.6.1.9 | ||
| nvidia-cusparse-cu12==12.3.1.170 | ||
| nvidia-cusparselt-cu12==0.6.2 | ||
| nvidia-nccl-cu12==2.21.5 | ||
| nvidia-nvjitlink-cu12==12.4.127 | ||
| nvidia-nvtx-cu12==12.4.127 | ||
| oauthlib==3.2.0 | ||
| opencv-python==4.11.0.86 | ||
| opencv-python-headless==4.11.0.86 | ||
| packaging==24.2 | ||
| pandas==2.2.3 | ||
| pillow==11.1.0 | ||
| psutil==7.0.0 | ||
| py-cpuinfo==9.0.0 | ||
| pydantic==2.11.0 | ||
| pydantic_core==2.33.0 | ||
| PyGObject==3.42.1 | ||
| PyJWT==2.3.0 | ||
| pyparsing==2.4.7 | ||
| python-apt==2.4.0+ubuntu4 | ||
| python-dateutil==2.9.0.post0 | ||
| pytz==2025.2 | ||
| PyYAML==6.0.2 | ||
| requests==2.32.3 | ||
| scipy==1.13.1 | ||
| seaborn==0.13.2 | ||
| SecretStorage==3.3.1 | ||
| simsimd==6.2.1 | ||
| six==1.16.0 | ||
| stringzilla==3.12.3 | ||
| sympy==1.13.1 | ||
| thop==0.1.1.post2209072238 | ||
| torch==2.6.0 | ||
| torchvision==0.21.0 | ||
| tqdm==4.67.1 | ||
| triton==3.2.0 | ||
| typing-inspection==0.4.0 | ||
| typing_extensions==4.13.0 | ||
| tzdata==2025.2 | ||
| urllib3==2.3.0 | ||
| #pycairo | ||
| wadllib==1.3.6 | ||
| zipp==3.21.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sir @JulioZhao97 I did this because while debugging, I noticed that in: https://github.com/opendatalab/DocLayout-YOLO/blob/main/doclayout_yolo/nn/tasks.py more specifically in the
fuse function (line 180)you merge theConv2d()and theBatchNorm2d()whose purpose is to speed up inference. Since you delete after the bn, the model undergoes this alteration. I could be wrong, but it will be a pleasure to learn from you.