Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
combo
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Syntactic Tools
combo
Commits
2b72300b
Commit
2b72300b
authored
4 years ago
by
Mateusz Klimaszewski
Browse files
Options
Downloads
Patches
Plain Diff
Start to extract shared config for DP and EDP.
parent
04414d22
Branches
Branches containing commit
No related merge requests found
Pipeline
#2874
passed with stage
in 4 minutes and 16 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
combo/config.graph.template.jsonnet
+1
-25
1 addition, 25 deletions
combo/config.graph.template.jsonnet
combo/config.shared.libsonnet
+29
-0
29 additions, 0 deletions
combo/config.shared.libsonnet
combo/config.template.jsonnet
+2
-25
2 additions, 25 deletions
combo/config.template.jsonnet
with
32 additions
and
50 deletions
combo/config.graph.template.jsonnet
+
1
−
25
View file @
2b72300b
...
...
@@ -392,31 +392,7 @@ assert pretrained_tokens == null || pretrained_transformer_name == null: "Can't
],
},
}),
trainer
:
std
.
prune
({
checkpointer
:
{
type
:
"finishing_only_checkpointer"
,
},
type
:
"gradient_descent_validate_n"
,
cuda_device
:
cuda_device
,
grad_clipping
:
5.0
,
num_epochs
:
num_epochs
,
optimizer
:
{
type
:
"adam"
,
lr
:
learning_rate
,
betas
:
[
0.9
,
0.9
],
},
patience
:
1
,
# it will be overwriten by callback
callbacks
:
[
{
type
:
"transfer_patience"
}
{
type
:
"track_epoch_callback"
},
if
use_tensorboard
then
{
type
:
"tensorboard"
,
should_log_parameter_statistics
:
false
},
],
learning_rate_scheduler
:
{
type
:
"combo_scheduler"
,
},
validation_metric
:
"+EM"
,
}),
trainer
:
shared_config
.
Trainer
(
cuda_device
,
num_epochs
,
learning_rate
,
use_tensorboard
),
random_seed
:
8787
,
pytorch_seed
:
8787
,
numpy_seed
:
8787
,
...
...
This diff is collapsed.
Click to expand it.
combo/config.shared.libsonnet
0 → 100644
+
29
−
0
View file @
2b72300b
{
local
trainer
(
cuda_device
,
num_epochs
,
learning_rate
,
use_tensorboard
)
=
std
.
prune
({
checkpointer
:
{
type
:
"finishing_only_checkpointer"
,
},
type
:
"gradient_descent_validate_n"
,
cuda_device
:
cuda_device
,
grad_clipping
:
5.0
,
num_epochs
:
num_epochs
,
optimizer
:
{
type
:
"adam"
,
lr
:
learning_rate
,
betas
:
[
0.9
,
0.9
],
},
patience
:
1
,
# it will be overwriten by callback
callbacks
:
[
{
type
:
"transfer_patience"
}
{
type
:
"track_epoch_callback"
},
if
use_tensorboard
then
{
type
:
"tensorboard"
,
should_log_parameter_statistics
:
false
},
],
learning_rate_scheduler
:
{
type
:
"combo_scheduler"
,
},
validation_metric
:
"+EM"
,
}),
Trainer
:
trainer
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
combo/config.template.jsonnet
+
2
−
25
View file @
2b72300b
local
shared_config
=
import
"config.shared.libsonnet"
;
########################################################################################
# BASIC configuration #
########################################################################################
...
...
@@ -359,31 +360,7 @@ assert pretrained_tokens == null || pretrained_transformer_name == null: "Can't
],
},
}),
trainer
:
std
.
prune
({
checkpointer
:
{
type
:
"finishing_only_checkpointer"
,
},
type
:
"gradient_descent_validate_n"
,
cuda_device
:
cuda_device
,
grad_clipping
:
5.0
,
num_epochs
:
num_epochs
,
optimizer
:
{
type
:
"adam"
,
lr
:
learning_rate
,
betas
:
[
0.9
,
0.9
],
},
patience
:
1
,
# it will be overwriten by callback
callbacks
:
[
{
type
:
"transfer_patience"
}
{
type
:
"track_epoch_callback"
},
if
use_tensorboard
then
{
type
:
"tensorboard"
,
should_log_parameter_statistics
:
false
},
],
learning_rate_scheduler
:
{
type
:
"combo_scheduler"
,
},
validation_metric
:
"+EM"
,
}),
trainer
:
shared_config
.
Trainer
(
cuda_device
,
num_epochs
,
learning_rate
,
use_tensorboard
),
random_seed
:
8787
,
pytorch_seed
:
8787
,
numpy_seed
:
8787
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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