Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use tripmaster TMSuperviseLearner to go through complete learning pipeline #3

Open
YvonneYang1234 opened this issue Mar 10, 2023 · 1 comment

Comments

@YvonneYang1234
Copy link

YvonneYang1234 commented Mar 10, 2023

I cannot use tripmaster TMSuperviseLearner to go through complete learning pipeline. After running "Task" module, it ends without any error or warning. But when I use the Pangu package, it can go through the pipeline.
The log is as following:

[2023-03-10 02:00:39] DEBUG: Logging queue listener started!
[2023-03-10 02:01:10] INFO: 1 samples loaded

My Application is the subclass of "TMStandaloneApp". LearningSystem is the subclass of "TMSystem". Learner is the subclass of "TMSuperviseLearner". "TMSuperviseLearner" is imported from tripmaster.core.components.operator.supervise.

My config yaml is as following:

config:
io:
input:
task:
train_sample_ratio_for_eval: 0
serialize:
save: false
path: ${job.startup_path}/doc_hoia_task_data.pkl
load: false

problem:
  train_sample_ratio_for_eval:  0
  serialize:
    save: false
    path: ${job.startup_path}/doc_hoia_problem_data.pkl
    load: false

launcher:
type: local
strategies:
local:

job:
ray_tune: false

startup_path: ""
testing: false
test:
validate: False
sample_num: 10
epoch_num: 10
batching:
type: fixed_size
strategies:
fixed_size:
batch_size: 1
drop_last: False
# parallel: single
dataloader:
worker_num: 0 # load data using multi-process
pin_memory: false
timeout: 0
resource_allocation_range: 10000
drop_last: False
train_eval_sampling_ratio: 0
resource:
computing:
cpu_per_trial: 1
cpus: 4
gpu_per_trial: 0
gpus: 0
memory:
inferencing_memory_limit: 1000
learning_memory_limit: 1000
distributed: "no"
metric_logging:
type: tableprint
strategies:
tableprint: { }
tensorboard:
path: "metrics"

system:
serialize:
save: true
path: ${job.startup_path}/doc_hoia.system.pkl

load: false

task:
evaluator: {} # define raw evaluator?
tp_modeler:

sentence_processor:
  require_words: True
  provide_words: True
  add_bert_tokens: True
  spacy_language_pack: "en_core_web_sm"
  tokenizer:
    pretrained_tokenizer_path: "ernie-3.0-base-zh" #"ernie-3.0-mini-zh"

problem:
evaluator:
machine:
arch:
pretrained:
model_path: "ernie-3.0-base-zh" #"ernie-3.0-mini-zh"
voc_size: null
decoder:
all_copy: true
anno_hidden_size: 768
arc_hidden_size: 128
beam_size: 1
cross_attn: false
dropout: 0
input_size: 768
rel_hidden_size: 768
edge_embedding_dims: 128
label2id_path: ${job.startup_path}/label2id.yaml
loss:
interpolation: 0.5
alpha: 1.0
beta: 1.0
lamb: 1.0
evaluator:
average: "weighted"
num_edge_types: 67
learner:
optimizer:
strategy:
epochs: 1
algorithm:
pretrained_embedding:
lr: 5e-5
decoder:
lr: 1e-4

  lr_scheduler:
    gamma: 0.9
  gradient_clip_val: 1.
modelselector:
  stage: "problem"
  channel: "dev"
  metric: "span_split_prediction.Acc"
  # metric: "span_type_prediction.Accuracy"
  better: "max"
  save_prefix: "best"
evaluator_trigger:
  interval: 1

repo:
server: "http://public.bcc-bdbl.baidu.com:8000"
local_dir: ${job.startup_path}/pangu

@rudaoshi
Copy link
Collaborator

I think your System class should subclass the TMSuperviseSystem rather than the TMSystem class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants