Giter VIP home page Giter VIP logo

Comments (5)

joein avatar joein commented on May 18, 2024 1
  • Caching can't be used when user applies some kind of augmentations during training process
  • Caching can't be used when encoder is not fully frozen

from quaterion.

monatis avatar monatis commented on May 18, 2024 1

@joein Good work! My comments are as follows:

  1. We can move CacheType into utils.enums, and rename train.encoders to train.cachable_encoders. Users are supposed to interact only with the CacheType, so we should **hide ** unnecessary complexity from them.
  2. Do we really need separate classes for CPU and GPU caches? It seems to me that we can merge them into one by calling .to(device) conditionally when applicable.
  3. forward() seems to be overridden in CacheEncoder without extra functionality.

from quaterion.

joein avatar joein commented on May 18, 2024

@monatis Thanks for the comments
1.1 I am not sure if we need to separate CacheConfig and CacheType in this case, user is supposed to use both CacheConfig and CacheType, however I am not really against it.
1.2 It was supposed that we store any train-specific (which shouldn't be in quaterion-models) encoders in train.encoders, I think that it will be something like train.encoders.cache_encoders later, but at the moment I'd like to remain it as is.
2.1 I had some minds about it too, we probably can do this.
3.1 It was done to avoid IDE remarks (child classes should implement all abstract methods).

from quaterion.

generall avatar generall commented on May 18, 2024

3.1 It was done to avoid IDE remarks (child classes should implement all abstract methods).

CacheEncoder is an abstract class, so it could be declared with https://docs.python.org/3/library/abc.html

from quaterion.

joein avatar joein commented on May 18, 2024

Yes, indeed, but I think it is better to use one approach with abstract classes in both quaterion and quaterion-models. E.g. in quaterion_models and in quaterion.loss.pairwise_loss we don't use abc.

from quaterion.

Related Issues (20)

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.