Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
combo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Syntactic Tools
combo
Commits
9d339859
Commit
9d339859
authored
Sep 14, 2020
by
Mateusz Klimaszewski
Browse files
Options
Downloads
Patches
Plain Diff
Add herberta configuration.
parent
ac65eb69
Branches
Branches containing commit
No related tags found
2 merge requests
!4
Documentation
,
!3
Herbert configuration and AllenNLP 1.2.0 update.
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+4
-0
4 additions, 0 deletions
README.md
combo/training/trainer.py
+6
-6
6 additions, 6 deletions
combo/training/trainer.py
setup.py
+4
-4
4 additions, 4 deletions
setup.py
with
14 additions
and
10 deletions
README.md
+
4
−
0
View file @
9d339859
## Installation
### HERBERTA notes:
Install herberta transformers package
**before**
running command below
Clone this repository and run:
```
bash
python setup.py develop
...
...
This diff is collapsed.
Click to expand it.
combo/training/trainer.py
+
6
−
6
View file @
9d339859
...
...
@@ -54,12 +54,12 @@ class GradientDescentTrainer(training.GradientDescentTrainer):
batch_callbacks
:
List
[
training
.
BatchCallback
]
=
None
,
epoch_callbacks
:
List
[
training
.
EpochCallback
]
=
None
,
distributed
:
bool
=
False
,
local_rank
:
int
=
0
,
world_size
:
int
=
1
,
num_gradient_accumulation_steps
:
int
=
1
,
opt_level
:
Optional
[
str
]
=
Non
e
)
->
None
:
use_amp
:
bool
=
Fals
e
)
->
None
:
super
().
__init__
(
model
,
optimizer
,
data_loader
,
patience
,
validation_metric
,
validation_data_loader
,
num_epochs
,
serialization_dir
,
checkpointer
,
cuda_device
,
grad_norm
,
grad_clipping
,
learning_rate_scheduler
,
momentum_scheduler
,
tensorboard_writer
,
moving_average
,
batch_callbacks
,
epoch_callbacks
,
distributed
,
local_rank
,
world_size
,
num_gradient_accumulation_steps
,
opt_level
)
num_gradient_accumulation_steps
,
use_amp
)
# TODO extract param to constructor (+ constructor method?)
self
.
validate_every_n
=
5
...
...
@@ -125,7 +125,8 @@ class GradientDescentTrainer(training.GradientDescentTrainer):
self
.
model
,
val_loss
,
val_reg_loss
,
num_batches
,
num_batches
=
num_batches
,
batch_loss
=
None
,
reset
=
True
,
world_size
=
self
.
_world_size
,
cuda_device
=
self
.
cuda_device
,
...
...
@@ -231,7 +232,7 @@ class GradientDescentTrainer(training.GradientDescentTrainer):
world_size
:
int
=
1
,
num_gradient_accumulation_steps
:
int
=
1
,
opt_level
:
Optional
[
str
]
=
None
,
no_grad
:
List
[
str
]
=
Non
e
,
use_amp
:
bool
=
Fals
e
,
optimizer
:
common
.
Lazy
[
optimizers
.
Optimizer
]
=
None
,
learning_rate_scheduler
:
common
.
Lazy
[
learning_rate_schedulers
.
LearningRateScheduler
]
=
None
,
momentum_scheduler
:
common
.
Lazy
[
momentum_schedulers
.
MomentumScheduler
]
=
None
,
...
...
@@ -258,8 +259,7 @@ class GradientDescentTrainer(training.GradientDescentTrainer):
distributed
=
distributed
,
world_size
=
world_size
,
num_gradient_accumulation_steps
=
num_gradient_accumulation_steps
,
opt_level
=
opt_level
,
no_grad
=
no_grad
,
use_amp
=
use_amp
,
optimizer
=
optimizer
,
learning_rate_scheduler
=
learning_rate_scheduler
,
momentum_scheduler
=
momentum_scheduler
,
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
4
−
4
View file @
9d339859
...
...
@@ -3,17 +3,17 @@ from setuptools import find_packages, setup
REQUIREMENTS
=
[
'
absl-py==0.9.0
'
,
'
allennlp==1.
0
.0
'
,
'
allennlp==1.
1
.0
'
,
'
conllu==2.3.2
'
,
'
dataclasses-json==0.5.2
'
,
'
joblib==0.14.1
'
,
'
jsonnet==0.15.0
'
,
'
requests==2.23.0
'
,
'
overrides==3.
0
.0
'
,
'
overrides==3.
1
.0
'
,
'
tensorboard==2.1.0
'
,
'
torch
>=1.5.0,<
1.6.0
'
,
'
torch
==
1.6.0
'
,
'
tqdm==4.43.0
'
,
'
transformers
==2.9.1
'
,
'
transformers
>=3.0.0,<3.1.0
'
,
'
urllib3==1.24.2
'
,
]
...
...
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