Giter Site home page Giter Site logo

Comments (4)

rizaozcelik avatar rizaozcelik commented on September 26, 2024 1

I have created a pull request (#13) with a slightly different behavior than I described above. I implemented a mode flag that can be set to pretrain, finetune, and sample. I tried to keep the changes to the code minimum to minimize possible side effects.

from lstm_peptides.

alexarnimueller avatar alexarnimueller commented on September 26, 2024

Hi Riza

Great to hear you found my repo useful.
Thanks a lot for making me aware of this argparse issue. Indeed, the code as it is written now does not allow you to set the training flag to false. What actually needs to be done is to create a no-train flag.

Example:

from argparse import ArgumentParser

parser = ArgumentParser()
parser.add_argument('--notrain', default=False, action='store_true', help='Do not train')
args = parser.parse_args()

if args.notrain:
    print("Not training")
else:
    print("Training")

If you want to apply these changes and be a contributor, I would be very happy.

Thanks in advance

from lstm_peptides.

alexarnimueller avatar alexarnimueller commented on September 26, 2024

ah or an actual simpler version is to just change the behavior of the if train in main to something like if train and not finetune

Do you want to adapt it or should I?

from lstm_peptides.

rizaozcelik avatar rizaozcelik commented on September 26, 2024

Hi Alex,

Thanks for the prompt response. I would be happy to contribute to the repository and can apply the changes. I propose to leave the flow in the main untouched and change the argument behavior since arguments are the root cause for the strange behavior.

I propose to replace boolean train and finetune flags with a training_mode flag, which woud be set to train or finetune. This should make the behavior explicit for the users.

If you are also okay with that direction, I will create a pull request for you to review.

from lstm_peptides.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.