mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-20 08:04:35 +00:00
Introduce code from Rust monorepo. This is a mess
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
project_dir: null
|
||||
name: SelfAlignmentPretrainingForMedicalEntityLinking
|
||||
trainer:
|
||||
gpus: 1
|
||||
num_nodes: 1
|
||||
max_epochs: 2
|
||||
max_steps: null
|
||||
accumulate_grad_batches: 1
|
||||
precision: 16
|
||||
amp_level: O1
|
||||
accelerator: ddp
|
||||
gradient_clip_val: 0.0
|
||||
log_every_n_steps: 1
|
||||
val_check_interval: 2
|
||||
checkpoint_callback: false
|
||||
logger: false
|
||||
model:
|
||||
nemo_path: ???
|
||||
max_seq_length: 128
|
||||
language_model:
|
||||
pretrained_model_name: bert-base-uncased
|
||||
config_file: null
|
||||
config: null
|
||||
lm_checkpoint: null
|
||||
tokenizer:
|
||||
tokenizer_name: ${model.language_model.pretrained_model_name}
|
||||
vocab_file: null
|
||||
tokenizer_model: null
|
||||
do_lower_case: true
|
||||
loss_params: null
|
||||
train_ds:
|
||||
data_file: ???
|
||||
max_seq_length: ${model.max_seq_length}
|
||||
batch_size: 8
|
||||
shuffle: true
|
||||
num_workers: 2
|
||||
pin_memory: false
|
||||
drop_last: false
|
||||
validation_ds:
|
||||
data_file: ???
|
||||
max_seq_length: ${model.max_seq_length}
|
||||
batch_size: 8
|
||||
shuffle: false
|
||||
num_workers: 2
|
||||
pin_memory: false
|
||||
drop_last: false
|
||||
optim:
|
||||
name: adam
|
||||
lr: 3.0e-05
|
||||
weight_decay: 0.0
|
||||
sched:
|
||||
name: CosineAnnealing
|
||||
warmup_steps: null
|
||||
warmup_ratio: 0.1
|
||||
min_lr: 0.0
|
||||
last_epoch: -1
|
||||
index:
|
||||
dims: 768
|
||||
nlist: 2
|
||||
top_n: 3
|
||||
query_num_factor: 20
|
||||
index_save_name: ???
|
||||
index_batch_size: 10
|
||||
index_ds:
|
||||
name: tiny_example
|
||||
data_file: ???
|
||||
max_seq_length: ${model.max_seq_length}
|
||||
batch_size: 100
|
||||
shuffle: false
|
||||
num_workers: 2
|
||||
pin_memory: false
|
||||
drop_last: false
|
||||
idx_to_id: ${project_dir}/idx_to_id.pkl
|
||||
id_to_string: ${project_dir}/id_to_string.pkl
|
||||
concept_id_save_name: ${project_dir}/tiny_example_concept_ids.pkl
|
||||
embedding_save_name: ${project_dir}/tiny_example_concept_embeddings.hdf5
|
||||
pca_embeddings_save_name: null
|
||||
apply_pca: false
|
||||
pca: null
|
||||
exp_manager:
|
||||
exp_dir: .
|
||||
name: ${project_dir}/SelfAlignmentPretrainingTinyExample
|
||||
create_tensorboard_logger: true
|
||||
create_checkpoint_callback: true
|
||||
hydra:
|
||||
run:
|
||||
dir: .
|
||||
job_logging:
|
||||
root:
|
||||
handlers: null
|
||||
@@ -0,0 +1,95 @@
|
||||
project_dir: ???
|
||||
name: SelfAlignmentPretrainingForMedicalEntityLinking
|
||||
trainer:
|
||||
gpus: 1
|
||||
num_nodes: 1
|
||||
max_epochs: 2
|
||||
max_steps: null
|
||||
accumulate_grad_batches: 1
|
||||
precision: 16
|
||||
amp_level: O1
|
||||
accelerator: ddp
|
||||
gradient_clip_val: 0.0
|
||||
log_every_n_steps: 1
|
||||
val_check_interval: 1000
|
||||
checkpoint_callback: false
|
||||
logger: false
|
||||
model:
|
||||
nemo_path: ${project_dir}/sap_bert_umls.nemo
|
||||
raw_data: ${project_dir}/data/MRCONSO.RRF
|
||||
max_seq_length: 128
|
||||
language_model:
|
||||
pretrained_model_name: bert-base-uncased
|
||||
config_file: null
|
||||
config: null
|
||||
lm_checkpoint: null
|
||||
tokenizer:
|
||||
tokenizer_name: ${model.language_model.pretrained_model_name}
|
||||
vocab_file: null
|
||||
tokenizer_model: null
|
||||
do_lower_case: true
|
||||
train_ds:
|
||||
data_file: ${project_dir}/data/umls_train_pairs.tsv
|
||||
max_seq_length: ${model.max_seq_length}
|
||||
batch_size: 128
|
||||
shuffle: true
|
||||
num_workers: 2
|
||||
pin_memory: false
|
||||
drop_last: false
|
||||
validation_ds:
|
||||
data_file: ${project_dir}/data/umls_validation_pairs.tsv
|
||||
max_seq_length: ${model.max_seq_length}
|
||||
batch_size: 128
|
||||
shuffle: false
|
||||
num_workers: 2
|
||||
pin_memory: false
|
||||
drop_last: false
|
||||
optim:
|
||||
name: adam
|
||||
lr: 3.0e-05
|
||||
weight_decay: 0.0
|
||||
sched:
|
||||
name: CosineAnnealing
|
||||
warmup_steps: null
|
||||
warmup_ratio: 0.1
|
||||
min_lr: 0.0
|
||||
last_epoch: -1
|
||||
index:
|
||||
dims: 256
|
||||
nlist: 300
|
||||
top_n: 5
|
||||
query_num_factor: 20
|
||||
index_save_name: ${project_dir}/medical_entity_linking_index
|
||||
index_batch_size: 1000
|
||||
raw_data: ${model.raw_data}
|
||||
index_ds:
|
||||
name: umls
|
||||
data_file: ${project_dir}/data/umls_index_concepts.tsv
|
||||
max_seq_length: ${model.max_seq_length}
|
||||
batch_size: 128
|
||||
shuffle: false
|
||||
num_workers: 2
|
||||
pin_memory: false
|
||||
drop_last: false
|
||||
idx_to_id: ${project_dir}/data/idx_to_id.pkl
|
||||
id_to_string: ${project_dir}/data/id_to_string.pkl
|
||||
concept_id_save_name: ${project_dir}/data/concept_ids.pkl
|
||||
embedding_save_name: ${project_dir}/data/medical_concept_embeddings.hdf5
|
||||
pca_embeddings_save_name: ${project_dir}/data/medical_concept_reduced_${index.dims}dim_embeddings.hdf5
|
||||
apply_pca: true
|
||||
pca:
|
||||
input_dim: 756
|
||||
output_dim: ${index.dims}
|
||||
sample_fraction: 0.5
|
||||
pca_save_name: ${project_dir}/${index.pca.input_dim}_to_${index.pca.output_dim}_pca_model.pkl
|
||||
exp_manager:
|
||||
exp_dir: ${project_dir}/medical_entity_linking_experiments
|
||||
name: sap_bert_umls
|
||||
create_tensorboard_logger: true
|
||||
create_checkpoint_callback: true
|
||||
hydra:
|
||||
run:
|
||||
dir: .
|
||||
job_logging:
|
||||
root:
|
||||
handlers: null
|
||||
Reference in New Issue
Block a user