clearml_agent/helper/package/pytorch.py
def _table_lookup(self, req):
        """
        Look for pytorch wheel matching `req` in table
        :param req: python requirement
        """
        def check(base_, key_, exception_):
            result = base_.get(key_)
            if not result:
                if key_.startswith('cuda'):
                    print('Could not locate, {}'.format(exception_))
                    ver = sorted([float(a.replace('cuda', '').replace('none', '0')) for a in base_.keys()], reverse=True)[0]
                    key_ = 'cuda'+str(int(ver))
                    result = base_.get(key_)
                    print('Reverting to \"{}\"'.format(key_))
                    if not result:
                        raise exception_
                    return result
                raise exception_
            if isinstance(result, Exception):
                raise result
            return result

        if self.is_conda:
            return self.replace_conda(req)

        base = self.MAP
        for key, exception in zip((self.os, self.cuda, self.python), self.exceptions):
            base = check(base, key, exception)

        return self.match_version(req, base).replace(" ", "\n")

        Look for pytorch wheel matching `req` in table
        :param req: python requirement
        
Look for pytorch wheel matching `req` in table
Look for pytorch wheel matching ` req ` in table
def _table_lookup(self, req):
        def check(base_, key_, exception_):
            result = base_.get(key_)
            if not result:
                if key_.startswith('cuda'):
                    print('Could not locate, {}'.format(exception_))
                    ver = sorted([float(a.replace('cuda', '').replace('none', '0')) for a in base_.keys()], reverse=True)[0]
                    key_ = 'cuda'+str(int(ver))
                    result = base_.get(key_)
                    print('Reverting to \"{}\"'.format(key_))
                    if not result:
                        raise exception_
                    return result
                raise exception_
            if isinstance(result, Exception):
                raise result
            return result
        if self.is_conda:
            return self.replace_conda(req)
        base = self.MAP
        for key, exception in zip((self.os, self.cuda, self.python), self.exceptions):
            base = check(base, key, exception)
        return self.match_version(req, base).replace(" ", "\n")
def _table_lookup ( self , req ) : def check ( base_ , key_ , exception_ ) : result = base_ . get ( key_ ) if not result : if key_ . startswith ( 'cuda' ) : print ( 'Could not locate, {}' . format ( exception_ ) ) ver = sorted ( [ float ( a . replace ( 'cuda' , '' ) . replace ( 'none' , '0' ) ) for a in base_ . keys ( ) ] , reverse = True ) [ 0 ] key_ = 'cuda' + str ( int ( ver ) ) result = base_ . get ( key_ ) print ( 'Reverting to \"{}\"' . format ( key_ ) ) if not result : raise exception_ return result raise exception_ if isinstance ( result , Exception ) : raise result return result if self . is_conda : return self . replace_conda ( req ) base = self . MAP for key , exception in zip ( ( self . os , self . cuda , self . python ) , self . exceptions ) : base = check ( base , key , exception ) return self . match_version ( req , base ) . replace ( " " , "\n" )
Look for pytorch wheel matching `req` in table
Look for pytorch wheel matching ` req ` in table
"""
        Look for pytorch wheel matching `req` in table
        :param req: python requirement
        """
self
req
None