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
fff5ebea
Commit
fff5ebea
authored
1 year ago
by
Achille Mbogol Touye
Browse files
Options
Downloads
Patches
Plain Diff
Replace progressbar.py
parent
957229f9
No related branches found
No related tags found
1 merge request
!9
Dev
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MNIST.Lightning/modules/progressbar.py
+18
-3
18 additions, 3 deletions
MNIST.Lightning/modules/progressbar.py
with
18 additions
and
3 deletions
MNIST.Lightning/modules/progressbar.py
+
18
−
3
View file @
fff5ebea
...
...
@@ -17,21 +17,36 @@ from lightning.pytorch.callbacks import TQDMProgressBar
class
CustomTrainProgressBar
(
TQDMProgressBar
):
def
__init__
(
self
):
super
().
__init__
()
self
.
_val_progress_bar
=
_tqdm
()
self
.
_val_progress_bar
=
_tqdm
()
self
.
_predict_progress_bar
=
_tqdm
()
def
init_predict_tqdm
(
self
):
bar
=
super
().
init_test_tqdm
()
bar
.
set_description
(
"
Predicting
"
)
return
bar
def
init_train_tqdm
(
self
):
bar
=
super
().
init_train_tqdm
()
bar
.
set_description
(
"
Training
"
)
return
bar
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
@property
def
predict_progress_bar
(
self
)
->
_tqdm
:
if
self
.
_predict_progress_bar
is
None
:
raise
TypeError
(
f
"
The `
{
self
.
__class__
.
__name__
}
._predict_progress_bar` reference has not been set yet.
"
)
return
self
.
_predict_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
def
on_predict_start
(
self
,
trainer
,
pl_module
):
# Désactivez l'affichage de la barre de progression de validation
self
.
predict_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