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

Report Issues in MOGFN-AL #1

Open
badeok0716 opened this issue Jan 5, 2024 · 1 comment
Open

Report Issues in MOGFN-AL #1

badeok0716 opened this issue Jan 5, 2024 · 1 comment

Comments

@badeok0716
Copy link

badeok0716 commented Jan 5, 2024

Hi, I'm currently working on multi-objective biological sequence design problems. I appreciate you sharing the implementation of MOGFN-AL!

I found two issues in your code as follows.

  1. mogfn_seq.py#L547, mogfn_seq.py#L572
    pos_logits[:, lens+1] = -1000 # can't change last token
    pos_logits_temp[:, lens+1] = -1000 # can't change last token
    These lines might prevent the modification of non-last tokens if lens contains more than one distinct value. I think that these lines should be changed into
    pos_logits[np.arange(len(lens)), lens+1] = -1000 # can't change last token
    pos_logits_temp[np.arange(len(lens)), lens+1] = -1000 # can't change last token

  2. mogfn_seq.py#526-L635
    command:
    python scripts/black_box_opt.py optimizer=mogfn_seq task=regex tokenizer=protein optimizer.encoder_obj=mlm surrogate=multi_task_exact_gp acquisition=nehvi optimizer.use_acqf=True optimizer.pref_cond=False optimizer.num_opt_steps=1500 optimizer.max_len=30 optimizer.sample_beta=32 optimizer.beta_sched=1 optimizer.pref_alpha=1 wandb_mode=disabled
    I slightly changed the code to utilizedtype=torch.double and I ran the command on the machine with RTX3090 GPU.
    Most of the trials had no problem, but some of the trials were stuck at mogfn_seq.py#L585. This error occured becausepos_logits had values near -1000 for the problematic trials. I think that it is better to change -1000 into much larger value like -1e6 for better stability of the code.

I would greatly appreciate your input to validate my concerns. Thanks!

@badeok0716 badeok0716 changed the title Report an Issue in MOGFN-AL Report Issues in MOGFN-AL Jan 5, 2024
@MJ10
Copy link
Collaborator

MJ10 commented Feb 13, 2024

Hi @badeok0716. Apologies for the late reply, I did not see this issue earlier.
Thanks a lot for the spotting these issues, I agree with all the suggestions you made! Please feel free to raise a PR at https://github.com/MJ10/mogfn-al/ if you would like to, or I can make the changes.

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