Closed jaehoonkoo closed 2 years ago
Hi @jke513,
for now our DB records surrogate model data only when "Model_LCM" is used. The Model_LCM refers to our LCM modeling (presented in GPTune PPoPP 21 paper - Yang et al.). If you use "Model_GPy_LCM", it will use GPy's LCM - but our DB does not record surrogate models.
This means that, the transfer learning interface presented in our MCSoC 2021 paper would work only for "Model_LCM". We have been building new interfaces for better usage and for supporting other types of surrogate modeling. For example, instead of directly loading a surrogate model from database, we can read function evaluation results and build a surrogate model based on them, that can be used as the surrogate model for transfer learning.
In short, there will be two options you can take.
@liuyangzhuan, do you have other comments or concerns?
Best, Younghyun
Why we don't support Model_GPy_LCM in "LoadSurrogateModelFunction"? Doesn't it has the same hyperparameter list as Model_LCM?
Anyway, if you didn't build gptune with openmpi, you cannot use Model_LCM. So in long run, option 2 would be more desirable.
Hi @liuyangzhuan, at the time of development I only implemented and tested the feature for only Model_LCM. In principle I also think it's possible to support Model_GPy_LCM in LoadSurrogateModelFunction. However, for DB, I think we would need to record different hyperparameter lists for Model_LCM and Model_GPy_LCM (need to check further).
To provide a quick solution, I'd like to ask @jke513 which approach you prefer or which approach would be feasible on your system.
Thanks, Younghyun
Hi Younghyun,
BuildSurrogateModel() works without clash.
I tried a run for sanity check such as: source tasks:
I run merge.py, but to collect func evals for the source task, use the json file from each source task, such as:
f = open('./TLA_experiments/SLA-GPTune-'+str(input_s[tvalue_])+'-200/xsbench.json’)
func_evals = json.load(f)
I am not sure merge.py is necessary.
I observe that configs for target task are evaluated, and configs for source tasks are loaded from the model: ret = model_functions[point['t']](point)
.
and the logs gave at the end the output values are similar to what they are coded as above.
Does it look it works correctly?
I attached the output log file for your reference. Thank you for your time and help.
Best, Jaehoon test_run.txt
Hi Jaehoon,
thank you for sending me the log, and sorry for the slow reply.
Yes, I read your log file, and I think your example works correctly! As you observed, the method (MCSoC21) evaluates the target task, and uses a surrogate model for the source tasks. Regarding the mergy.py usage, this script is just to merge multiple JSON DB files into one. Otherwise, you don’t need to run this script. Please let me know if you have further questions.
Best, Younghyun
I think this issue has been solved. I will close this issue now. If you have further questions or other issues, please open another issue or send us an email.
Hi @younghyunc,
I am writing to ask about loading surrogate model error. Can you please take a look?
I am using options['model_class'] = ‘Model_GPy_LCM’. When I tried to run TL after gathering data by sla, I am getting the following error.
In the json file, I found that “surrogate_model” is empty.
Why the surrogate model is not saved and empty? Did I miss any?
Best, Jaehoon