Open pygj1994 opened 3 years ago
This problem is temporally solved by mkdir model_search
under model_search. I also find the snippet is hard to run on centos7. further error is
raise _exceptions.UnparsedFlagAccessError(error_message)
absl.flags._exceptions.UnparsedFlagAccessError: Trying to access flag --mlmd_default_sqllite_filename before flags were parsed.
hope someone can help and solve this.
This problem is temporally solved by
mkdir model_search
under model_search. I also find the snippet is hard to run on centos7. further error israise _exceptions.UnparsedFlagAccessError(error_message)
absl.flags._exceptions.UnparsedFlagAccessError: Trying to access flag --mlmd_default_sqllite_filename before flags were parsed.
hope someone can help and solve this.
i solved the flag access error by running:
sys.argv = sys.argv[:1] try: app.run(lambda argv: None) except: pass
I get the error when I run the code snippet as follows
I had this issue too, it seemed to be an error in the code for the location of dnn_config.pbtxt i fixed it by making going to model_search/model_search then making another directory path called model_search/configs/ then copying dnn_config.pbtxt there (so that there is a copy of dnn_config.pbtxt at model_search/model_search/model_search/configs/dnn_configs.pbtxt Hopefully this error is addressed soon!
I get the error when I run the code snippet as follows
I had this issue too, it seemed to be an error in the code for the location of dnn_config.pbtxt i fixed it by making going to model_search/model_search then making another directory path called model_search/configs/ then copying dnn_config.pbtxt there (so that there is a copy of dnn_config.pbtxt at model_search/model_search/model_search/configs/dnn_configs.pbtxt Hopefully this error is addressed soon!
Many thanks! I solved it.
This problem is temporally solved by
mkdir model_search
under model_search. I also find the snippet is hard to run on centos7. further error israise _exceptions.UnparsedFlagAccessError(error_message)
absl.flags._exceptions.UnparsedFlagAccessError: Trying to access flag --mlmd_default_sqllite_filename before flags were parsed. hope someone can help and solve this.
i solved the flag access error by running:
sys.argv = sys.argv[:1] try: app.run(lambda argv: None) except: pass
Sorry, could you give me some details about running it? I don't know how to operate the code you give. Thank you~
As suggested, the following code is able to run.
import model_search from model_search import constants from model_search import single_trainer from model_search.data import csv_data import sys
from absl import app from absl import flags from absl import logging
FLAGS = flags.FLAGS
sys.argv = sys.argv[:1] try: app.run(lambda argv: None) except: pass
trainer = single_trainer.SingleTrainer( data=csv_data.Provider( label_index=0, logits_dimension=2, record_defaults=[0, 0, 0, 0], filename="model_search/data/testdata/csv_random_data.csv"), spec=constants.DEFAULT_DNN)
trainer.try_models( number_models=200, train_steps=1000, eval_steps=100, root_dir="/tmp/run_example", batch_size=32, experiment_name="example", experiment_owner="model_search_user")
As suggested, the following code is able to run.
import model_search from model_search import constants from model_search import single_trainer from model_search.data import csv_data import sys
from absl import app from absl import flags from absl import logging
FLAGS = flags.FLAGS
sys.argv = sys.argv[:1] try: app.run(lambda argv: None) except: pass
trainer = single_trainer.SingleTrainer( data=csv_data.Provider( label_index=0, logits_dimension=2, record_defaults=[0, 0, 0, 0], filename="model_search/data/testdata/csv_random_data.csv"), spec=constants.DEFAULT_DNN)
trainer.try_models( number_models=200, train_steps=1000, eval_steps=100, root_dir="/tmp/run_example", batch_size=32, experiment_name="example", experiment_owner="model_search_user")
Thank you so much!
Fixed by editing model_search/constants.py :
replacing all occurences of model_search/model_search/
by model_search/
fixed the problem for me.
I get the error when I run the code snippet as follows