object_detection: Allow to provide RunConfig parameters on command line of model_main
System information
- What is the top-level directory of the model you are using: object_detection
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): no
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04.5 LTS (Xenial Xerus)
- TensorFlow installed from (source or binary): binary
- TensorFlow version (use command below): ('v1.10.1-0-g4dcfddc5d1', '1.10.1')
- Bazel version (if compiling from source): -
- CUDA/cuDNN version: cuda-9.0
- GPU model and memory: Tesla K80 major: 3 minor: 7 / 11.17GiB
- Exact command to reproduce: - (This is a feature request)
Describe the problem
An Estimator run is configured with a RunConfig object, however when starting model_main parameters of RunConfig can not be defined to overwrite defaults. That is why I propose to add command line parameters to model_main that allow to define RunConfig parameters. I see two options here:
- Add specific command line parameters for specific
RunConfigparameters, e.g.--save_checkpoints_steps,--save_checkpoints_secs, ... - Add a generic command line parameter for
RunConfigparameters similar to the already existing--hparams_overrides. E.g.--runconfig_overrides save_checkpoints_steps=100,keep_checkpoint_max=10
Option 2 should result in less maintenance when RunConfig is changed. OTOH it would only allow to overwrite primitive parameters, but no structured parameters like session_config. With Option 1 changes in RunConfig might need to be reflected in code. OTOH it would for example allow to define command line switches for session_config parameters.
I would personally vote for Option 2 and if there is interest I could also open a PR for this.
@derekjchow -- can you comment on this feature request?
when I run below code in comand, it show me some error like the bottom . research]# python object_detection/model_main.py --pipeline_config_path=${PIPELINE_CONFIG_PATH} --model_dir=${MODEL_DIR} --num_train_steps=${NUM_TRAIN_STEPS} --sample_1_of_n_eval_examples=$SAMPLE_1_OF_N_EVAL_EXAMPLES --hparams_overrides="batch_size=16"
Error: information:
raise ValueError('Unknown hyperparameter type for %s' % name)
ValueError: Unknown hyperparameter type for batch_size
My goal is to train the required property values in the config file through the command update model.
Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.
The help that I need would be a comment, if the feature and the PR I provided makes sense to you and if you would be willing to accept the PR. Thanks.