Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Fidle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Talks
Fidle
Commits
fe6377ec
Commit
fe6377ec
authored
1 year ago
by
Achille Mbogol Touye
Browse files
Options
Downloads
Patches
Plain Diff
Nice progressbar
parent
0fe55d42
No related branches found
Branches containing commit
No related tags found
1 merge request
!9
Dev
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Wine.Lightning/modules/progressbar.py
+37
-0
37 additions, 0 deletions
Wine.Lightning/modules/progressbar.py
with
37 additions
and
0 deletions
Wine.Lightning/modules/progressbar.py
0 → 100644
+
37
−
0
View file @
fe6377ec
# ------------------------------------------------------------------
# _____ _ _ _
# | ___(_) __| | | ___
# | |_ | |/ _` | |/ _ \
# | _| | | (_| | | __/
# |_| |_|\__,_|_|\___|
# ------------------------------------------------------------------
# Formation Introduction au Deep Learning (FIDLE)
# CNRS/SARI/DEVLOG 2023
# ------------------------------------------------------------------
# 2.0 version by Achille Mbogol Touye (EFELIA-MIAI/SIMAP¨), sep 2023
from
tqdm
import
tqdm
as
_tqdm
from
lightning.pytorch.callbacks
import
TQDMProgressBar
# Créez un callback de barre de progression pour afficher les métriques d'entraînement
class
CustomTrainProgressBar
(
TQDMProgressBar
):
def
__init__
(
self
):
super
().
__init__
()
self
.
_val_progress_bar
=
_tqdm
()
def
init_train_tqdm
(
self
):
bar
=
super
().
init_train_tqdm
()
bar
.
set_description
(
"
Training
"
)
return
bar
@property
def
val_progress_bar
(
self
):
if
self
.
_val_progress_bar
is
None
:
raise
ValueError
(
"
The `_val_progress_bar` reference has not been set yet.
"
)
return
self
.
_val_progress_bar
def
on_validation_start
(
self
,
trainer
,
pl_module
):
# Désactivez l'affichage de la barre de progression de validation
self
.
val_progress_bar
.
disable
=
True
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment