after_merge
stringlengths
28
79.6k
before_merge
stringlengths
20
79.6k
url
stringlengths
38
71
full_traceback
stringlengths
43
922k
traceback_type
stringclasses
555 values
def __init__( self, classifier, norm=np.inf, eps=0.3, targeted=False, random_init=False, batch_size=128, expectation=None, ): """ Create a :class:`FastGradientMethod` instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param norm: Ord...
def __init__( self, classifier, norm=np.inf, eps=0.3, targeted=False, random_init=False, batch_size=128, ): """ Create a :class:`FastGradientMethod` instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param norm: Order of the norm. Possib...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _minimal_perturbation(self, x, y, eps_step=0.1, eps_max=1.0, **kwargs): """Iteratively compute the minimal perturbation necessary to make the class prediction change. Stop when the first adversarial example was found. :param x: An array with the original inputs :type x: `np.ndarray` :param y: ...
def _minimal_perturbation(self, x, y, eps_step=0.1, eps_max=1.0, **kwargs): """Iteratively compute the minimal perturbation necessary to make the class prediction change. Stop when the first adversarial example was found. :param x: An array with the original inputs :type x: `np.ndarray` :param y: ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def generate(self, x, **kwargs): """Generate adversarial samples and return them in an array. :param x: An array with the original inputs. :type x: `np.ndarray` :param eps: Attack step size (input variation) :type eps: `float` :param norm: Order of the norm (mimics Numpy). Possible values: np.i...
def generate(self, x, **kwargs): """Generate adversarial samples and return them in an array. :param x: An array with the original inputs. :type x: `np.ndarray` :param eps: Attack step size (input variation) :type eps: `float` :param norm: Order of the norm (mimics Numpy). Possible values: np.i...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _compute_perturbation(self, batch, batch_labels): # Pick a small scalar to avoid division by 0 tol = 10e-8 # Get gradient wrt loss; invert it if attack is targeted grad = self._loss_gradient(batch, batch_labels) * (1 - 2 * int(self.targeted)) # Apply norm bound if self.norm == np.inf: ...
def _compute_perturbation(self, batch, batch_labels): # Pick a small scalar to avoid division by 0 tol = 10e-8 # Get gradient wrt loss; invert it if attack is targeted grad = self.classifier.loss_gradient(batch, batch_labels) * ( 1 - 2 * int(self.targeted) ) # Apply norm bound if s...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__( self, classifier, norm=np.inf, eps=0.3, eps_step=0.1, max_iter=20, targeted=False, random_init=False, batch_size=128, expectation=None, ): """ Create a :class:`BasicIterativeMethod` instance. :param classifier: A trained model. :type classifier: :cl...
def __init__( self, classifier, norm=np.inf, eps=0.3, eps_step=0.1, max_iter=20, targeted=False, random_init=False, ): """ Create a :class:`BasicIterativeMethod` instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param norm: Order of...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs. :type x: `np.ndarray` :param norm: Order of the norm. Possible values: np.inf, 1 or 2. :type norm: `int` :param eps: Maximum perturbation that the atta...
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs. :type x: `np.ndarray` :param norm: Order of the norm. Possible values: np.inf, 1 or 2. :type norm: `int` :param eps: Maximum perturbation that the atta...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def set_params(self, **kwargs): """ Take in a dictionary of parameters and applies attack-specific checks before saving them as attributes. :param norm: Order of the norm. Possible values: np.inf, 1 or 2. :type norm: `int` :param eps: Maximum perturbation that the attacker can introduce. :type ...
def set_params(self, **kwargs): """ Take in a dictionary of parameters and applies attack-specific checks before saving them as attributes. :param norm: Order of the norm. Possible values: np.inf, 1 or 2. :type norm: `int` :param eps: Maximum perturbation that the attacker can introduce. :type ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__( self, classifier, max_iter=1000, eta=0.01, batch_size=128, expectation=None ): """ Create a NewtonFool attack instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param max_iter: The maximum number of iterations. :type max_iter: `int` :param...
def __init__(self, classifier, max_iter=1000, eta=0.01, batch_size=128): """ Create a NewtonFool attack instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param max_iter: The maximum number of iterations. :type max_iter: `int` :param eta: The eta coefficien...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in a Numpy array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param kwargs: Attack-specific parameters used by child classes. :type kwargs: `dict` :return: An array holdi...
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in a Numpy array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param kwargs: Attack-specific parameters used by child classes. :type kwargs: `dict` :return: An array holdi...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def set_params(self, **kwargs): """Take in a dictionary of parameters and applies attack-specific checks before saving them as attributes. :param max_iter: The maximum number of iterations. :type max_iter: `int` :param eta: The eta coefficient. :type eta: `float` :param batch_size: Internal siz...
def set_params(self, **kwargs): """Take in a dictionary of parameters and applies attack-specific checks before saving them as attributes. :param max_iter: The maximum number of iterations. :type max_iter: `int` :param eta: The eta coefficient. :type eta: `float` """ # Save attack-specific ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__( self, classifier, norm=np.inf, eps=0.3, eps_step=0.1, max_iter=20, targeted=False, random_init=False, batch_size=128, expectation=None, ): """ Create a :class:`ProjectedGradientDescent` instance. :param classifier: A trained model. :type classifier:...
def __init__( self, classifier, norm=np.inf, eps=0.3, eps_step=0.1, max_iter=20, targeted=False, random_init=False, ): """ Create a :class:`ProjectedGradientDescent` instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param norm: Orde...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__(self, classifier, theta=0.1, gamma=1.0, batch_size=128, expectation=None): """ Create a SaliencyMapMethod instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param theta: Perturbation introduced to each modified feature per step (can be positive or nega...
def __init__(self, classifier, theta=0.1, gamma=1.0): """ Create a SaliencyMapMethod instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param theta: Perturbation introduced to each modified feature per step (can be positive or negative). :type theta: `float` ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param y: Target values if the attack is targeted :type y: `np.ndarray` :param theta: Perturbation introduced to e...
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param y: Target values if the attack is targeted :type y: `np.ndarray` :param theta: Perturbation introduced to e...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def set_params(self, **kwargs): """ Take in a dictionary of parameters and applies attack-specific checks before saving them as attributes. :param theta: Perturbation introduced to each modified feature per step (can be positive or negative) :type theta: `float` :param gamma: Maximum percentage of ...
def set_params(self, **kwargs): """ Take in a dictionary of parameters and applies attack-specific checks before saving them as attributes. :param theta: Perturbation introduced to each modified feature per step (can be positive or negative) :type theta: `float` :param gamma: Maximum percentage of ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _saliency_map(self, x, target, search_space): """ Compute the saliency map of `x`. Return the top 2 coefficients in `search_space` that maximize / minimize the saliency map. :param x: A batch of input samples :type x: `np.ndarray` :param target: Target class for `x` :type target: `np.nd...
def _saliency_map(self, x, target, search_space): """ Compute the saliency map of `x`. Return the top 2 coefficients in `search_space` that maximize / minimize the saliency map. :param x: One input sample :type x: `np.ndarray` :param target: Target class for `x` :type target: `int` :par...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__( self, classifier, attacker="deepfool", attacker_params=None, delta=0.2, max_iter=20, eps=10.0, norm=np.inf, expectation=None, ): """ :param classifier: A trained model. :type classifier: :class:`Classifier` :param attacker: Adversarial attack name. Defau...
def __init__( self, classifier, attacker="deepfool", attacker_params=None, delta=0.2, max_iter=20, eps=10.0, norm=np.inf, ): """ :param classifier: A trained model. :type classifier: :class:`Classifier` :param attacker: Adversarial attack name. Default is 'deepfool'. Supp...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs. :type x: `np.ndarray` :param attacker: Adversarial attack name. Default is 'deepfool'. Supported names: 'carlini', 'deepfool', 'fgsm', 'newtonfool'...
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs. :type x: `np.ndarray` :param attacker: Adversarial attack name. Default is 'deepfool'. Supported names: 'carlini', 'deepfool', 'fgsm', 'newtonfool'...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__( self, classifier, max_iter=1, finite_diff=1e-6, eps=0.1, batch_size=128, expectation=None, ): """ Create a VirtualAdversarialMethod instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param eps: Attack step (max input variat...
def __init__(self, classifier, max_iter=1, finite_diff=1e-6, eps=0.1): """ Create a VirtualAdversarialMethod instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param eps: Attack step (max input variation). :type eps: `float` :param finite_diff: The finite d...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param eps: Attack step (max input variation). :type eps: `float` :param finite_diff: The finite difference parame...
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param eps: Attack step (max input variation). :type eps: `float` :param finite_diff: The finite difference parame...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _normalize(x): """ Apply L_2 batch normalization on `x`. :param x: The input array batch to normalize. :type x: `np.ndarray` :return: The normalized version of `x`. :rtype: `np.ndarray` """ tol = 1e-10 dims = x.shape x = x.reshape(dims[0], -1) inverse = (np.sum(x**2, ax...
def _normalize(x): """ Apply L_2 batch normalization on `x`. :param x: The input array to normalize. :type x: `np.ndarray` :return: The normalized version of `x`. :rtype: `np.ndarray` """ tol = 1e-10 dims = x.shape x = x.flatten() inverse = (np.sum(x**2) + tol) ** -0.5 ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def set_params(self, **kwargs): """ Take in a dictionary of parameters and applies attack-specific checks before saving them as attributes. :param eps: Attack step (max input variation). :type eps: `float` :param finite_diff: The finite difference parameter. :type finite_diff: `float` :para...
def set_params(self, **kwargs): """ Take in a dictionary of parameters and applies attack-specific checks before saving them as attributes. :param eps: Attack step (max input variation). :type eps: `float` :param finite_diff: The finite difference parameter. :type finite_diff: `float` :para...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def predict(self, x, logits=False, batch_size=128): """ Perform prediction for a batch of inputs. :param x: Test set. :type x: `np.ndarray` :param logits: `True` if the prediction should be done at the logits layer. :type logits: `bool` :param batch_size: Size of batches. :type batch_si...
def predict(self, x, logits=False, batch_size=128): """ Perform prediction for a batch of inputs. :param x: Test set. :type x: `np.ndarray` :param logits: `True` if the prediction should be done at the logits layer. :type logits: `bool` :param batch_size: Size of batches. :type batch_si...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def fit(self, x, y, batch_size=128, nb_epochs=20): """ Fit the classifier on the training set `(x, y)`. :param x: Training data. :type x: `np.ndarray` :param y: Labels, one-vs-rest encoding. :type y: `np.ndarray` :param batch_size: Size of batches. :type batch_size: `int` :param nb_...
def fit(self, x, y, batch_size=128, nb_epochs=20): """ Fit the classifier on the training set `(x, y)`. :param x: Training data. :type x: `np.ndarray` :param y: Labels, one-vs-rest encoding. :type y: `np.ndarray` :param batch_size: Size of batches. :type batch_size: `int` :param nb_...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def fit_generator(self, generator, nb_epochs=20): """ Fit the classifier using the generator that yields batches as specified. :param generator: Batch generator providing `(x, y)` for each epoch. If the generator can be used for native training in Keras, it will. :type generator: ...
def fit_generator(self, generator, nb_epochs=20): """ Fit the classifier using the generator that yields batches as specified. :param generator: Batch generator providing `(x, y)` for each epoch. If the generator can be used for native training in Keras, it will. :type generator: ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def get_activations(self, x, layer): """ Return the output of the specified layer for input `x`. `layer` is specified by layer index (between 0 and `nb_layers - 1`) or by name. The number of layers can be determined by counting the results returned by calling `layer_names`. :param x: Input for comp...
def get_activations(self, x, layer): """ Return the output of the specified layer for input `x`. `layer` is specified by layer index (between 0 and `nb_layers - 1`) or by name. The number of layers can be determined by counting the results returned by calling `layer_names`. :param x: Input for comp...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _init_class_grads(self, label=None, logits=False): import keras.backend as k if len(self._output.shape) == 2: nb_outputs = self._output.shape[1] else: raise ValueError("Unexpected output shape for classification in Keras model.") if label is None: logger.debug("Computing cl...
def _init_class_grads(self, label=None, logits=False): import keras.backend as k k.set_learning_phase(0) if len(self._output.shape) == 2: nb_outputs = self._output.shape[1] else: raise ValueError("Unexpected output shape for classification in Keras model.") if label is None: ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def fit(self, x, y, batch_size=128, nb_epochs=20): """ Fit the classifier on the training set `(inputs, outputs)`. :param x: Training data. :type x: `np.ndarray` :param y: Labels, one-vs-rest encoding. :type y: `np.ndarray` :param batch_size: Size of batches. :type batch_size: `int` ...
def fit(self, x, y, batch_size=128, nb_epochs=20): """ Fit the classifier on the training set `(inputs, outputs)`. :param x: Training data. :type x: `np.ndarray` :param y: Labels, one-vs-rest encoding. :type y: `np.ndarray` :param batch_size: Size of batches. :type batch_size: `int` ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def fit_generator(self, generator, nb_epochs=20): """ Fit the classifier using the generator that yields batches as specified. :param generator: Batch generator providing `(x, y)` for each epoch. :type generator: `DataGenerator` :param nb_epochs: Number of epochs to use for trainings. :type nb_...
def fit_generator(self, generator, nb_epochs=20): """ Fit the classifier using the generator that yields batches as specified. :param generator: Batch generator providing `(x, y)` for each epoch. :type generator: `DataGenerator` :param nb_epochs: Number of epochs to use for trainings. :type nb_...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def predict(self, x, logits=False, batch_size=128): """ Perform prediction for a batch of inputs. :param x: Test set. :type x: `np.ndarray` :param logits: `True` if the prediction should be done at the logits layer. :type logits: `bool` :param batch_size: Size of batches. :type batch_si...
def predict(self, x, logits=False, batch_size=128): """ Perform prediction for a batch of inputs. :param x: Test set. :type x: `np.ndarray` :param logits: `True` if the prediction should be done at the logits layer. :type logits: `bool` :param batch_size: Size of batches. :type batch_si...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def class_gradient(self, x, label=None, logits=False): """ Compute per-class derivatives w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param label: Index of a specific per-class derivative. If an integer is provided, the gradient of that class ...
def class_gradient(self, x, label=None, logits=False): """ Compute per-class derivatives w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param label: Index of a specific per-class derivative. If an integer is provided, the gradient of that class ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def loss_gradient(self, x, y): """ Compute the gradient of the loss function w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param y: Correct labels, one-vs-rest encoding. :type y: `np.ndarray` :return: Array of gradients of the same shape as `...
def loss_gradient(self, x, y): """ Compute the gradient of the loss function w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param y: Correct labels, one-vs-rest encoding. :type y: `np.ndarray` :return: Array of gradients of the same shape as `...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def predict(self, x, logits=False, batch_size=128): """ Perform prediction for a batch of inputs. :param x: Test set. :type x: `np.ndarray` :param logits: `True` if the prediction should be done at the logits layer. :type logits: `bool` :param batch_size: Size of batches. :type batch_si...
def predict(self, x, logits=False, batch_size=128): """ Perform prediction for a batch of inputs. :param x: Test set. :type x: `np.ndarray` :param logits: `True` if the prediction should be done at the logits layer. :type logits: `bool` :param batch_size: Size of batches. :type batch_si...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def fit(self, x, y, batch_size=128, nb_epochs=10): """ Fit the classifier on the training set `(x, y)`. :param x: Training data. :type x: `np.ndarray` :param y: Labels, one-vs-rest encoding. :type y: `np.ndarray` :param batch_size: Size of batches. :type batch_size: `int` :param nb_...
def fit(self, x, y, batch_size=128, nb_epochs=10): """ Fit the classifier on the training set `(x, y)`. :param x: Training data. :type x: `np.ndarray` :param y: Labels, one-vs-rest encoding. :type y: `np.ndarray` :param batch_size: Size of batches. :type batch_size: `int` :param nb_...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def fit_generator(self, generator, nb_epochs=20): """ Fit the classifier using the generator that yields batches as specified. :param generator: Batch generator providing `(x, y)` for each epoch. :type generator: `DataGenerator` :param nb_epochs: Number of epochs to use for trainings. :type nb_...
def fit_generator(self, generator, nb_epochs=20): """ Fit the classifier using the generator that yields batches as specified. :param generator: Batch generator providing `(x, y)` for each epoch. :type generator: `DataGenerator` :param nb_epochs: Number of epochs to use for trainings. :type nb_...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def get_activations(self, x, layer): """ Return the output of the specified layer for input `x`. `layer` is specified by layer index (between 0 and `nb_layers - 1`) or by name. The number of layers can be determined by counting the results returned by calling `layer_names`. :param x: Input for comp...
def get_activations(self, x, layer): """ Return the output of the specified layer for input `x`. `layer` is specified by layer index (between 0 and `nb_layers - 1`) or by name. The number of layers can be determined by counting the results returned by calling `layer_names`. :param x: Input for comp...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__( self, clip_values, input_ph, logits, output_ph=None, train=None, loss=None, learning=None, sess=None, channel_index=3, defences=None, preprocessing=(0, 1), ): """ Initialization specifically for the Tensorflow-based implementation. :param clip_v...
def __init__( self, clip_values, input_ph, logits, output_ph=None, train=None, loss=None, learning=None, sess=None, channel_index=3, defences=None, preprocessing=(0, 1), ): """ Initialization specifically for the Tensorflow-based implementation. :param clip_v...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def predict(self, x, logits=False, batch_size=128): """ Perform prediction for a batch of inputs. :param x: Test set. :type x: `np.ndarray` :param logits: `True` if the prediction should be done at the logits layer. :type logits: `bool` :param batch_size: Size of batches. :type batch_si...
def predict(self, x, logits=False, batch_size=128): """ Perform prediction for a batch of inputs. :param x: Test set. :type x: `np.ndarray` :param logits: `True` if the prediction should be done at the logits layer. :type logits: `bool` :param batch_size: Size of batches. :type batch_si...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def fit(self, x, y, batch_size=128, nb_epochs=10): """ Fit the classifier on the training set `(x, y)`. :param x: Training data. :type x: `np.ndarray` :param y: Labels, one-vs-rest encoding. :type y: `np.ndarray` :param batch_size: Size of batches. :type batch_size: `int` :param nb_...
def fit(self, x, y, batch_size=128, nb_epochs=10): """ Fit the classifier on the training set `(x, y)`. :param x: Training data. :type x: `np.ndarray` :param y: Labels, one-vs-rest encoding. :type y: `np.ndarray` :param batch_size: Size of batches. :type batch_size: `int` :param nb_...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def fit_generator(self, generator, nb_epochs=20): """ Fit the classifier using the generator that yields batches as specified. :param generator: Batch generator providing `(x, y)` for each epoch. If the generator can be used for native training in TensorFlow, it will. :type genera...
def fit_generator(self, generator, nb_epochs=20): """ Fit the classifier using the generator that yields batches as specified. :param generator: Batch generator providing `(x, y)` for each epoch. If the generator can be used for native training in TensorFlow, it will. :type genera...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def class_gradient(self, x, label=None, logits=False): """ Compute per-class derivatives w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param label: Index of a specific per-class derivative. If an integer is provided, the gradient of that class ...
def class_gradient(self, x, label=None, logits=False): """ Compute per-class derivatives w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param label: Index of a specific per-class derivative. If an integer is provided, the gradient of that class ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def loss_gradient(self, x, y): """ Compute the gradient of the loss function w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param y: Correct labels, one-vs-rest encoding. :type y: `np.ndarray` :return: Array of gradients of the same shape as `...
def loss_gradient(self, x, y): """ Compute the gradient of the loss function w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param y: Correct labels, one-vs-rest encoding. :type y: `np.ndarray` :return: Array of gradients of the same shape as `...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def get_activations(self, x, layer): """ Return the output of the specified layer for input `x`. `layer` is specified by layer index (between 0 and `nb_layers - 1`) or by name. The number of layers can be determined by counting the results returned by calling `layer_names`. :param x: Input for comp...
def get_activations(self, x, layer): """ Return the output of the specified layer for input `x`. `layer` is specified by layer index (between 0 and `nb_layers - 1`) or by name. The number of layers can be determined by counting the results returned by calling `layer_names`. :param x: Input for comp...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__(self, generator, size, batch_size): """ Create a Keras data generator wrapper instance. :param generator: A generator as specified by Keras documentation. Its output must be a tuple of either `(inputs, targets)` or `(inputs, targets, sample_weights)`. All arrays in this tu...
def __init__(self, generator, size, batch_size): """ Create a Keras data generator wrapper instance. :param generator: A generator as specified by Keras documentation. Its output must be a tuple of either `(inputs, targets)` or `(inputs, targets, sample_weights)`. All arrays in this t...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__(self, data_loader, size, batch_size): """ Create a data generator wrapper on top of a PyTorch :class:`DataLoader`. :param data_loader: A PyTorch data generator. :type data_loader: `torch.utils.data.DataLoader` :param size: Total size of the dataset. :type size: int :param batch_...
def __init__(self, data_loader, size, batch_size): """ Create a data generator wrapper on top of a PyTorch :class:`DataLoader`. :param data_loader: A PyTorch data generator. :type data_loader: `torch.utils.data.DataLoader` :param size: Total size of the dataset. :type size: int :param batch...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__(self, data_loader, size, batch_size): """ Create a data generator wrapper on top of an MXNet :class:`DataLoader`. :param data_loader: :type data_loader: `mxnet.gluon.data.DataLoader` :param size: Total size of the dataset. :type size: int :param batch_size: Size of the minibatch...
def __init__(self, data_loader, size, batch_size): """ Create a data generator wrapper on top of an MXNet :class:`DataLoader`. :param data_loader: :type data_loader: `mxnet.gluon.data.DataLoader` :param size: Total size of the dataset. :type size: int :param batch_size: Size of the minibatc...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__(self, sess, iterator, iterator_type, iterator_arg, size, batch_size): """ Create a data generator wrapper for TensorFlow. Supported iterators: initializable, reinitializable, feedable. :param sess: Tensorflow session. :type sess: `tf.Session` :param iterator: Data iterator from TensorFl...
def __init__(self): pass
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def get_batch(self): """ Provide the next batch for training in the form of a tuple `(x, y)`. The generator should loop over the data indefinitely. :return: A tuple containing a batch of data `(x, y)`. :rtype: `tuple` :raises: `ValueError` if the iterator has reached the end. """ import ...
def get_batch(self): """ Provide the next batch for training in the form of a tuple `(x, y)`. The generator should loop over the data indefinitely. :return: A tuple containing a batch of data `(x, y)`. :rtype: `tuple` """ raise NotImplementedError
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def fit_generator(self, generator, nb_epochs=20): """ Train a model adversarially using a data generator. See class documentation for more information on the exact procedure. :param generator: Data generator. :type generator: :class:`DataGenerator` :param nb_epochs: Number of epochs to use for ...
def fit_generator(self, generator, nb_epochs=20): """ Train a model adversarially using a data generator. See class documentation for more information on the exact procedure. :param generator: Data generator. :type generator: :class:`DataGenerator` :param nb_epochs: Number of epochs to use for ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def fit(self, x, y, batch_size=128, nb_epochs=20): """ Train a model adversarially. See class documentation for more information on the exact procedure. :param x: Training set. :type x: `np.ndarray` :param y: Labels for the training set. :type y: `np.ndarray` :param batch_size: Size of batc...
def fit(self, x, y, batch_size=128, nb_epochs=20): """ Train a model adversarially. See class documentation for more information on the exact procedure. :param x: Training set. :type x: `np.ndarray` :param y: Labels for the training set. :type y: `np.ndarray` :param batch_size: Size of batc...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __call__(self, x, y=None, quality=None, clip_values=(0, 1)): """ Apply JPEG compression to sample `x`. :param x: Sample to compress with shape `(batch_size, width, height, depth)`. :type x: `np.ndarray` :param y: Labels of the sample `x`. This function does not affect them in any way. :type...
def __call__(self, x, y=None, quality=None, clip_values=(0, 1)): """ Apply jpeg compression to sample `x`. :param x: Sample to compress with shape `(batch_size, width, height, depth)`. :type x: `np.ndarray` :param y: Labels of the sample `x`. This function does not affect them in any way. :type...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def set_params(self, **kwargs): """ Take in a dictionary of parameters and applies defence-specific checks before saving them as attributes. :param quality: The image quality, on a scale from 1 (worst) to 95 (best). Values above 95 should be avoided. :type quality: `int` :param channel_index: Index...
def set_params(self, **kwargs): """ Take in a dictionary of parameters and applies defence-specific checks before saving them as attributes. :param quality: The image quality, on a scale from 1 (worst) to 95 (best). Values above 95 should be avoided. :type quality: `int` :param channel_index: Index...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__(self, prob=0.3, norm=2, lamb=0.5, solver="L-BFGS-B", max_iter=10): """ Create an instance of total variance minimization. :param prob: Probability of the Bernoulli distribution. :type prob: `float` :param norm: The norm (positive integer). :type norm: `int` :param lamb: The lam...
def __init__(self, prob=0.3, norm=2, lam=0.5, solver="L-BFGS-B", maxiter=10): """ Create an instance of total variance minimization. :param prob: Probability of the Bernoulli distribution. :type prob: `float` :param norm: The norm (positive integer). :type norm: `int` :param lam: The lambda...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __call__( self, x, y=None, prob=None, norm=None, lamb=None, solver=None, max_iter=None, clip_values=(0, 1), ): """ Apply total variance minimization to sample `x`. :param x: Sample to compress with shape `(batch_size, width, height, depth)`. :type x: `np.ndarray`...
def __call__( self, x, y=None, prob=None, norm=None, lam=None, solver=None, maxiter=None, clip_values=(0, 1), ): """ Apply total variance minimization to sample `x`. :param x: Sample to compress with shape `(batch_size, width, height, depth)`. :type x: `np.ndarray` ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _minimize(self, x, mask): """ Minimize the total variance objective function. :param x: Original image. :type x: `np.ndarray` :param mask: A matrix that decides which points are kept. :type mask: `np.ndarray` :return: A new image. :rtype: `np.ndarray` """ z = x.copy() f...
def _minimize(self, x, mask): """ Minimize the total variance objective function. :param x: Original image. :type x: `np.ndarray` :param mask: A matrix that decides which points are kept. :type mask: `np.ndarray` :return: A new image. :rtype: `np.ndarray` """ z = x.copy() f...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _loss_func(z, x, mask, norm, lamb): """ Loss function to be minimized. :param z: Initial guess. :type z: `np.ndarray` :param x: Original image. :type x: `np.ndarray` :param mask: A matrix that decides which points are kept. :type mask: `np.ndarray` :param norm: The norm (positiv...
def _loss_func(self, z, x, mask, norm, lam): """ Loss function to be minimized. :param z: Initial guess. :type z: `np.ndarray` :param x: Original image. :type x: `np.ndarray` :param mask: A matrix that decides which points are kept. :type mask: `np.ndarray` :param norm: The norm (po...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _deri_loss_func(z, x, mask, norm, lamb): """ Derivative of loss function to be minimized. :param z: Initial guess. :type z: `np.ndarray` :param x: Original image. :type x: `np.ndarray` :param mask: A matrix that decides which points are kept. :type mask: `np.ndarray` :param norm...
def _deri_loss_func(z, x, mask, norm, lam): """ Derivative of loss function to be minimized. :param z: Initial guess. :type z: `np.ndarray` :param x: Original image. :type x: `np.ndarray` :param mask: A matrix that decides which points are kept. :type mask: `np.ndarray` :param norm:...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def set_params(self, **kwargs): """ Take in a dictionary of parameters and applies defence-specific checks before saving them as attributes. :param prob: Probability of the Bernoulli distribution. :type prob: `float` :param norm: The norm (positive integer). :type norm: `int` :param lamb: T...
def set_params(self, **kwargs): """ Take in a dictionary of parameters and applies defence-specific checks before saving them as attributes. :param prob: Probability of the Bernoulli distribution. :type prob: `float` :param norm: The norm (positive integer). :type norm: `int` :param lam: Th...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def evaluate_defence(self, is_clean, **kwargs): """ Returns confusion matrix. :param is_clean: ground truth, where is_clean[i]=1 means that x_train[i] is clean and is_clean[i]=0 means x_train[i] is poisonous :type is_clean: :class `list` :param kwargs: a dictionary of defence-s...
def evaluate_defence(self, is_clean, **kwargs): """ Returns confusion matrix. :param is_clean: ground truth, where is_clean[i]=1 means that x_train[i] is clean and is_clean[i]=0 means x_train[i] is poisonous :type is_clean: :class `list` :param kwargs: a dictionary of defence-s...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def detect_poison(self, **kwargs): """ Returns poison detected and a report. :param kwargs: a dictionary of detection-specific parameters :type kwargs: `dict` :return: (report, is_clean_lst): where a report is a dictionary that contains information specified by the clustering analysis t...
def detect_poison(self, **kwargs): """ Returns poison detected. :param kwargs: a dictionary of detection-specific parameters :type kwargs: `dict` :return: 1) confidence_level, 2) is_clean_lst : type List[int], where is_clean_lst[i]=1 means that x_train[i] there is clean and is_clean_lst...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def analyze_clusters(self, **kwargs): """ This function analyzes the clusters according to the provided method :param kwargs: a dictionary of cluster-analysis-specific parameters :type kwargs: `dict` :return: assigned_clean_by_class, an array of arrays that contains what data points where classifie...
def analyze_clusters(self, **kwargs): """ This function analyzes the clusters according to the provided method :param kwargs: a dictionary of cluster-analysis-specific parameters :type kwargs: `dict` :return: assigned_clean_by_class, an array of arrays that contains what data points where classifie...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def analyze_by_size(self, separated_clusters): """ Designates as poisonous the cluster with less number of items on it. :param separated_clusters: list where separated_clusters[i] is the cluster assignments for the ith class :type separated_clusters: `list` :return: all_assigned_clean, summary_pois...
def analyze_by_size(self, separated_clusters): """ Designates as poisonous the cluster with less number of items on it. :param separated_clusters: list where separated_clusters[i] is the cluster assignments for the ith class :type separated_clusters: `list` :return: all_assigned_clean, summary_pois...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def analyze_by_distance(self, separated_clusters, separated_activations): """ Assigns a cluster as poisonous if its median activation is closer to the median activation for another class than it is to the median activation of its own class. Currently, this function assumes there are only two clusters pe...
def analyze_by_distance(self, separated_clusters, separated_activations): """ Assigns a cluster as poisonous if its median activation is closer to the median activation for another class than it is to the median activation of its own class. Currently, this function assumed there are only two clusters pe...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def analyze_by_relative_size(self, separated_clusters, size_threshold=0.35, r_size=2): """ Assigns a cluster as poisonous if the smaller one contains less than threshold of the data. This method assumes only 2 clusters :param separated_clusters: list where separated_clusters[i] is the cluster assignmen...
def analyze_by_relative_size(self, separated_clusters, size_threshold=0.35): """ Assigns a cluster as poisonous if the smaller one contains less than threshold of the data. This method assumes only 2 clusters :param separated_clusters: list where separated_clusters[i] is the cluster assignments for the...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def detect_poison(self, **kwargs): """ Detect poison. :param kwargs: Defence-specific parameters used by child classes. :type kwargs: `dict` :return: `(dict, list)` dictionary with report and list with items identified as poison """ raise NotImplementedError
def detect_poison(self, **kwargs): """ Detect poison. :param kwargs: Defence-specific parameters used by child classes. :type kwargs: `dict` :return: `list` with items identified as poison """ raise NotImplementedError
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def random_sphere(nb_points, nb_dims, radius, norm): """ Generate randomly `m x n`-dimension points with radius `radius` and centered around 0. :param nb_points: Number of random data points :type nb_points: `int` :param nb_dims: Dimensionality :type nb_dims: `int` :param radius: Radius ...
def random_sphere(nb_points, nb_dims, radius, norm): """ Generate randomly `m x n`-dimension points with radius `r` and centered around 0. :param nb_points: Number of random data points :type nb_points: `int` :param nb_dims: Dimensionality :type nb_dims: `int` :param radius: Radius :typ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _expand_non_flag( self, at: int, ini_dir: Path, line: str, result: List[str] ) -> None: # noqa try: at = line.index(" --hash") requirement, hash_part = line[:at], re.sub(r"\s+", " ", line[at + 1 :]) except ValueError: requirement, hash_part = line, "" try: req = Requ...
def _expand_non_flag( self, at: int, ini_dir: Path, line: str, result: List[str] ) -> None: # noqa try: req = Requirement(line) except InvalidRequirement as exc: if is_url(line) or any( line.startswith(f"{v}+") and is_url(line[len(v) + 1 :]) for v in VCS ): r...
https://github.com/tox-dev/tox/issues/1903
$ python -m tox -rvv -e py39 ROOT: 255 D setup logging to DEBUG on pid 45306 [tox/report.py:211] ROOT: 261 W remove tox env folder /Users/chainz/Documents/Projects/apig-wsgi/.tox/4/py39 [tox/tox_env/api.py:190] ROOT: 334 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=9) [virtualenv/discov...
ValueError
def get_env_var(key: str, of_type: Type[Any]) -> Optional[Tuple[Any, str]]: """Get the environment variable option. :param key: the config key requested :param of_type: the type we would like to convert it to :return: """ key_upper = key.upper() for fmt in ("TOX_{}", "TOX{}"): envir...
def get_env_var(key: str, of_type: Type[Any]) -> Optional[Tuple[Any, str]]: """Get the environment variable option. :param key: the config key requested :param of_type: the type we would like to convert it to :return: """ key_upper = key.upper() for fmt in ("TOX_{}", "TOX{}"): envir...
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def get(self, key: str, of_type: Type[Any]) -> Any: cache_key = key, of_type if cache_key in self._cache: result = self._cache[cache_key] else: try: if ( self.ini is None ): # pragma: no cover # this can only happen if we don't call __bool__ firsts ...
def get(self, key: str, of_type: Type[Any]) -> Any: cache_key = key, of_type if cache_key in self._cache: result = self._cache[cache_key] else: try: if ( self.ini is None ): # pragma: no cover # this can only happen if we don't call __bool__ firsts ...
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def load( self, key: str, of_type: Type[V], kwargs: Mapping[str, Any], conf: Optional["Config"], env_name: Optional[str], chain: List[str], ) -> V: """ Load a value. :param key: the key under it lives :param of_type: the type to convert to :param conf: the configuration ...
def load( self, key: str, of_type: Type[V], conf: Optional["Config"], env_name: Optional[str], chain: List[str], ) -> V: """ Load a value. :param key: the key under it lives :param of_type: the type to convert to :param conf: the configuration object of this tox session (nee...
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def to(self, raw: T, of_type: Type[V], kwargs: Mapping[str, Any]) -> V: from_module = getattr(of_type, "__module__", None) if from_module in ("typing", "typing_extensions"): return self._to_typing(raw, of_type, kwargs) # type: ignore[return-value] elif issubclass(of_type, Path): return self...
def to(self, raw: T, of_type: Type[V]) -> V: from_module = getattr(of_type, "__module__", None) if from_module in ("typing", "typing_extensions"): return self._to_typing(raw, of_type) # type: ignore[return-value] elif issubclass(of_type, Path): return self.to_path(raw) # type: ignore[retur...
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def _to_typing(self, raw: T, of_type: Type[V], kwargs: Mapping[str, Any]) -> V: origin = getattr(of_type, "__origin__", of_type.__class__) result: Any = _NO_MAPPING if origin in (list, List): entry_type = of_type.__args__[0] # type: ignore[attr-defined] result = [self.to(i, entry_type, kwar...
def _to_typing(self, raw: T, of_type: Type[V]) -> V: origin = getattr(of_type, "__origin__", of_type.__class__) result: Any = _NO_MAPPING if origin in (list, List): entry_type = of_type.__args__[0] # type: ignore[attr-defined] result = [self.to(i, entry_type) for i in self.to_list(raw, entr...
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def __init__( self, keys: Iterable[str], desc: str, env_name: Optional[str], of_type: Type[T], default: Union[Callable[["Config", Optional[str]], T], T], post_process: Optional[Callable[[T, "Config"], T]] = None, kwargs: Optional[Mapping[str, Any]] = None, ) -> None: super().__init__...
def __init__( self, keys: Iterable[str], desc: str, env_name: Optional[str], of_type: Type[T], default: Union[Callable[["Config", Optional[str]], T], T], post_process: Optional[Callable[[T, "Config"], T]] = None, ) -> None: super().__init__(keys, desc, env_name) self.of_type = of_typ...
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def __call__( self, conf: "Config", name: Optional[str], loaders: List[Loader[T]], chain: List[str], ) -> T: if self._cache is _PLACE_HOLDER: found = False for key in self.keys: for loader in loaders: try: value = loader.load( ...
def __call__( self, conf: "Config", name: Optional[str], loaders: List[Loader[T]], chain: List[str], ) -> T: if self._cache is _PLACE_HOLDER: found = False for key in self.keys: for loader in loaders: try: value = loader.load(key, s...
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def add_config( self, keys: Union[str, Sequence[str]], of_type: Type[V], default: Union[Callable[["Config", Optional[str]], V], V], desc: str, post_process: Optional[Callable[[V, "Config"], V]] = None, kwargs: Optional[Mapping[str, Any]] = None, ) -> ConfigDynamicDefinition[V]: """ A...
def add_config( self, keys: Union[str, Sequence[str]], of_type: Type[V], default: Union[Callable[["Config", Optional[str]], V], V], desc: str, post_process: Optional[Callable[[V, "Config"], V]] = None, overwrite: bool = False, ) -> ConfigDynamicDefinition[V]: """ Add configuration va...
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def __init__(self, value: Union[None, List[str], str] = None): if isinstance(value, str): value = StrConvert().to(value, of_type=List[str], kwargs={}) self.all: bool = value is None or "ALL" in value self._names = value
def __init__(self, value: Union[None, List[str], str] = None): if isinstance(value, str): value = StrConvert().to(value, of_type=List[str]) self.all: bool = value is None or "ALL" in value self._names = value
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def __init__( self, raw: str, within_tox_ini: bool = True, root: Optional[Path] = None ) -> None: self._root = Path().cwd() if root is None else root.resolve() if within_tox_ini: # patch the content coming from tox.ini lines: List[str] = [] for line in raw.splitlines(): # for to...
def __init__( self, raw: str, within_tox_ini: bool = True, root: Optional[Path] = None ) -> None: self._root = Path().cwd() if root is None else root if within_tox_ini: # patch the content coming from tox.ini lines: List[str] = [] for line in raw.splitlines(): # for tox<4 suppor...
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def validate_and_expand(self) -> List[str]: raw = self._normalize_raw() result: List[str] = [] ini_dir = self.root for at, line in enumerate(raw.splitlines(), start=1): line = re.sub(r"(?<!\\)\s#.*", "", line).strip() if not line or line.startswith("#"): continue if l...
def validate_and_expand(self) -> List[str]: raw = self._normalize_raw() result: List[str] = [] ini_dir = self.root for at, line in enumerate(raw.splitlines(), start=1): if line.startswith("#"): continue line = re.sub(r"\s#.*", "", line).strip() if not line: ...
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def register_config(self) -> None: super().register_config() deps_kwargs = {"root": self.core["toxinidir"]} self.conf.add_config( keys="deps", of_type=RequirementsFile, kwargs=deps_kwargs, default=RequirementsFile("", **deps_kwargs), desc="Name of the python dependenc...
def register_config(self) -> None: super().register_config() self.conf.add_config( keys="deps", of_type=RequirementsFile, default=RequirementsFile(""), desc="Name of the python dependencies as specified by PEP-440", ) self.core.add_config( keys=["skip_missing_inte...
https://github.com/tox-dev/tox/issues/1853
ROOT: 221 D setup logging to DEBUG on pid 27538 [tox/report.py:211] ROOT: 236 W remove tox env folder $project_root/.tox/4/py38 [tox/tox_env/api.py:190] ROOT: 339 I find interpreter for spec PythonSpec(implementation=CPython, major=3, minor=8) [virtualenv/discovery/builtin.py:62] ROOT: 339 D discover exe for PythonInfo...
ValueError
def __init__( self, raw: str, within_tox_ini: bool = True, root: Optional[Path] = None ) -> None: self._root = Path().cwd() if root is None else root if within_tox_ini: # patch the content coming from tox.ini lines: List[str] = [] for line in raw.splitlines(): # for tox<4 suppor...
def __init__( self, raw: str, allow_short_req_file: bool = True, root: Optional[Path] = None ) -> None: self._root = Path().cwd() if root is None else root if allow_short_req_file: # patch for tox<4 supporting requirement/constraint files via -rreq.txt/-creq.txt lines: List[str] = [] for li...
https://github.com/tox-dev/tox/issues/1792
Traceback (most recent call last): File "/home/domdf/Python/01 GitHub Repos/03 Libraries/wordle/venv/lib/python3.8/site-packages/tox/session/cmd/run/single.py", line 41, in _evaluate tox_env.ensure_setup(recreate=recreate) File "/home/domdf/Python/01 GitHub Repos/03 Libraries/wordle/venv/lib/python3.8/site-packages/tox...
ValueError
def validate_and_expand(self) -> List[str]: raw = self._normalize_raw() result: List[str] = [] ini_dir = self.root for at, line in enumerate(raw.splitlines(), start=1): if line.startswith("#"): continue line = re.sub(r"\s#.*", "", line).strip() if not line: ...
def validate_and_expand(self) -> List[str]: raw = self._normalize_raw() result: List[str] = [] ini_dir = self.root for at, line in enumerate(raw.splitlines(), start=1): if line.startswith("#"): continue line = re.sub(r"\s#.*", "", line).strip() if not line: ...
https://github.com/tox-dev/tox/issues/1792
Traceback (most recent call last): File "/home/domdf/Python/01 GitHub Repos/03 Libraries/wordle/venv/lib/python3.8/site-packages/tox/session/cmd/run/single.py", line 41, in _evaluate tox_env.ensure_setup(recreate=recreate) File "/home/domdf/Python/01 GitHub Repos/03 Libraries/wordle/venv/lib/python3.8/site-packages/tox...
ValueError
def tox_add_option(parser: ArgumentParser) -> None: parser.add_argument( "--no-recreate-provision", dest="no_recreate_provision", help="if recreate is set do not recreate provision tox environment", action="store_true", ) parser.add_argument( "-r", "--recreate...
def tox_add_option(parser: ArgumentParser) -> None: parser.add_argument( "--no-recreate-provision", dest="recreate", help="if recreate is set do not recreate provision tox environment", action="store_true", )
https://github.com/tox-dev/tox/issues/1793
ROOT: 111 D setup logging to DEBUG on pid 483153 [tox/report.py:211] ROOT: 143 W will run in automatically provisioned tox, host /home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/bin/python3 is missing [requires (has)]: pip>=20.3.3 (20.3.1) [tox/provision.py:85] ROOT: 156 I find interpreter for spec Python...
AttributeError
def env_run_create_flags(parser: ArgumentParser) -> None: parser.add_argument( "--result-json", dest="result_json", metavar="path", of_type=Path, default=None, help="write a json file with detailed information about all commands and results involved", ) parser...
def env_run_create_flags(parser: ArgumentParser) -> None: parser.add_argument( "--result-json", dest="result_json", metavar="path", of_type=Path, default=None, help="write a json file with detailed information about all commands and results involved", ) parser...
https://github.com/tox-dev/tox/issues/1793
ROOT: 111 D setup logging to DEBUG on pid 483153 [tox/report.py:211] ROOT: 143 W will run in automatically provisioned tox, host /home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/bin/python3 is missing [requires (has)]: pip>=20.3.3 (20.3.1) [tox/provision.py:85] ROOT: 156 I find interpreter for spec Python...
AttributeError
def __init__( self, raw: str, allow_short_req_file: bool = True, root: Optional[Path] = None ) -> None: self._root = Path().cwd() if root is None else root if allow_short_req_file: # patch for tox<4 supporting requirement/constraint files via -rreq.txt/-creq.txt lines: List[str] = [] for li...
def __init__( self, raw: str, allow_short_req_file: bool = True, root: Optional[Path] = None ) -> None: self._root = Path().cwd() if root is None else root if ( allow_short_req_file ): # patch tox supporting requirements files via -rrequirements.txt r = ( (f"-r {i[2:]}" if l...
https://github.com/tox-dev/tox/issues/1788
$ tox4 -e docs [10:45:55] docs: internal error Traceback (most recent call last): File "/Users/ssbarnea/.local/pipx/venvs/tox/lib/python3.9/site-packages/tox/session/cmd/run/single.py", line 41, in _evaluate...
ValueError
def validate_and_expand(self) -> List[str]: raw = self._normalize_raw() result: List[str] = [] ini_dir = self.root for at, line in enumerate(raw.splitlines(), start=1): if line.startswith("#"): continue line = re.sub(r"\s#.*", "", line).strip() if not line: ...
def validate_and_expand(self) -> List[str]: raw = self._normalize_raw() result: List[str] = [] ini_dir = self.root for at, line in enumerate(raw.splitlines(), start=1): if line.startswith("#"): continue line = re.sub(r"\s#.*", "", line).strip() if not line: ...
https://github.com/tox-dev/tox/issues/1788
$ tox4 -e docs [10:45:55] docs: internal error Traceback (most recent call last): File "/Users/ssbarnea/.local/pipx/venvs/tox/lib/python3.9/site-packages/tox/session/cmd/run/single.py", line 41, in _evaluate...
ValueError
def _replace_match(self, match): g = match.groupdict() sub_value = g["substitution_value"] if self.crossonly: if sub_value.startswith("["): return self._substitute_from_other_section(sub_value) # in crossonly we return all other hits verbatim start, end = match.span() ...
def _replace_match(self, match): g = match.groupdict() sub_value = g["substitution_value"] if self.crossonly: if sub_value.startswith("["): return self._substitute_from_other_section(sub_value) # in crossonly we return all other hits verbatim start, end = match.span() ...
https://github.com/tox-dev/tox/issues/1777
$ tox -rvv using tox.ini: /tmp/test/tox.ini (pid 8575) removing /tmp/test/.tox/log Traceback (most recent call last): File "/tmp/venv/bin/tox", line 8, in <module> sys.exit(cmdline()) File "/tmp/venv/lib/python3.8/site-packages/tox/session/__init__.py", line 44, in cmdline main(args) File "/tmp/venv/lib/python3.8/site-...
tox.exception.ConfigError
def __init__(self, envname, config, factors, reader): #: test environment name self.envname = envname #: global tox config object self.config = config #: set of factors self.factors = factors self._reader = reader self._missing_subs = {} """Holds substitutions that could not be resol...
def __init__(self, envname, config, factors, reader): #: test environment name self.envname = envname #: global tox config object self.config = config #: set of factors self.factors = factors self._reader = reader self._missing_subs = [] """Holds substitutions that could not be resol...
https://github.com/tox-dev/tox/issues/1716
tox -vv using tox.ini: /home/jayvdb/projects/tox/my-tox-tests/tests/tox.ini (pid 23538) removing /home/jayvdb/projects/tox/my-tox-tests/tests/.tox/log [wikimedia] tox-wikimedia is enabled Traceback (most recent call last): File "/home/jayvdb/.cache/tox/my-tox-tests/py38-tox3_20-other/bin/tox", line 8, in <module> sys.e...
AttributeError
def make_envconfig(self, name, section, subs, config, replace=True): factors = set(name.split("-")) reader = SectionReader( section, self._cfg, fallbacksections=["testenv"], factors=factors ) tc = TestenvConfig(name, config, factors, reader) reader.addsubstitutions( envname=name, ...
def make_envconfig(self, name, section, subs, config, replace=True): factors = set(name.split("-")) reader = SectionReader( section, self._cfg, fallbacksections=["testenv"], factors=factors ) tc = TestenvConfig(name, config, factors, reader) reader.addsubstitutions( envname=name, ...
https://github.com/tox-dev/tox/issues/1716
tox -vv using tox.ini: /home/jayvdb/projects/tox/my-tox-tests/tests/tox.ini (pid 23538) removing /home/jayvdb/projects/tox/my-tox-tests/tests/.tox/log [wikimedia] tox-wikimedia is enabled Traceback (most recent call last): File "/home/jayvdb/.cache/tox/my-tox-tests/py38-tox3_20-other/bin/tox", line 8, in <module> sys.e...
AttributeError
def __init__(self, name): self.name = name super(Error, self).__init__(name)
def __init__(self, name): self.name = name
https://github.com/tox-dev/tox/issues/1716
tox -vv using tox.ini: /home/jayvdb/projects/tox/my-tox-tests/tests/tox.ini (pid 23538) removing /home/jayvdb/projects/tox/my-tox-tests/tests/.tox/log [wikimedia] tox-wikimedia is enabled Traceback (most recent call last): File "/home/jayvdb/.cache/tox/my-tox-tests/py38-tox3_20-other/bin/tox", line 8, in <module> sys.e...
AttributeError
def setupenv(self): if self.envconfig._missing_subs: self.status = ( "unresolvable substitution(s):\n {}\n" "Environment variables are missing or defined recursively.".format( "\n ".join( [ "{}: '{}'".format(section_ke...
def setupenv(self): if self.envconfig._missing_subs: self.status = ( "unresolvable substitution(s): {}. " "Environment variables are missing or defined recursively.".format( ",".join(["'{}'".format(m) for m in self.envconfig._missing_subs]), ) ) ...
https://github.com/tox-dev/tox/issues/1716
tox -vv using tox.ini: /home/jayvdb/projects/tox/my-tox-tests/tests/tox.ini (pid 23538) removing /home/jayvdb/projects/tox/my-tox-tests/tests/.tox/log [wikimedia] tox-wikimedia is enabled Traceback (most recent call last): File "/home/jayvdb/.cache/tox/my-tox-tests/py38-tox3_20-other/bin/tox", line 8, in <module> sys.e...
AttributeError
def get(self, name, default=None): try: return self.resolved[name] except KeyError: try: if name in self._lookupstack: raise KeyError(name) val = self.definitions[name] except KeyError: return os.environ.get(name, default) self....
def get(self, name, default=None): try: return self.resolved[name] except KeyError: try: if name in self._lookupstack: raise KeyError(name) val = self.definitions[name] except KeyError: return os.environ.get(name, default) self....
https://github.com/tox-dev/tox/issues/1716
tox -vv using tox.ini: /home/jayvdb/projects/tox/my-tox-tests/tests/tox.ini (pid 23538) removing /home/jayvdb/projects/tox/my-tox-tests/tests/.tox/log [wikimedia] tox-wikimedia is enabled Traceback (most recent call last): File "/home/jayvdb/.cache/tox/my-tox-tests/py38-tox3_20-other/bin/tox", line 8, in <module> sys.e...
AttributeError
def getargvlist(self, name, default="", replace=True): s = self.getstring(name, default, replace=False) return _ArgvlistReader.getargvlist(self, s, replace=replace, name=name)
def getargvlist(self, name, default="", replace=True): s = self.getstring(name, default, replace=False) return _ArgvlistReader.getargvlist(self, s, replace=replace)
https://github.com/tox-dev/tox/issues/1716
tox -vv using tox.ini: /home/jayvdb/projects/tox/my-tox-tests/tests/tox.ini (pid 23538) removing /home/jayvdb/projects/tox/my-tox-tests/tests/.tox/log [wikimedia] tox-wikimedia is enabled Traceback (most recent call last): File "/home/jayvdb/.cache/tox/my-tox-tests/py38-tox3_20-other/bin/tox", line 8, in <module> sys.e...
AttributeError
def getargv_install_command(self, name, default="", replace=True): s = self.getstring(name, default, replace=False) if not s: # This occurs when factors are used, and a testenv doesnt have # a factorised value for install_command, most commonly occurring # if setting platform is also use...
def getargv_install_command(self, name, default="", replace=True): s = self.getstring(name, default, replace=False) if not s: # This occurs when factors are used, and a testenv doesnt have # a factorised value for install_command, most commonly occurring # if setting platform is also use...
https://github.com/tox-dev/tox/issues/1716
tox -vv using tox.ini: /home/jayvdb/projects/tox/my-tox-tests/tests/tox.ini (pid 23538) removing /home/jayvdb/projects/tox/my-tox-tests/tests/.tox/log [wikimedia] tox-wikimedia is enabled Traceback (most recent call last): File "/home/jayvdb/.cache/tox/my-tox-tests/py38-tox3_20-other/bin/tox", line 8, in <module> sys.e...
AttributeError
def _replace(self, value, name=None, section_name=None, crossonly=False): if "{" not in value: return value section_name = section_name if section_name else self.section_name assert name self._subststack.append((section_name, name)) try: replaced = Replacer(self, crossonly=crossonly...
def _replace(self, value, name=None, section_name=None, crossonly=False): if "{" not in value: return value section_name = section_name if section_name else self.section_name self._subststack.append((section_name, name)) try: replaced = Replacer(self, crossonly=crossonly).do_replace(val...
https://github.com/tox-dev/tox/issues/1716
tox -vv using tox.ini: /home/jayvdb/projects/tox/my-tox-tests/tests/tox.ini (pid 23538) removing /home/jayvdb/projects/tox/my-tox-tests/tests/.tox/log [wikimedia] tox-wikimedia is enabled Traceback (most recent call last): File "/home/jayvdb/.cache/tox/my-tox-tests/py38-tox3_20-other/bin/tox", line 8, in <module> sys.e...
AttributeError
def _substitute_from_other_section(self, key): if key.startswith("[") and "]" in key: i = key.find("]") section, item = key[1:i], key[i + 1 :] cfg = self.reader._cfg if section in cfg and item in cfg[section]: if (section, item) in self.reader._subststack: ...
def _substitute_from_other_section(self, key): if key.startswith("[") and "]" in key: i = key.find("]") section, item = key[1:i], key[i + 1 :] cfg = self.reader._cfg if section in cfg and item in cfg[section]: if (section, item) in self.reader._subststack: ...
https://github.com/tox-dev/tox/issues/1716
tox -vv using tox.ini: /home/jayvdb/projects/tox/my-tox-tests/tests/tox.ini (pid 23538) removing /home/jayvdb/projects/tox/my-tox-tests/tests/.tox/log [wikimedia] tox-wikimedia is enabled Traceback (most recent call last): File "/home/jayvdb/.cache/tox/my-tox-tests/py38-tox3_20-other/bin/tox", line 8, in <module> sys.e...
AttributeError
def getargvlist(cls, reader, value, replace=True, name=None): """Parse ``commands`` argvlist multiline string. :param SectionReader reader: reader to be used. :param str value: Content stored by key. :rtype: list[list[str]] :raise :class:`tox.exception.ConfigError`: line-continuation ends ...
def getargvlist(cls, reader, value, replace=True): """Parse ``commands`` argvlist multiline string. :param SectionReader reader: reader to be used. :param str value: Content stored by key. :rtype: list[list[str]] :raise :class:`tox.exception.ConfigError`: line-continuation ends nowhere whi...
https://github.com/tox-dev/tox/issues/1716
tox -vv using tox.ini: /home/jayvdb/projects/tox/my-tox-tests/tests/tox.ini (pid 23538) removing /home/jayvdb/projects/tox/my-tox-tests/tests/.tox/log [wikimedia] tox-wikimedia is enabled Traceback (most recent call last): File "/home/jayvdb/.cache/tox/my-tox-tests/py38-tox3_20-other/bin/tox", line 8, in <module> sys.e...
AttributeError
def processcommand(cls, reader, command, replace=True, name=None): # Iterate through each word of the command substituting as # appropriate to construct the new command string. This # string is then broken up into exec argv components using # shlex. if replace: newcommand = "" for wo...
def processcommand(cls, reader, command, replace=True): # Iterate through each word of the command substituting as # appropriate to construct the new command string. This # string is then broken up into exec argv components using # shlex. if replace: newcommand = "" for word in Comma...
https://github.com/tox-dev/tox/issues/1716
tox -vv using tox.ini: /home/jayvdb/projects/tox/my-tox-tests/tests/tox.ini (pid 23538) removing /home/jayvdb/projects/tox/my-tox-tests/tests/.tox/log [wikimedia] tox-wikimedia is enabled Traceback (most recent call last): File "/home/jayvdb/.cache/tox/my-tox-tests/py38-tox3_20-other/bin/tox", line 8, in <module> sys.e...
AttributeError
def getargv_install_command(self, name, default="", replace=True): s = self.getstring(name, default, replace=False) if not s: # This occurs when factors are used, and a testenv doesnt have # a factorised value for install_command, most commonly occurring # if setting platform is also use...
def getargv_install_command(self, name, default="", replace=True): s = self.getstring(name, default, replace=False) if "{packages}" in s: s = s.replace("{packages}", r"\{packages\}") if "{opts}" in s: s = s.replace("{opts}", r"\{opts\}") return _ArgvlistReader.getargvlist(self, s, repla...
https://github.com/tox-dev/tox/issues/1464
when use `win: ` in `install_command` tox raise `IndexError` full trackback: `Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2019.2.4\helpers\pycharm\_jb_tox_runner.py", line 103, in <module> config = tox_config.parseconfig(args=sys.argv[1:]) File "D:\Projects\python\cheetagp\biziou-backend...
tox.exception.ConfigError
def get_build_info(folder): toml_file = folder.join("pyproject.toml") # as per https://www.python.org/dev/peps/pep-0517/ def abort(message): reporter.error("{} inside {}".format(message, toml_file)) raise SystemExit(1) if not toml_file.exists(): reporter.error("missing {}".for...
def get_build_info(folder): toml_file = folder.join("pyproject.toml") # as per https://www.python.org/dev/peps/pep-0517/ def abort(message): reporter.error("{} inside {}".format(message, toml_file)) raise SystemExit(1) if not toml_file.exists(): reporter.error("missing {}".for...
https://github.com/tox-dev/tox/issues/1654
.package start: get-build-requires /Users/nicolas/Workspaces/proj/.tox/.package setting PATH=/Users/nicolas/Workspaces/proj/.tox/.package/bin:/Users/nicolas/.virtualenvs/proj-python3.8/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin [15159] /Users/nicolas/Workspaces/proj$ /Users/nicolas/...
ModuleNotFoundError
def get_build_requires(build_info, package_venv, setup_dir): with package_venv.new_action( "get-build-requires", package_venv.envconfig.envdir ) as action: result = package_venv._pcall( [ package_venv.envconfig.envpython, BUILD_REQUIRE_SCRIPT, ...
def get_build_requires(build_info, package_venv, setup_dir): with package_venv.new_action( "get-build-requires", package_venv.envconfig.envdir ) as action: result = package_venv._pcall( [ package_venv.envconfig.envpython, BUILD_REQUIRE_SCRIPT, ...
https://github.com/tox-dev/tox/issues/1654
.package start: get-build-requires /Users/nicolas/Workspaces/proj/.tox/.package setting PATH=/Users/nicolas/Workspaces/proj/.tox/.package/bin:/Users/nicolas/.virtualenvs/proj-python3.8/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin [15159] /Users/nicolas/Workspaces/proj$ /Users/nicolas/...
ModuleNotFoundError
def __init__(self, config, ini_path, ini_data): # noqa config.toxinipath = ini_path using("tox.ini: {} (pid {})".format(config.toxinipath, os.getpid())) config.toxinidir = config.toxinipath.dirpath() self._cfg = py.iniconfig.IniConfig(config.toxinipath, ini_data) previous_line_of = self._cfg.lineo...
def __init__(self, config, ini_path, ini_data): # noqa config.toxinipath = ini_path using("tox.ini: {} (pid {})".format(config.toxinipath, os.getpid())) config.toxinidir = config.toxinipath.dirpath() self._cfg = py.iniconfig.IniConfig(config.toxinipath, ini_data) previous_line_of = self._cfg.lineo...
https://github.com/tox-dev/tox/issues/1608
Traceback (most recent call last): File "~/.pyenv/versions/3.8.0/lib/python3.8/runpy.py", line 192, in _ run_module_as_main return _run_code(code, main_globals, None, File "~/.pyenv/versions/3.8.0/lib/python3.8/runpy.py", line 85, in _run_code exec(code, run_globals) File ".../.tox/.tox/lib/python3.8/site-packages/tox/...
tox.exception.ConfigError