dvc/stage/__init__.py
def is_cached(self):
        """Checks if this stage has been already ran and stored"""
        old = self.reload()
        if old.changed_outs():
            return False

        # NOTE: need to save checksums for deps in order to compare them
        # with what is written in the old stage.
        self.save_deps()
        if not stage_dump_eq(Stage, old.dumpd(), self.dumpd()):
            return False

        # NOTE: committing to prevent potential data duplication. For example
        #
        #    $ dvc config cache.type hardlink
        #    $ echo foo > foo
        #    $ dvc add foo
        #    $ rm -f foo
        #    $ echo foo > foo
        #    $ dvc add foo # should replace foo with a link to cache
        #
        old.commit()

        return True
Checks if this stage has been already ran and stored
Checks if this stage has been already ran and stored
Checks if this stage has been already ran and stored
def is_cached(self):
        old = self.reload()
        if old.changed_outs():
            return False
        self.save_deps()
        if not stage_dump_eq(Stage, old.dumpd(), self.dumpd()):
            return False
            $ dvc config cache.type hardlink
            $ echo foo > foo
            $ dvc add foo
            $ rm -f foo
            $ echo foo > foo
            $ dvc add foo  should replace foo with a link to cache
        old.commit()
        return True
def is_cached ( self ) : old = self . reload ( ) if old . changed_outs ( ) : return False self . save_deps ( ) if not stage_dump_eq ( Stage , old . dumpd ( ) , self . dumpd ( ) ) : return False old . commit ( ) return True
Checks if this stage has been already ran and stored
Checks if this stage has been already ran and stored
"""Checks if this stage has been already ran and stored""" # NOTE: need to save checksums for deps in order to compare them # with what is written in the old stage. # NOTE: committing to prevent potential data duplication. For example # #    $ dvc config cache.type hardlink #    $ echo foo > foo #    $ dvc add foo #    $ rm -f foo #    $ echo foo > foo #    $ dvc add foo # should replace foo with a link to cache #
self