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 spatial_shape(self): """Return spatial shape of first image in subject. Consistency of spatial shapes across images in the subject is checked first. """ self.check_consistent_spatial_shape() return self.get_first_image().spatial_shape
def spatial_shape(self): """Return spatial shape of first image in subject. Consistency of shapes across images in the subject is checked first. """ return self.shape[1:]
https://github.com/fepegar/torchio/issues/265
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-6b7dc2edb3cc> in <module> ----> 1 icbm.spatial_shape ~/git/torchio/torchio/data/subject.py in spatial_shape(self) 95 Consistency of shapes acr...
ValueError
def spacing(self): """Return spacing of first image in subject. Consistency of spacings across images in the subject is checked first. """ self.check_consistent_attribute("spacing") return self.get_first_image().spacing
def spacing(self): """Return spacing of first image in subject. Consistency of shapes across images in the subject is checked first. """ self.check_consistent_shape() image = self.get_images(intensity_only=False)[0] return image.spacing
https://github.com/fepegar/torchio/issues/265
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-6b7dc2edb3cc> in <module> ----> 1 icbm.spatial_shape ~/git/torchio/torchio/data/subject.py in spatial_shape(self) 95 Consistency of shapes acr...
ValueError
def check_consistent_shape(self) -> None: self.check_consistent_attribute("shape")
def check_consistent_shape(self) -> None: shapes_dict = {} iterable = self.get_images_dict(intensity_only=False).items() for image_name, image in iterable: shapes_dict[image_name] = image.shape num_unique_shapes = len(set(shapes_dict.values())) if num_unique_shapes > 1: message = ( ...
https://github.com/fepegar/torchio/issues/265
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-6b7dc2edb3cc> in <module> ----> 1 icbm.spatial_shape ~/git/torchio/torchio/data/subject.py in spatial_shape(self) 95 Consistency of shapes acr...
ValueError
def add_image(self, image: Image, image_name: str) -> None: self[image_name] = image self.update_attributes()
def add_image(self, image, image_name): self[image_name] = image self.update_attributes()
https://github.com/fepegar/torchio/issues/265
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-6b7dc2edb3cc> in <module> ----> 1 icbm.spatial_shape ~/git/torchio/torchio/data/subject.py in spatial_shape(self) 95 Consistency of shapes acr...
ValueError
def apply_transform(self, sample: Subject) -> dict: sample.check_consistent_spatial_shape() params = self.get_params( self.scales, self.degrees, self.translation, self.isotropic, ) scaling_params, rotation_params, translation_params = params for image in self.get_imag...
def apply_transform(self, sample: Subject) -> dict: sample.check_consistent_shape() params = self.get_params( self.scales, self.degrees, self.translation, self.isotropic, ) scaling_params, rotation_params, translation_params = params for image in self.get_images(sampl...
https://github.com/fepegar/torchio/issues/265
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-6b7dc2edb3cc> in <module> ----> 1 icbm.spatial_shape ~/git/torchio/torchio/data/subject.py in spatial_shape(self) 95 Consistency of shapes acr...
ValueError
def apply_transform(self, sample: Subject) -> dict: sample.check_consistent_spatial_shape() bspline_params = self.get_params( self.num_control_points, self.max_displacement, self.num_locked_borders, ) for image in self.get_images(sample): if image[TYPE] != INTENSITY: ...
def apply_transform(self, sample: Subject) -> dict: sample.check_consistent_shape() bspline_params = self.get_params( self.num_control_points, self.max_displacement, self.num_locked_borders, ) for image in self.get_images(sample): if image[TYPE] != INTENSITY: ...
https://github.com/fepegar/torchio/issues/265
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-6b7dc2edb3cc> in <module> ----> 1 icbm.spatial_shape ~/git/torchio/torchio/data/subject.py in spatial_shape(self) 95 Consistency of shapes acr...
ValueError
def _get_sample_shape(sample: Subject) -> TypeTripletInt: """Return the shape of the first image in the sample.""" sample.check_consistent_spatial_shape() for image_dict in sample.get_images(intensity_only=False): data = image_dict.spatial_shape # remove channels dimension break return ...
def _get_sample_shape(sample: Subject) -> TypeTripletInt: """Return the shape of the first image in the sample.""" sample.check_consistent_shape() for image_dict in sample.get_images(intensity_only=False): data = image_dict.spatial_shape # remove channels dimension break return data
https://github.com/fepegar/torchio/issues/265
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-6b7dc2edb3cc> in <module> ----> 1 icbm.spatial_shape ~/git/torchio/torchio/data/subject.py in spatial_shape(self) 95 Consistency of shapes acr...
ValueError
def __init__( self, num_ghosts: Union[int, Tuple[int, int]] = (4, 10), axes: Union[int, Tuple[int, ...]] = (0, 1, 2), intensity: Union[float, Tuple[float, float]] = (0.5, 1), restore: float = 0.02, p: float = 1, seed: Optional[int] = None, ): super().__init__(p=p, seed=seed) if not i...
def __init__( self, num_ghosts: Union[int, Tuple[int, int]] = (4, 10), axes: Union[int, Tuple[int, ...]] = (0, 1, 2), intensity: Union[float, Tuple[float, float]] = (0.5, 1), restore: float = 0.02, p: float = 1, seed: Optional[int] = None, ): super().__init__(p=p, seed=seed) if not i...
https://github.com/fepegar/torchio/issues/218
Traceback (most recent call last): File "/opt/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-3-57113dda3e8e>", line 2, in <module> tranform = torchio.transforms.RandomGhosting(num_ghosts=10, intensity...
ValueError
def __getitem__(self, index: int) -> dict: if not isinstance(index, int): raise ValueError(f'Index "{index}" must be int, not {type(index)}') subject = self.subjects[index] sample = copy.deepcopy(subject) sample.load() # Apply transform (this is usually the bottleneck) if self._transfor...
def __getitem__(self, index: int) -> dict: if not isinstance(index, int): raise ValueError(f'Index "{index}" must be int, not {type(index)}') subject = self.subjects[index] sample = copy.deepcopy(subject) # Apply transform (this is usually the bottleneck) if self._transform is not None: ...
https://github.com/fepegar/torchio/issues/209
torch.Size([1, 348, 272, 108]) torch.Size([1, 348, 272, 108]) Traceback (most recent call last): File "Code/non_local_feature_alignment/dataset_manager.py", line 88, in <module> print(b["img"][torchio.DATA]) KeyError: 'data'
KeyError
def load(self) -> Tuple[torch.Tensor, np.ndarray]: r"""Load the image from disk. The file is expected to be monomodal/grayscale and 2D or 3D. A channels dimension is added to the tensor. Returns: Tuple containing a 4D data tensor of size :math:`(1, D_{in}, H_{in}, W_{in})` and ...
def load(self) -> Tuple[torch.Tensor, np.ndarray]: r"""Load the image from disk. The file is expected to be monomodal/grayscale and 2D or 3D. A channels dimension is added to the tensor. Returns: Tuple containing a 4D data tensor of size :math:`(1, D_{in}, H_{in}, W_{in})` and ...
https://github.com/fepegar/torchio/issues/209
torch.Size([1, 348, 272, 108]) torch.Size([1, 348, 272, 108]) Traceback (most recent call last): File "Code/non_local_feature_alignment/dataset_manager.py", line 88, in <module> print(b["img"][torchio.DATA]) KeyError: 'data'
KeyError
def __init__(self, *args, **kwargs): scene.visuals.Line.__init__(self, *args, **kwargs) self.unfreeze() # initialize point markers self.markers = scene.visuals.Markers(parent=self) self.marker_colors = np.ones((len(self.pos), 4), dtype=np.float32) self.markers.set_data(pos=self.pos, symbol="s", ...
def __init__(self, *args, **kwargs): scene.visuals.Line.__init__(self, *args, **kwargs) # initialize point markers self.markers = scene.visuals.Markers() self.marker_colors = np.ones((len(self.pos), 4), dtype=np.float32) self.markers.set_data(pos=self.pos, symbol="s", edge_color="red", size=6) ...
https://github.com/vispy/vispy/issues/1455
Traceback (most recent call last): File "/home/........../basics/visuals/line_draw.py", line 178, in <module> win = Canvas() File "/home/........../basics/visuals/line_draw.py", line 154, in __init__ self.pos = np.zeros((n, 3), dtype=np.float32) File "/home/........../lib/python3.6/site-packages/vispy/util/frozen.py", ...
AttributeError
def select_point(self, pos_scene, radius=5): """ Get line point close to mouse pointer and its index Parameters ---------- event : the mouse event being processed radius : scalar max. distance in pixels between mouse and line point to be accepted return: (numpy.array, int) p...
def select_point(self, event, radius=5): """ Get line point close to mouse pointer and its index Parameters ---------- event : the mouse event being processed radius : scalar max. distance in pixels between mouse and line point to be accepted return: (numpy.array, int) picke...
https://github.com/vispy/vispy/issues/1455
Traceback (most recent call last): File "/home/........../basics/visuals/line_draw.py", line 178, in <module> win = Canvas() File "/home/........../basics/visuals/line_draw.py", line 154, in __init__ self.pos = np.zeros((n, 3), dtype=np.float32) File "/home/........../lib/python3.6/site-packages/vispy/util/frozen.py", ...
AttributeError
def on_mouse_press(self, pos_scene): # self.print_mouse_event(event, 'Mouse press') # pos_scene = event.pos[:3] # find closest point to mouse and select it self.selected_point, self.selected_index = self.select_point(pos_scene) # if no point was clicked add a new one if self.selected_point is ...
def on_mouse_press(self, event): self.print_mouse_event(event, "Mouse press") pos_scene = event.pos[:3] # find closest point to mouse and select it self.selected_point, self.selected_index = self.select_point(event) # if no point was clicked add a new one if self.selected_point is None: ...
https://github.com/vispy/vispy/issues/1455
Traceback (most recent call last): File "/home/........../basics/visuals/line_draw.py", line 178, in <module> win = Canvas() File "/home/........../basics/visuals/line_draw.py", line 154, in __init__ self.pos = np.zeros((n, 3), dtype=np.float32) File "/home/........../lib/python3.6/site-packages/vispy/util/frozen.py", ...
AttributeError
def on_mouse_move(self, pos_scene): if self.selected_point is not None: # update selected point to new position given by mouse self.selected_point[0] = round(pos_scene[0] / self.gridsize) * self.gridsize self.selected_point[1] = round(pos_scene[1] / self.gridsize) * self.gridsize sel...
def on_mouse_move(self, event): # left mouse button if event.button == 1: # self.print_mouse_event(event, 'Mouse drag') if self.selected_point is not None: pos_scene = event.pos # update selected point to new position given by mouse self.selected_point[0] = ro...
https://github.com/vispy/vispy/issues/1455
Traceback (most recent call last): File "/home/........../basics/visuals/line_draw.py", line 178, in <module> win = Canvas() File "/home/........../basics/visuals/line_draw.py", line 154, in __init__ self.pos = np.zeros((n, 3), dtype=np.float32) File "/home/........../lib/python3.6/site-packages/vispy/util/frozen.py", ...
AttributeError
def __init__(self): scene.SceneCanvas.__init__(self, keys="interactive", size=(800, 800)) # Create some initial points n = 7 self.unfreeze() self.pos = np.zeros((n, 3), dtype=np.float32) self.pos[:, 0] = np.linspace(-50, 50, n) self.pos[:, 1] = np.random.normal(size=n, scale=10, loc=0) ...
def __init__(self): scene.SceneCanvas.__init__(self, keys="interactive", size=(800, 800)) # Create some initial points n = 7 self.pos = np.zeros((n, 3), dtype=np.float32) self.pos[:, 0] = np.linspace(-50, 50, n) self.pos[:, 1] = np.random.normal(size=n, scale=10, loc=0) # create new editab...
https://github.com/vispy/vispy/issues/1455
Traceback (most recent call last): File "/home/........../basics/visuals/line_draw.py", line 178, in <module> win = Canvas() File "/home/........../basics/visuals/line_draw.py", line 154, in __init__ self.pos = np.zeros((n, 3), dtype=np.float32) File "/home/........../lib/python3.6/site-packages/vispy/util/frozen.py", ...
AttributeError
def _use(self, backend_name=None): """Select a backend by name. See class docstring for details.""" # See if we're in a specific testing mode, if so DONT check to see # if it's a valid backend. If it isn't, it's a good thing we # get an error later because we should have decorated our test # with re...
def _use(self, backend_name=None): """Select a backend by name. See class docstring for details.""" # See if we're in a specific testing mode, if so DONT check to see # if it's a valid backend. If it isn't, it's a good thing we # get an error later because we should have decorated our test # with re...
https://github.com/vispy/vispy/issues/582
RuntimeError Traceback (most recent call last) <ipython-input-2-b622cb67980d> in <module>() ----> 1 c = app.Canvas(keys='interactive') /usr/local/lib/python2.7/dist-packages/vispy-0.3.0-py2.7.egg/vispy/app/canvas.pyc in __init__(self, title, size, position, show, autoswap, app, create_nati...
RuntimeError
def _set_keys(self, keys): if keys is not None: if isinstance(keys, string_types): if keys != "interactive": raise ValueError( 'keys, if string, must be "interactive", not %s' % (keys,) ) def toggle_fs(): self.fulls...
def _set_keys(self, keys): if keys is not None: if isinstance(keys, string_types): if keys != "interactive": raise ValueError( 'keys, if string, must be "interactive", not %s' % (keys,) ) def toggle_fs(): self.fulls...
https://github.com/vispy/vispy/issues/542
WARNING: Traceback (most recent call last): File ".\examples\demo\gloo\brain.py", line 156, in <module> app.run() File "D:\Git\vispy\vispy\app\_default_app.py", line 54, in run return default_app.run() File "D:\Git\vispy\vispy\app\application.py", line 88, in run return self._backend._vispy_run() File "D:\Git\vispy\vis...
AttributeError
def keys_check(event): if event.key is not None: use_name = event.key.name.lower() if use_name in self._keys_check: self._keys_check[use_name]()
def keys_check(event): use_name = event.key.name.lower() if use_name in self._keys_check: self._keys_check[use_name]()
https://github.com/vispy/vispy/issues/542
WARNING: Traceback (most recent call last): File ".\examples\demo\gloo\brain.py", line 156, in <module> app.run() File "D:\Git\vispy\vispy\app\_default_app.py", line 54, in run return default_app.run() File "D:\Git\vispy\vispy\app\application.py", line 88, in run return self._backend._vispy_run() File "D:\Git\vispy\vis...
AttributeError
def checkerboard(grid_num=8, grid_size=32): row_even = grid_num // 2 * [0, 1] row_odd = grid_num // 2 * [1, 0] Z = np.row_stack(grid_num // 2 * (row_even, row_odd)).astype(np.uint8) return 255 * Z.repeat(grid_size, axis=0).repeat(grid_size, axis=1)
def checkerboard(grid_num=8, grid_size=32): row_even = grid_num / 2 * [0, 1] row_odd = grid_num / 2 * [1, 0] Z = np.row_stack(grid_num / 2 * (row_even, row_odd)).astype(np.uint8) return 255 * Z.repeat(grid_size, axis=0).repeat(grid_size, axis=1)
https://github.com/vispy/vispy/issues/525
WARNING: normal has not been bound WARNING: color has not been bound WARNING: Traceback (most recent call last): File "textured_cube.py", line 102, in <module> c.show() File "/home/cyrille/git/vispy/vispy/app/canvas.py", line 320, in show return self._backend._vispy_set_visible(visible) File "/home/cyrille/git/vispy/vi...
TypeError
def _deactivate(self): if self._gtype in (gl.GL_SAMPLER_2D, GL_SAMPLER_3D): # gl.glActiveTexture(gl.GL_TEXTURE0 + self._unit) if self.data is not None: if isinstance(self._data, BaseTexture): self.data.deactivate()
def _deactivate(self): if self._gtype in (gl.GL_SAMPLER_2D, GL_SAMPLER_3D): # gl.glActiveTexture(gl.GL_TEXTURE0 + self._unit) if self.data is not None: self.data.deactivate()
https://github.com/vispy/vispy/issues/525
WARNING: normal has not been bound WARNING: color has not been bound WARNING: Traceback (most recent call last): File "textured_cube.py", line 102, in <module> c.show() File "/home/cyrille/git/vispy/vispy/app/canvas.py", line 320, in show return self._backend._vispy_set_visible(visible) File "/home/cyrille/git/vispy/vi...
TypeError
def on_draw(self, event): self.framebuffer.activate() set_viewport(0, 0, 512, 512) clear(color=True, depth=True) set_state(depth_test=True) self.cube.draw("triangles", self.indices) self.framebuffer.deactivate() set_viewport(0, 0, *self.size) clear(color=True) set_state(depth_test=Fa...
def on_draw(self, event): self.framebuffer.activate() set_viewport(0, 0, 512, 512) clear(color=True, depth=True) set_state(depth_test=True) self.cube.draw("triangles", self.indices) self.framebuffer.deactivate() clear(color=True) set_state(depth_test=False) self.quad.draw("triangle_s...
https://github.com/vispy/vispy/issues/528
cyrille@Cyrille-ASUS:~/git/vispy/examples/demo/gloo$ python realtime_signals.py ERROR: Could not set variable 'a_position' with value [-0.0093575 0.1638512 0.15590386 ..., 0.07139178 -0.14649338 0.06221156] Traceback (most recent call last): File "realtime_signals.py", line 162, in <module> c = Canvas() File "real...
IndexError
def __init__(self): app.Canvas.__init__(self, title="Use your wheel to zoom!", keys="interactive") self.program = gloo.Program(VERT_SHADER, FRAG_SHADER) self.program["a_position"] = y.reshape(-1, 1) self.program["a_color"] = color self.program["a_index"] = index self.program["u_scale"] = (1.0, 1...
def __init__(self): app.Canvas.__init__(self, title="Use your wheel to zoom!", keys="interactive") self.program = gloo.Program(VERT_SHADER, FRAG_SHADER) self.program["a_position"] = y.ravel() self.program["a_color"] = color self.program["a_index"] = index self.program["u_scale"] = (1.0, 1.0) ...
https://github.com/vispy/vispy/issues/528
cyrille@Cyrille-ASUS:~/git/vispy/examples/demo/gloo$ python realtime_signals.py ERROR: Could not set variable 'a_position' with value [-0.0093575 0.1638512 0.15590386 ..., 0.07139178 -0.14649338 0.06221156] Traceback (most recent call last): File "realtime_signals.py", line 162, in <module> c = Canvas() File "real...
IndexError
def __init__(self): app.Canvas.__init__(self, title="Spacy", keys="interactive") self.size = 800, 600 self.program = gloo.Program(vertex, fragment) self.view = np.eye(4, dtype=np.float32) self.model = np.eye(4, dtype=np.float32) self.projection = np.eye(4, dtype=np.float32) self.timer = ap...
def __init__(self): app.Canvas.__init__(self, title="Spacy", keys="interactive") self.size = 800, 600 self.program = gloo.Program(vertex, fragment) self.view = np.eye(4, dtype=np.float32) self.model = np.eye(4, dtype=np.float32) self.projection = np.eye(4, dtype=np.float32) self.timer = ap...
https://github.com/vispy/vispy/issues/528
cyrille@Cyrille-ASUS:~/git/vispy/examples/demo/gloo$ python realtime_signals.py ERROR: Could not set variable 'a_position' with value [-0.0093575 0.1638512 0.15590386 ..., 0.07139178 -0.14649338 0.06221156] Traceback (most recent call last): File "realtime_signals.py", line 162, in <module> c = Canvas() File "real...
IndexError
def _get_tick_frac_labels(self): """Get the major ticks, minor ticks, and major labels""" minor_num = 4 # number of minor ticks per major division if self.axis.scale_type == "linear": domain = self.axis.domain if domain[1] < domain[0]: flip = True domain = domain[::-...
def _get_tick_frac_labels(self): # This conditional is currently unnecessary since we only support # linear, but eventually we will support others so we leave it in if self.axis.scale_type == "linear": major_num = 11 # maximum number of major ticks minor_num = 4 # maximum number of minor t...
https://github.com/vispy/vispy/issues/7
Traceback (most recent call last): File "oscilloscope.py", line 138, in on_paint visual.draw(transform) File "oscilloscope.py", line 79, in draw self.program.uniforms['color'] = self.color File "../vispy/oogl/program_inputs.py", line 43, in __setitem__ self._set(k, v) File "../vispy/oogl/program_inputs.py", line 94, in...
IndexError
def __init__( self, nbins=10, steps=None, trim=True, integer=False, symmetric=False, prune=None ): """ Keyword args: *nbins* Maximum number of intervals; one less than max number of ticks. *steps* Sequence of nice numbers starting with 1 and ending with 10; e.g., [1, 2, 4, 5,...
def __init__(self, axis): self.axis = axis
https://github.com/vispy/vispy/issues/7
Traceback (most recent call last): File "oscilloscope.py", line 138, in on_paint visual.draw(transform) File "oscilloscope.py", line 79, in draw self.program.uniforms['color'] = self.color File "../vispy/oogl/program_inputs.py", line 43, in __setitem__ self._set(k, v) File "../vispy/oogl/program_inputs.py", line 94, in...
IndexError
def handle_import_data(self, data): """Import additional data for tuning Parameters ---------- data: a list of dictionarys, each of which has at least two keys, 'parameter' and 'value' Raises ------ AssertionError data doesn't have required key 'parameter' and 'value' "...
def handle_import_data(self, data): """Import additional data for tuning Parameters ---------- data: a list of dictionarys, each of which has at least two keys, 'parameter' and 'value' Raises ------ AssertionError data doesn't have required key 'parameter' and 'value' "...
https://github.com/microsoft/nni/issues/2140
[03/09/2020, 03:51:05 PM] INFO (nni.msg_dispatcher_base/MainThread) Start dispatcher [03/09/2020, 03:51:05 PM] INFO (nni.tuner/MainThread) Load checkpoint ignored by tuner, checkpoint path: /home/arvoelke/nni/experiments/NdfeH2R1/checkpoint [03/09/2020, 03:51:05 PM] INFO (nni.assessor/MainThread) Load checkpoint ignore...
TypeError
def import_data(self, data): """ Import additional data for tuning. Parameters ---------- data : list of dict Each of which has at least two keys, ``parameter`` and ``value``. """ _completed_num = 0 for trial_info in data: self.logger.info( "Importing data, c...
def import_data(self, data): """ Import additional data for tuning. Parameters ---------- data : list of dict Each of which has at least two keys, ``parameter`` and ``value``. """ _completed_num = 0 for trial_info in data: self.logger.info( "Importing data, c...
https://github.com/microsoft/nni/issues/2140
[03/09/2020, 03:51:05 PM] INFO (nni.msg_dispatcher_base/MainThread) Start dispatcher [03/09/2020, 03:51:05 PM] INFO (nni.tuner/MainThread) Load checkpoint ignored by tuner, checkpoint path: /home/arvoelke/nni/experiments/NdfeH2R1/checkpoint [03/09/2020, 03:51:05 PM] INFO (nni.assessor/MainThread) Load checkpoint ignore...
TypeError
def _pack_parameter( parameter_id, params, customized=False, trial_job_id=None, parameter_index=None ): _trial_params[parameter_id] = params ret = { "parameter_id": parameter_id, "parameter_source": "customized" if customized else "algorithm", "parameters": params, } if trial...
def _pack_parameter( parameter_id, params, customized=False, trial_job_id=None, parameter_index=None ): _trial_params[parameter_id] = params ret = { "parameter_id": parameter_id, "parameter_source": "customized" if customized else "algorithm", "parameters": params, } if trial...
https://github.com/microsoft/nni/issues/1589
Using TensorFlow backend. Traceback (most recent call last): File "test.py", line 164, in <module> train(ARGS, RECEIVED_PARAMS) File "test.py", line 136, in train validation_data=(x_test, y_test), callbacks=[SendMetrics(), TensorBoard(log_dir=TENSORBOARD_DIR)]) File "/home/msalz/venv_nni_dev/lib64/python3.6/site-packag...
ValueError
def request_next_parameter(): metric = to_json( { "trial_job_id": trial_env_vars.NNI_TRIAL_JOB_ID, "type": "REQUEST_PARAMETER", "sequence": 0, "parameter_index": _param_index, } ) send_metric(metric)
def request_next_parameter(): metric = json_tricks.dumps( { "trial_job_id": trial_env_vars.NNI_TRIAL_JOB_ID, "type": "REQUEST_PARAMETER", "sequence": 0, "parameter_index": _param_index, } ) send_metric(metric)
https://github.com/microsoft/nni/issues/1589
Using TensorFlow backend. Traceback (most recent call last): File "test.py", line 164, in <module> train(ARGS, RECEIVED_PARAMS) File "test.py", line 136, in train validation_data=(x_test, y_test), callbacks=[SendMetrics(), TensorBoard(log_dir=TENSORBOARD_DIR)]) File "/home/msalz/venv_nni_dev/lib64/python3.6/site-packag...
ValueError
def report_intermediate_result(metric): """ Reports intermediate result to NNI. Parameters ---------- metric: serializable object. """ global _intermediate_seq assert _params or trial_env_vars.NNI_PLATFORM is None, ( "nni.get_next_parameter() needs to be called before re...
def report_intermediate_result(metric): """ Reports intermediate result to NNI. Parameters ---------- metric: serializable object. """ global _intermediate_seq assert _params or trial_env_vars.NNI_PLATFORM is None, ( "nni.get_next_parameter() needs to be called before re...
https://github.com/microsoft/nni/issues/1589
Using TensorFlow backend. Traceback (most recent call last): File "test.py", line 164, in <module> train(ARGS, RECEIVED_PARAMS) File "test.py", line 136, in train validation_data=(x_test, y_test), callbacks=[SendMetrics(), TensorBoard(log_dir=TENSORBOARD_DIR)]) File "/home/msalz/venv_nni_dev/lib64/python3.6/site-packag...
ValueError
def report_final_result(metric): """ Reports final result to NNI. Parameters ---------- metric: serializable object. """ assert _params or trial_env_vars.NNI_PLATFORM is None, ( "nni.get_next_parameter() needs to be called before report_final_result" ) metric = to_js...
def report_final_result(metric): """ Reports final result to NNI. Parameters ---------- metric: serializable object. """ assert _params or trial_env_vars.NNI_PLATFORM is None, ( "nni.get_next_parameter() needs to be called before report_final_result" ) metric = json_...
https://github.com/microsoft/nni/issues/1589
Using TensorFlow backend. Traceback (most recent call last): File "test.py", line 164, in <module> train(ARGS, RECEIVED_PARAMS) File "test.py", line 136, in train validation_data=(x_test, y_test), callbacks=[SendMetrics(), TensorBoard(log_dir=TENSORBOARD_DIR)]) File "/home/msalz/venv_nni_dev/lib64/python3.6/site-packag...
ValueError
def parse_annotation_mutable_layers(code, lineno, nas_mode): """Parse the string of mutable layers in annotation. Return a list of AST Expr nodes code: annotation string (excluding '@') nas_mode: the mode of NAS """ module = ast.parse(code) assert type(module) is ast.Module, "internal error ...
def parse_annotation_mutable_layers(code, lineno, nas_mode): """Parse the string of mutable layers in annotation. Return a list of AST Expr nodes code: annotation string (excluding '@') nas_mode: the mode of NAS """ module = ast.parse(code) assert type(module) is ast.Module, "internal error ...
https://github.com/microsoft/nni/issues/1560
Traceback (most recent call last): File "/data/hdd3/yugzh/ENAS_NLP/venv/lib/python3.5/site-packages/nni_annotation/specific_code_generator.py", line 355, in parse transformer.visit(ast_tree) File "/data/hdd3/yugzh/ENAS_NLP/venv/lib/python3.5/site-packages/nni_annotation/specific_code_generator.py", line 278, in visit r...
AssertionError
def _visit_string(self, node): string = node.value.s if string.startswith("@nni."): self.annotated = True else: return node # not an annotation, ignore it if string.startswith("@nni.get_next_parameter"): deprecated_message = ( "'@nni.get_next_parameter' is deprecate...
def _visit_string(self, node): string = node.value.s if string.startswith("@nni."): self.annotated = True else: return node # not an annotation, ignore it if string.startswith("@nni.get_next_parameter"): deprecated_message = "'@nni.get_next_parameter' is deprecated in annotatio...
https://github.com/microsoft/nni/issues/1560
Traceback (most recent call last): File "/data/hdd3/yugzh/ENAS_NLP/venv/lib/python3.5/site-packages/nni_annotation/specific_code_generator.py", line 355, in parse transformer.visit(ast_tree) File "/data/hdd3/yugzh/ENAS_NLP/venv/lib/python3.5/site-packages/nni_annotation/specific_code_generator.py", line 278, in visit r...
AssertionError
def log_trial(args): """'get trial log path""" trial_id_path_dict = {} trial_id_list = [] nni_config = Config(get_config_filename(args)) rest_port = nni_config.get_config("restServerPort") rest_pid = nni_config.get_config("restServerPid") if not detect_process(rest_pid): print_error(...
def log_trial(args): """'get trial log path""" trial_id_path_dict = {} nni_config = Config(get_config_filename(args)) rest_port = nni_config.get_config("restServerPort") rest_pid = nni_config.get_config("restServerPid") if not detect_process(rest_pid): print_error("Experiment is not runn...
https://github.com/microsoft/nni/issues/1548
root# nnictl log trial Traceback (most recent call last): File "/root/.pyenv/versions/3.6.8/bin/nnictl", line 11, in <module> sys.exit(parse_args()) File "/root/.pyenv/versions/3.6.8/lib/python3.6/site-packages/nni_cmd/nnictl.py", line 217, in parse_args args.func(args) File "/root/.pyenv/versions/3.6.8/lib/python3.6/s...
KeyError
def send_email_sendgrid(sender, subject, message, recipients, image_png): import sendgrid as sendgrid_lib client = sendgrid_lib.SendGridAPIClient(sendgrid().apikey) to_send = sendgrid_lib.Mail( from_email=sender, to_emails=recipients, subject=subject ) if email().format == "html": ...
def send_email_sendgrid(sender, subject, message, recipients, image_png): import sendgrid as sendgrid_lib client = sendgrid_lib.SendGridClient( sendgrid().username, sendgrid().password, raise_errors=True ) to_send = sendgrid_lib.Mail() to_send.add_to(recipients) to_send.set_from(sender)...
https://github.com/spotify/luigi/issues/1956
Traceback (most recent call last): File "/home/ubuntu/.virtualenvs/janrain/local/lib/python2.7/site-packages/luigi/retcodes.py", line 74, in run_with_retcodes worker = luigi.interface._run(argv)['worker'] File "/home/ubuntu/.virtualenvs/janrain/local/lib/python2.7/site-packages/luigi/interface.py", line 237, in _run re...
AttributeError
def find_spec(self, name, path, target=None): # If jvm is not started then we just check against the TLDs if not _jpype.isStarted(): base = name.partition(".")[0] if not base in _JDOMAINS: return None raise ImportError("Attempt to create Java package '%s' without jvm" % name)...
def find_spec(self, name, path, target=None): # If jvm is not started then we just check against the TLDs if not _jpype.isStarted(): base = name.partition(".")[0] if not base in _JDOMAINS: return None raise ImportError("Attempt to create Java package '%s' without jvm" % name)...
https://github.com/jpype-project/jpype/issues/838
$ export CLASSPATH=lib/lucene-core-8.6.0.jar $ python Python 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. import jpype import jpype.imports print(jpype.getDefaultJVMPath()) /usr/lib/jvm/java-14-openjdk-amd64/lib/server/libjvm.so jpype...
AttributeError
def find_spec(self, name, path, target=None): # If jvm is not started then we just check against the TLDs if not _jpype.isStarted(): base = name.partition(".")[0] if not base in _JDOMAINS: return None raise ImportError("Attempt to create java modules without jvm") # Chec...
def find_spec(self, name, path, target=None): # If jvm is not started then we just check against the TLDs if not _jpype.isStarted(): base = name.partition(".")[0] if not base in _JDOMAINS: return None raise ImportError("Attempt to create java modules without jvm") # Chec...
https://github.com/jpype-project/jpype/issues/748
Traceback (most recent call last): File "/home/nelson85/env/python-ubuntu/lib/python3.6/site-packages/JPype1-0.7.6.dev0-py3.6-linux-x86_64.egg/jpype/imports.py", line 188, in find_spec cls = _java_lang_Class.forName(name) NameError: name '_java_lang_Class' is not defined The above exception was the direct cause of the...
NameError
def build( serviceName, version, http=None, discoveryServiceUrl=DISCOVERY_URI, developerKey=None, model=None, requestBuilder=HttpRequest, credentials=None, cache_discovery=True, cache=None, client_options=None, adc_cert_path=None, adc_key_path=None, num_retries=1,...
def build( serviceName, version, http=None, discoveryServiceUrl=DISCOVERY_URI, developerKey=None, model=None, requestBuilder=HttpRequest, credentials=None, cache_discovery=True, cache=None, client_options=None, adc_cert_path=None, adc_key_path=None, num_retries=1,...
https://github.com/googleapis/google-api-python-client/issues/971
from googleapiclient.discovery import build build("cloudresourcemanager", version=None) Traceback (most recent call last): ... googleapiclient.errors.HttpError: <HttpError 400 when requesting https://www.googleapis.com/discovery/v1/apis/cloudresourcemanager//rest returned "Request contains an invalid argument.">
googleapiclient.errors.HttpError
def print_table(response, title): """Prints out a response table. Each row contains key(s), clicks, impressions, CTR, and average position. Args: response: The server response to be printed as a table. title: The title of the table. """ print("\n --" + title + ":") if "rows" not i...
def print_table(response, title): """Prints out a response table. Each row contains key(s), clicks, impressions, CTR, and average position. Args: response: The server response to be printed as a table. title: The title of the table. """ print("\n --" + title + ":") if "rows" not i...
https://github.com/googleapis/google-api-python-client/issues/732
Traceback (most recent call last): File "search_analytics_api_sample.py", line 197, in <module> main(sys.argv) File "search_analytics_api_sample.py", line 71, in main print_table(response, 'Available dates') File "search_analytics_api_sample.py", line 194, in print_table print(row_format.format(keys, row['clicks'], row...
TypeError
def init( argv, name, version, doc, filename, scope=None, parents=[], discovery_filename=None ): """A common initialization routine for samples. Many of the sample applications do the same initialization, which has now been consolidated into this function. This function uses common idioms found in ...
def init( argv, name, version, doc, filename, scope=None, parents=[], discovery_filename=None ): """A common initialization routine for samples. Many of the sample applications do the same initialization, which has now been consolidated into this function. This function uses common idioms found in ...
https://github.com/googleapis/google-api-python-client/issues/524
Python 3.6.5 (default, Mar 31 2018, 13:05:03) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. from apiclient import discovery Traceback (most recent call last): File "/Users/eric/projects/google-api-python-client/googleapiclient...
ModuleNotFoundError
def encode_block(self, obj): """ Parameters ---------- obj : AtomGroup or Universe """ traj = obj.universe.trajectory ts = traj.ts try: molecule = ts.data["molecule"] except KeyError: raise_from( NotImplementedError("MOL2Writer cannot currently write non ...
def encode_block(self, obj): """ Parameters ---------- obj : AtomGroup or Universe """ traj = obj.universe.trajectory ts = traj.ts try: molecule = ts.data["molecule"] except KeyError: raise_from( NotImplementedError("MOL2Writer cannot currently write non ...
https://github.com/MDAnalysis/mdanalysis/issues/2678
import MDAnalysis as mda mda.__version__ '0.20.1' from MDAnalysis.tests.datafiles import mol2_molecules u = mda.Universe(mol2_molecules) u.atoms[:4].write('group1.mol2') # 👍 u.atoms[:4].write('group2.mol2') # 👎 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "MDAnalysis/core/groups.py"...
IndexError
def __init__( self, atomgroup, reference=None, select="all", groupselections=None, weights=None, weights_groupselections=False, tol_mass=0.1, ref_frame=0, **kwargs, ): r"""Parameters ---------- atomgroup : AtomGroup or Universe Group of atoms for which the RMS...
def __init__( self, atomgroup, reference=None, select="all", groupselections=None, weights=None, tol_mass=0.1, ref_frame=0, **kwargs, ): r"""Parameters ---------- atomgroup : AtomGroup or Universe Group of atoms for which the RMSD is calculated. If a trajectory is...
https://github.com/MDAnalysis/mdanalysis/issues/2429
import MDAnalysis as mda from MDAnalysis.tests.datafiles import PSF, DCD, CRD import MDAnalysis.analysis.rms as rms mda.__version__ '0.20.1' u = mda.Universe(PSF, DCD) # closed AdK (PDB ID: 1AKE) R = rms.RMSD(u, # universe to align ... u, # reference universe or atomgroup ... select='backbo...
ValueError
def _prepare(self): self._n_atoms = self.mobile_atoms.n_atoms if not self.weights_groupselections: if not iterable(self.weights): # apply 'mass' or 'None' to groupselections self.weights_groupselections = [self.weights] * len(self.groupselections) else: self.weights_grou...
def _prepare(self): self._n_atoms = self.mobile_atoms.n_atoms if not iterable(self.weights) and self.weights == "mass": self.weights = self.ref_atoms.masses if self.weights is not None: self.weights = np.asarray(self.weights, dtype=np.float64) / np.mean( self.weights ) ...
https://github.com/MDAnalysis/mdanalysis/issues/2429
import MDAnalysis as mda from MDAnalysis.tests.datafiles import PSF, DCD, CRD import MDAnalysis.analysis.rms as rms mda.__version__ '0.20.1' u = mda.Universe(PSF, DCD) # closed AdK (PDB ID: 1AKE) R = rms.RMSD(u, # universe to align ... u, # reference universe or atomgroup ... select='backbo...
ValueError
def _single_frame(self): mobile_com = self.mobile_atoms.center(self.weights_select).astype(np.float64) self._mobile_coordinates64[:] = self.mobile_atoms.positions self._mobile_coordinates64 -= mobile_com self.rmsd[self._frame_index, :2] = self._ts.frame, self._trajectory.time if self._groupselecti...
def _single_frame(self): mobile_com = self.mobile_atoms.center(self.weights).astype(np.float64) self._mobile_coordinates64[:] = self.mobile_atoms.positions self._mobile_coordinates64 -= mobile_com self.rmsd[self._frame_index, :2] = self._ts.frame, self._trajectory.time if self._groupselections_ato...
https://github.com/MDAnalysis/mdanalysis/issues/2429
import MDAnalysis as mda from MDAnalysis.tests.datafiles import PSF, DCD, CRD import MDAnalysis.analysis.rms as rms mda.__version__ '0.20.1' u = mda.Universe(PSF, DCD) # closed AdK (PDB ID: 1AKE) R = rms.RMSD(u, # universe to align ... u, # reference universe or atomgroup ... select='backbo...
ValueError
def _get_dh_pairs(self): """Finds donor-hydrogen pairs. Returns ------- donors, hydrogens: AtomGroup, AtomGroup AtomGroups corresponding to all donors and all hydrogens. AtomGroups are ordered such that, if zipped, will produce a list of donor-hydrogen pairs. """ # If donors_se...
def _get_dh_pairs(self): """Finds donor-hydrogen pairs. Returns ------- donors, hydrogens: AtomGroup, AtomGroup AtomGroups corresponding to all donors and all hydrogens. AtomGroups are ordered such that, if zipped, will produce a list of donor-hydrogen pairs. """ # If donors_se...
https://github.com/MDAnalysis/mdanalysis/issues/2396
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) ~/anaconda3/envs/py36/lib/python3.6/site-packages/MDAnalysis/core/universe.py in __getattr__(self, key) 509 try: --> 510 segment = self._instant_sel...
KeyError
def _single_frame(self): box = self._ts.dimensions # Update donor-hydrogen pairs if necessary if self.update_selections: self._donors, self._hydrogens = self._get_dh_pairs() # find D and A within cutoff distance of one another # min_cutoff = 1.0 as an atom cannot form a hydrogen bond with ...
def _single_frame(self): box = self._ts.dimensions # Update donor-hydrogen pairs if necessary if self.update_selections: self._donors, self._hydrogens = self._get_dh_pairs() # find D and A within cutoff distance of one another # min_cutoff = 1.0 as an atom cannot form a hydrogen bond with ...
https://github.com/MDAnalysis/mdanalysis/issues/2396
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) ~/anaconda3/envs/py36/lib/python3.6/site-packages/MDAnalysis/core/universe.py in __getattr__(self, key) 509 try: --> 510 segment = self._instant_sel...
KeyError
def __init__(self, universe, selection1, selection2, t0, tf, dtmax): self.universe = universe self.selection1 = selection1 self.selection2 = selection2 self.t0 = t0 self.tf = tf - 1 self.dtmax = dtmax self.timeseries = None
def __init__(self, universe, selection1, selection2, t0, tf, dtmax, nproc=1): self.universe = universe self.selection1 = selection1 self.selection2 = selection2 self.t0 = t0 self.tf = tf - 1 self.dtmax = dtmax self.nproc = nproc self.timeseries = None
https://github.com/MDAnalysis/mdanalysis/issues/2511
ts= 1 ts= 2 /biggin/b131/bioc1523/software/anaconda/python3.6/2019.7/envs/all/lib/python3.7/site-packages/MDAnalysis/analysis/base.py:116: DeprecationWarning: Setting the following kwargs should be done in the run() method: start, stop DeprecationWarning) /biggin/b131/bioc1523/software/anaconda/python3.6/2019.7/envs/al...
NameError
def run(self, **kwargs): """Analyze trajectory and produce timeseries""" h_list = MDAnalysis.analysis.hbonds.HydrogenBondAnalysis( self.universe, self.selection1, self.selection2, distance=3.5, angle=120.0 ) h_list.run(**kwargs) self.timeseries = self._getGraphics(h_list.timeseries, self.t0,...
def run(self, **kwargs): """Analyze trajectory and produce timeseries""" h_list = [] i = 0 if self.nproc > 1: while i < len(self.universe.trajectory): jobs = [] k = i for j in range(self.nproc): # start print("ts=", i + 1) ...
https://github.com/MDAnalysis/mdanalysis/issues/2511
ts= 1 ts= 2 /biggin/b131/bioc1523/software/anaconda/python3.6/2019.7/envs/all/lib/python3.7/site-packages/MDAnalysis/analysis/base.py:116: DeprecationWarning: Setting the following kwargs should be done in the run() method: start, stop DeprecationWarning) /biggin/b131/bioc1523/software/anaconda/python3.6/2019.7/envs/al...
NameError
def _determine_method( reference, configuration, max_cutoff, min_cutoff=None, box=None, method=None ): """Guesses the fastest method for capped distance calculations based on the size of the coordinate sets and the relative size of the target volume. Parameters ---------- reference : numpy.ndar...
def _determine_method( reference, configuration, max_cutoff, min_cutoff=None, box=None, method=None ): """Guesses the fastest method for capped distance calculations based on the size of the coordinate sets and the relative size of the target volume. Parameters ---------- reference : numpy.ndar...
https://github.com/MDAnalysis/mdanalysis/issues/2361
from MDAnalysis.tests.datafiles import * pdbqt = mda.Universe(PDBQT_input) pdb = mda.Universe(PDB) pdb.atoms.icodes array(['', '', '', ..., '', '', ''], dtype=object) pdbqt.atoms.icodes Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/lily/anaconda3/envs/mdanalysis/lib/python3.7/site-...
AttributeError
def parse(self, **kwargs): """Parse PSF file into Topology Returns ------- MDAnalysis *Topology* object """ # Open and check psf validity with openany(self.filename) as psffile: header = next(psffile) if not header.startswith("PSF"): err = "{0} is not valid PSF f...
def parse(self, **kwargs): """Parse PSF file into Topology Returns ------- MDAnalysis *Topology* object """ # Open and check psf validity with openany(self.filename) as psffile: header = next(psffile) if not header.startswith("PSF"): err = "{0} is not valid PSF f...
https://github.com/MDAnalysis/mdanalysis/issues/2232
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-6-90d681257701> in <module> ----> 1 u = mda.Universe(RNA_PSF) /Volumes/Data/oliver/Biop/Projects/Methods/MDAnalysis/mdanalysis/package/MDAnalysis/core/u...
AttributeError
def select_atoms(self, sel, *othersel, **selgroups): """Select :class:`Atoms<Atom>` using a selection string. Returns an :class:`AtomGroup` with :class:`Atoms<Atom>` sorted according to their index in the topology (this is to ensure that there are no duplicates, which can happen with complicated select...
def select_atoms(self, sel, *othersel, **selgroups): """Select :class:`Atoms<Atom>` using a selection string. Returns an :class:`AtomGroup` with :class:`Atoms<Atom>` sorted according to their index in the topology (this is to ensure that there are no duplicates, which can happen with complicated select...
https://github.com/MDAnalysis/mdanalysis/issues/1926
TypeError Traceback (most recent call last) <ipython-input-5-ec0d294eeb2a> in <module>() 1 u = mda.Universe(PDB) ----> 2 ref = u.copy() ~/anaconda3/lib/python3.6/site-packages/MDAnalysis/core/universe.py in copy(self) 337 def copy(self): 338 """Return an independent copy of ...
TypeError
def atoms(self): """An :class:`AtomGroup` of :class:`Atoms<Atom>` present in this :class:`ResidueGroup`. The :class:`Atoms<Atom>` are ordered locally by :class:`Residue` in the :class:`ResidueGroup`. Duplicates are *not* removed. """ # If indices is an empty list np.concatenate will fail (Issu...
def atoms(self): """An :class:`AtomGroup` of :class:`Atoms<Atom>` present in this :class:`ResidueGroup`. The :class:`Atoms<Atom>` are ordered locally by :class:`Residue` in the :class:`ResidueGroup`. Duplicates are *not* removed. """ ag = self.universe.atoms[np.concatenate(self.indices)] #...
https://github.com/MDAnalysis/mdanalysis/issues/1999
ValueError: need at least one array to concatenate Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2878, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-5-6c6c6b22c39a>", line 1, in <module> sel.select_atoms('resname S...
ValueError
def atoms(self): """An :class:`AtomGroup` of :class:`Atoms<Atom>` present in this :class:`SegmentGroup`. The :class:`Atoms<Atom>` are ordered locally by :class:`Residue`, which are further ordered by :class:`Segment` in the :class:`SegmentGroup`. Duplicates are *not* removed. """ # If indic...
def atoms(self): """An :class:`AtomGroup` of :class:`Atoms<Atom>` present in this :class:`SegmentGroup`. The :class:`Atoms<Atom>` are ordered locally by :class:`Residue`, which are further ordered by :class:`Segment` in the :class:`SegmentGroup`. Duplicates are *not* removed. """ ag = self....
https://github.com/MDAnalysis/mdanalysis/issues/1999
ValueError: need at least one array to concatenate Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2878, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-5-6c6c6b22c39a>", line 1, in <module> sel.select_atoms('resname S...
ValueError
def check_slice_indices(self, start, stop, step): """Check frame indices are valid and clip to fit trajectory. The usage follows standard Python conventions for :func:`range` but see the warning below. Parameters ---------- start : int or None Starting frame index (inclusive). ``None`` c...
def check_slice_indices(self, start, stop, step): """Check frame indices are valid and clip to fit trajectory. The usage follows standard Python conventions for :func:`range` but see the warning below. Parameters ---------- start : int or None Starting frame index (inclusive). ``None`` c...
https://github.com/MDAnalysis/mdanalysis/issues/1944
--------------------------------------------------------------------------- EOFError Traceback (most recent call last) <ipython-input-6-20f70c5f75bf> in <module>() 1 print(list(range(10)[10:0:-1])) ----> 2 print([ts.frame for ts in u.trajectory[10:0:-1]]) <ipython-input-6-20f70c5f75bf>...
EOFError
def _single_frame(self): index = self._frame_index mobile_com = self.mobile_atoms.center(self._weights) mobile_coordinates = self.mobile_atoms.positions - mobile_com mobile_atoms, self.rmsd[index] = _fit_to( mobile_coordinates, self._ref_coordinates, self.mobile, mobile_c...
def _single_frame(self): index = self._ts.frame mobile_com = self.mobile_atoms.center(self._weights) mobile_coordinates = self.mobile_atoms.positions - mobile_com mobile_atoms, self.rmsd[index] = _fit_to( mobile_coordinates, self._ref_coordinates, self.mobile, mobile_com,...
https://github.com/MDAnalysis/mdanalysis/issues/1714
--------------------------------------------------------------------------- IndexError Traceback (most recent call last) <ipython-input-5-95462d8a76b2> in <module>() ----> 1 align.AlignTraj(u, ref, select='all', step=5, filename='test.xtc').run() ~/anaconda3/lib/python3.6/site-packages/M...
IndexError
def __init__( self, atomgroup, reference=None, select="all", groupselections=None, filename="rmsd.dat", weights=None, tol_mass=0.1, ref_frame=0, **kwargs, ): r""" Parameters ---------- atomgroup : AtomGroup or Universe Group of atoms for which the RMSD is ...
def __init__( self, atomgroup, reference=None, select="all", groupselections=None, filename="rmsd.dat", weights=None, tol_mass=0.1, ref_frame=0, **kwargs, ): r""" Parameters ---------- atomgroup : AtomGroup or Universe Group of atoms for which the RMSD is ...
https://github.com/MDAnalysis/mdanalysis/issues/1487
R = MDAnalysis.analysis.rms.RMSD(atomgroup=u, reference=u, select='backbone', groupselections=['backbone and resid 1:10','backbone and resid 10:20']) R.run() --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-i...
ValueError
def get_weights(atoms, weights): """Check that a `weights` argument is compatible with `atoms`. Parameters ---------- atoms : AtomGroup or array_like The atoms that the `weights` should be applied to. Typically this is a :class:`AtomGroup` but because only the length is compared, ...
def get_weights(atoms, weights): """Check that a `weights` argument is compatible with `atoms`. Parameters ---------- atoms : AtomGroup or array_like The atoms that the `weights` should be applied to. Typically this is a :class:`AtomGroup` but because only the length is compared, ...
https://github.com/MDAnalysis/mdanalysis/issues/1487
R = MDAnalysis.analysis.rms.RMSD(atomgroup=u, reference=u, select='backbone', groupselections=['backbone and resid 1:10','backbone and resid 10:20']) R.run() --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-i...
ValueError
def _single_frame(self): mobile_com = self.mobile_atoms.center(self.weights).astype(np.float64) self._mobile_coordinates64[:] = self.mobile_atoms.positions self._mobile_coordinates64 -= mobile_com self.rmsd[self._frame_index, :2] = self._ts.frame, self._trajectory.time if self._groupselections_ato...
def _single_frame(self): mobile_com = self.mobile_atoms.center(self.weights).astype(np.float64) self._mobile_coordinates64[:] = self.mobile_atoms.positions self._mobile_coordinates64 -= mobile_com self.rmsd[self._frame_index, :2] = self._ts.frame, self._trajectory.time if self._groupselections_ato...
https://github.com/MDAnalysis/mdanalysis/issues/1487
R = MDAnalysis.analysis.rms.RMSD(atomgroup=u, reference=u, select='backbone', groupselections=['backbone and resid 1:10','backbone and resid 10:20']) R.run() --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-i...
ValueError
def __init__(self, trzfilename, n_atoms=None, **kwargs): """Creates a TRZ Reader Parameters ---------- trzfilename : str name of input file n_atoms : int number of atoms in trajectory, must be taken from topology file! convert_units : bool (optional) converts units to MD...
def __init__(self, trzfilename, n_atoms=None, **kwargs): """Creates a TRZ Reader Parameters ---------- trzfilename : str name of input file n_atoms : int number of atoms in trajectory, must be taken from topology file! convert_units : bool (optional) converts units to MD...
https://github.com/MDAnalysis/mdanalysis/issues/1424
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/case.py", line 381, in setUp try_run(self.inst, ('setup', 'setUp')) File "/usr/lib/python2.7/site-packages/nose/util.py", line 471, in try_run return func() File "/builddir/build/BUILD/MDAnalysis-0.16.1/MDAnalysisTests-0.16.1/MDAnalysisTests...
IOError
def _read_trz_header(self): """Reads the header of the trz trajectory""" self._headerdtype = np.dtype( [ ("p1", "<i4"), ("title", "80c"), ("p2", "<2i4"), ("force", "<i4"), ("p3", "<i4"), ] ) data = np.fromfile(self.trzfile, dtyp...
def _read_trz_header(self): """Reads the header of the trz trajectory""" self._headerdtype = np.dtype( [("p1", "i4"), ("title", "80c"), ("p2", "2i4"), ("force", "i4"), ("p3", "i4")] ) data = np.fromfile(self.trzfile, dtype=self._headerdtype, count=1) self.title = "".join(c.decode("utf-8") fo...
https://github.com/MDAnalysis/mdanalysis/issues/1424
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/case.py", line 381, in setUp try_run(self.inst, ('setup', 'setUp')) File "/usr/lib/python2.7/site-packages/nose/util.py", line 471, in try_run return func() File "/builddir/build/BUILD/MDAnalysis-0.16.1/MDAnalysisTests-0.16.1/MDAnalysisTests...
IOError
def __init__(self, filename, n_atoms, title="TRZ", convert_units=None): """Create a TRZWriter Parameters ---------- filename : str name of output file n_atoms : int number of atoms in trajectory title : str (optional) title of the trajectory; the title must be 80 charact...
def __init__(self, filename, n_atoms, title="TRZ", convert_units=None): """Create a TRZWriter Parameters ---------- filename : str name of output file n_atoms : int number of atoms in trajectory title : str (optional) title of the trajectory; the title must be 80 charact...
https://github.com/MDAnalysis/mdanalysis/issues/1424
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/case.py", line 381, in setUp try_run(self.inst, ('setup', 'setUp')) File "/usr/lib/python2.7/site-packages/nose/util.py", line 471, in try_run return func() File "/builddir/build/BUILD/MDAnalysis-0.16.1/MDAnalysisTests-0.16.1/MDAnalysisTests...
IOError
def _writeheader(self, title): hdt = np.dtype( [ ("pad1", "<i4"), ("title", "80c"), ("pad2", "<i4"), ("pad3", "<i4"), ("nrec", "<i4"), ("pad4", "<i4"), ] ) out = np.zeros((), dtype=hdt) out["pad1"], out["pad2"] = 80,...
def _writeheader(self, title): hdt = np.dtype( [ ("pad1", "i4"), ("title", "80c"), ("pad2", "i4"), ("pad3", "i4"), ("nrec", "i4"), ("pad4", "i4"), ] ) out = np.zeros((), dtype=hdt) out["pad1"], out["pad2"] = 80, 80 ...
https://github.com/MDAnalysis/mdanalysis/issues/1424
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/case.py", line 381, in setUp try_run(self.inst, ('setup', 'setUp')) File "/usr/lib/python2.7/site-packages/nose/util.py", line 471, in try_run return func() File "/builddir/build/BUILD/MDAnalysis-0.16.1/MDAnalysisTests-0.16.1/MDAnalysisTests...
IOError
def parse(self): """Parse atom information from PQR file *filename*. Returns ------- A MDAnalysis Topology object """ serials = [] names = [] resnames = [] chainIDs = [] resids = [] icodes = [] charges = [] radii = [] with openany(self.filename, "r") as f: ...
def parse(self): """Parse atom information from PQR file *filename*. Returns ------- A MDAnalysis Topology object """ serials = [] names = [] resnames = [] chainIDs = [] resids = [] charges = [] radii = [] with openany(self.filename, "r") as f: for line in f...
https://github.com/MDAnalysis/mdanalysis/issues/1317
ValueError Traceback (most recent call last) <ipython-input-92-bd129cc992c5> in <module>() ----> 1 mda.Universe('1A2C.pqr') /nfs/homes/kreidy/.local/lib/python2.7/site-packages/MDAnalysis/core/universe.pyc in __init__(self, *args, **kwargs) 246 raise ValueError("Faile...
ValueError
def __init__( self, traj, reference=None, select="all", groupselections=None, filename="rmsd.dat", mass_weighted=False, tol_mass=0.1, ref_frame=0, ): """Setting up the RMSD analysis. The RMSD will be computed between *select* and *reference* for all frames in the traject...
def __init__( self, traj, reference=None, select="all", groupselections=None, filename="rmsd.dat", mass_weighted=False, tol_mass=0.1, ref_frame=0, ): """Setting up the RMSD analysis. The RMSD will be computed between *select* and *reference* for all frames in the traject...
https://github.com/MDAnalysis/mdanalysis/issues/897
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-6-be62615c3dd7> in <module>() ----> 1 R = RMSD(u, select="protein and name CA") /nfs/homes2/oliver/Library/python/mdanalysis/package/MDAnalysis/analysis...
NameError
def _complete_for_arg( self, arg_action: argparse.Action, text: str, line: str, begidx: int, endidx: int, consumed_arg_values: Dict[str, List[str]], *, cmd_set: Optional[CommandSet] = None, ) -> List[str]: """ Tab completion routine for an argparse argument :return: list ...
def _complete_for_arg( self, arg_action: argparse.Action, text: str, line: str, begidx: int, endidx: int, consumed_arg_values: Dict[str, List[str]], *, cmd_set: Optional[CommandSet] = None, ) -> List[str]: """ Tab completion routine for an argparse argument :return: list ...
https://github.com/python-cmd2/cmd2/issues/967
Traceback (most recent call last): File "/home/martin/.virtualenvs/pyos/lib/python3.8/site-packages/cmd2/cmd2.py", line 1707, in complete self._completion_for_command(text, line, begidx, endidx, shortcut_to_restore) File "/home/martin/.virtualenvs/pyos/lib/python3.8/site-packages/cmd2/cmd2.py", line 1592, in _completio...
TypeError
def _initialize_history(self, hist_file): """Initialize history using history related attributes This function can determine whether history is saved in the prior text-based format (one line of input is stored as one line in the file), or the new-as- of-version 0.9.13 pickle based format. History ...
def _initialize_history(self, hist_file): """Initialize history using history related attributes This function can determine whether history is saved in the prior text-based format (one line of input is stored as one line in the file), or the new-as- of-version 0.9.13 pickle based format. History ...
https://github.com/python-cmd2/cmd2/issues/785
Traceback (most recent call last): File "C:\Users\mattthk4\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\Users\mattthk4\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\mattthk4\cven...
ValueError
def _get_pointer(self): try: if self.thisdir.files[self._pointer] != self._pointed_obj: try: self._pointer = self.thisdir.files.index(self._pointed_obj) except ValueError: self._set_pointer(self._pointer) except (TypeError, IndexError): pas...
def _get_pointer(self): if ( self.thisdir is not None and self.thisdir.files[self._pointer] != self._pointed_obj ): try: self._pointer = self.thisdir.files.index(self._pointed_obj) except ValueError: self._pointed_obj = self.thisdir.files[self._pointer] ...
https://github.com/ranger/ranger/issues/2136
$ ranger --clean (ai) ranger version: ranger-master Python version: 3.8.6 (default, Sep 30 2020, 04:00:38) [GCC 10.2.0] Locale: en_GB.UTF-8 Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/ranger/core/main.py", line 203, in main fm.loop(...
TypeError
def _set_pointer(self, value): self._pointer = value try: self._pointed_obj = self.thisdir.files[self._pointer] except (TypeError, IndexError): pass
def _set_pointer(self, value): self._pointer = value try: self._pointed_obj = self.thisdir.files[self._pointer] except TypeError: pass except IndexError: pass
https://github.com/ranger/ranger/issues/2136
$ ranger --clean (ai) ranger version: ranger-master Python version: 3.8.6 (default, Sep 30 2020, 04:00:38) [GCC 10.2.0] Locale: en_GB.UTF-8 Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/ranger/core/main.py", line 203, in main fm.loop(...
TypeError
def _set_pointer(self, value): self._pointer = value try: self._pointed_obj = self.thisdir.files[self._pointer] except (TypeError, IndexError): pass
def _set_pointer(self, value): self._pointer = value self._pointed_obj = self.thisdir.files[self._pointer]
https://github.com/ranger/ranger/issues/2071
Message Log: 21:48:19 INFO ranger version: ranger-master 21:48:19 INFO Python version: 3.8.5 (default, Jul 27 2020, 08:42:51) [GCC 10.1.0] 21:48:19 INFO Locale: en_US.UTF-8 21:48:19 INFO Process ID: 73182 21:48:25 ERRO Notification: 'NoneType' object is not subscriptable 21:48:25 ERRO 'NoneType' object is not subscript...
TypeError
def _set_pointer(self, value): self._pointer = value try: self._pointed_obj = self.thisdir.files[self._pointer] except TypeError: pass except IndexError: pass
def _set_pointer(self, value): self._pointer = value try: self._pointed_obj = self.thisdir.files[self._pointer] except TypeError: pass
https://github.com/ranger/ranger/issues/2173
ranger version: ranger-master Python version: 3.9.0 (default, Oct 7 2020, 23:09:01) [GCC 10.2.0] Locale: en_IN.UTF-8 Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/ranger/core/main.py", line 203, in main fm.loop() File "/usr/lib/python3.9/site-packages/ranger/core/fm.py", line 382, in loop ...
IndexError
def sha512_encode(path, inode=None): if inode is None: inode = stat(path).st_ino inode_path = "{0}{1}".format(str(inode), path) if PY3: inode_path = inode_path.encode("utf-8", "backslashreplace") return "{0}.jpg".format(sha512(inode_path).hexdigest())
def sha512_encode(path, inode=None): if inode is None: inode = stat(path).st_ino inode_path = "{0}{1}".format(str(inode), path) if PY3: inode_path = inode_path.encode("utf-8", "backslashescape") return "{0}.jpg".format(sha512(inode_path).hexdigest())
https://github.com/ranger/ranger/issues/2119
ranger version: ranger-master Python version: 3.8.5 (default, Sep 5 2020, 10:50:12) [GCC 10.2.0] Locale: de_DE.UTF-8 Current file: '/path/to/my/file/Arbeitszeitnachweis_f\udc81r Minijobber_2020_09.PDF' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/ranger/core/main.py", line 203, in main fm...
LookupError
def sha512_encode(path, inode=None): if inode is None: inode = stat(path).st_ino inode_path = "{0}{1}".format(str(inode), path) if PY3: inode_path = inode_path.encode("utf-8", "backslashescape") return "{0}.jpg".format(sha512(inode_path).hexdigest())
def sha512_encode(path, inode=None): if inode is None: inode = stat(path).st_ino sha = sha512("{0}{1}".format(path, str(inode)).encode("utf-8", "backslashescape")) return "{0}.jpg".format(sha.hexdigest())
https://github.com/ranger/ranger/issues/2054
Current file: '/tmp/example_f\xc2\xa1le.txt' Traceback (most recent call last): File "/home/panta/programs/ranger/ranger/core/main.py", line 203, in main fm.loop() File "/home/panta/programs/ranger/ranger/core/fm.py", line 376, in loop ui.redraw() File "/home/panta/programs/ranger/ranger/gui/ui.py", line 343, in redra...
UnicodeDecodeError
def enter_dir(self, path, history=True): """Enter given path""" # TODO: Ensure that there is always a self.thisdir if path is None: return None path = str(path) # clear filter in the folder we're leaving if self.fm.settings.clear_filters_on_dir_change and self.thisdir: self.this...
def enter_dir(self, path, history=True): """Enter given path""" # TODO: Ensure that there is always a self.thisdir if path is None: return None path = str(path) # clear filter in the folder we're leaving if self.fm.settings.clear_filters_on_dir_change and self.thisdir: self.this...
https://github.com/ranger/ranger/issues/1386
$ ranger/ranger.py ~/.config/neofetch/config.conf ranger version: ranger-master 1.9.2 Python version: 2.7.15+ (default, Oct 2 2018, 22:12:08) [GCC 8.2.0] Locale: None.None Traceback (most recent call last): File "/home/techtonik/p/ranger/ranger/core/main.py", line 195, in main fm.loop() File "/home/techtonik/p/ranger...
AttributeError
def __init__(self, env=None, fm=None): # pylint: disable=super-init-not-called self.keybuffer = KeyBuffer() self.keymaps = KeyMaps(self.keybuffer) self.redrawlock = threading.Event() self.redrawlock.set() self.titlebar = None self._viewmode = None self.taskview = None self.status = Non...
def __init__(self, env=None, fm=None): # pylint: disable=super-init-not-called self.keybuffer = KeyBuffer() self.keymaps = KeyMaps(self.keybuffer) self.redrawlock = threading.Event() self.redrawlock.set() self.titlebar = None self._viewmode = None self.taskview = None self.status = Non...
https://github.com/ranger/ranger/issues/1805
ranger version: ranger 1.9.3 Python version: 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.2.0] Locale: en_US.UTF-8 Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/ranger/core/main.py", line 171, in main fm.initialize() File "/home/pi/.local/lib/python3.7/site-packages/ranger/core/...
FileNotFoundError
def handle_multiplexer(self): if self.settings.update_tmux_title and not self._multiplexer_title: try: if _in_tmux(): # Stores the automatic-rename setting # prints out a warning if allow-rename isn't set in tmux try: tmux_allow...
def handle_multiplexer(self): if self.settings.update_tmux_title: if "TMUX" in os.environ: # Stores the automatic-rename setting # prints out a warning if the allow-rename in tmux is not set tmux_allow_rename = check_output( ["tmux", "show-window-options",...
https://github.com/ranger/ranger/issues/1805
ranger version: ranger 1.9.3 Python version: 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.2.0] Locale: en_US.UTF-8 Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/ranger/core/main.py", line 171, in main fm.initialize() File "/home/pi/.local/lib/python3.7/site-packages/ranger/core/...
FileNotFoundError
def restore_multiplexer_name(self): if self._multiplexer_title: try: if _in_tmux(): if self._tmux_automatic_rename: check_output( [ "tmux", "set-window-option", ...
def restore_multiplexer_name(self): try: if "TMUX" in os.environ: if self._tmux_automatic_rename: check_output( [ "tmux", "set-window-option", "automatic-rename", s...
https://github.com/ranger/ranger/issues/1805
ranger version: ranger 1.9.3 Python version: 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.2.0] Locale: en_US.UTF-8 Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/ranger/core/main.py", line 171, in main fm.initialize() File "/home/pi/.local/lib/python3.7/site-packages/ranger/core/...
FileNotFoundError
def main( # pylint: disable=too-many-locals,too-many-return-statements # pylint: disable=too-many-branches,too-many-statements ): """initialize objects and run the filemanager""" import ranger.api from ranger.container.settings import Settings from ranger.core.shared import FileManagerAware, Set...
def main( # pylint: disable=too-many-locals,too-many-return-statements # pylint: disable=too-many-branches,too-many-statements ): """initialize objects and run the filemanager""" import ranger.api from ranger.container.settings import Settings from ranger.core.shared import FileManagerAware, Set...
https://github.com/ranger/ranger/issues/1052
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory Traceback (most recent call last): File "/github/ranger/ranger.py", line 36, in <module>...
OSError
def data_status_root(self): statuses = set() # Paths with status lines = self._run(["status"]).split("\n") lines = list(filter(None, lines)) if not lines: return "sync" for line in lines: code = line[0] if code == " ": continue statuses.add(self._stat...
def data_status_root(self): statuses = set() # Paths with status lines = self._run(["status"]).split("\n") if not lines: return "sync" for line in lines: code = line[0] if code == " ": continue statuses.add(self._status_translate(code)) for status in...
https://github.com/ranger/ranger/issues/1296
Message Log: 11:12:54 INFO ranger version: ranger-master 1.9.1 11:12:54 INFO Python version: 3.6.5 (default, Aug 9 2018, 08:22:49) [GCC 5.5.0] 11:12:54 INFO Locale: en_GB.UTF-8 11:12:54 INFO Process ID: 27126 11:12:56 ERRO Notification: VCS Exception: View log for more info 11:12:56 ERRO string index out of range Trac...
IndexError
def data_status_subpaths(self): statuses = {} # Paths with status lines = self._run(["status"]).split("\n") lines = list(filter(None, lines)) for line in lines: code, path = line[0], line[8:] if code == " ": continue statuses[os.path.normpath(path)] = self._statu...
def data_status_subpaths(self): statuses = {} # Paths with status lines = self._run(["status"]).split("\n") for line in lines: code, path = line[0], line[8:] if code == " ": continue statuses[os.path.normpath(path)] = self._status_translate(code) return statuses...
https://github.com/ranger/ranger/issues/1296
Message Log: 11:12:54 INFO ranger version: ranger-master 1.9.1 11:12:54 INFO Python version: 3.6.5 (default, Aug 9 2018, 08:22:49) [GCC 5.5.0] 11:12:54 INFO Locale: en_GB.UTF-8 11:12:54 INFO Process ID: 27126 11:12:56 ERRO Notification: VCS Exception: View log for more info 11:12:56 ERRO string index out of range Trac...
IndexError
def main( # pylint: disable=too-many-locals,too-many-return-statements # pylint: disable=too-many-branches,too-many-statements ): """initialize objects and run the filemanager""" import ranger.api from ranger.container.settings import Settings from ranger.core.shared import FileManagerAware, Set...
def main( # pylint: disable=too-many-locals,too-many-return-statements # pylint: disable=too-many-branches,too-many-statements ): """initialize objects and run the filemanager""" import ranger.api from ranger.container.settings import Settings from ranger.core.shared import FileManagerAware, Set...
https://github.com/ranger/ranger/issues/1137
16:15:22 ERRO Notification: 'NoneType' object has no attribute 'unload' 16:15:22 ERRO 'NoneType' object has no attribute 'unload' Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/ranger/core/actions.py", line 251, in execute_console cmd.execute() File "/usr/lib/python3.6/site-packages/ranger/co...
AttributeError
def _get_best_study_config(self): metadata = { "best_trial_number": self.study.best_trial.number, "best_trial_evaluation": self.study.best_value, } pipeline_config = dict() for k, v in self.study.user_attrs.items(): if k.startswith("pykeen_"): metadata[k[len("pykeen_...
def _get_best_study_config(self): metadata = { "best_trial_number": self.study.best_trial.number, "best_trial_evaluation": self.study.best_value, } pipeline_config = dict() for k, v in self.study.user_attrs.items(): if k.startswith("pykeen_"): metadata[k[len("pykeen_...
https://github.com/pykeen/pykeen/issues/230
Traceback (most recent call last): File "hpo_run.py", line 80, in <module> run_hpo_search(args) File "hpo_run.py", line 62, in run_hpo_search hpo_pipeline_result.save_to_directory('study') File "/home/user/anaconda3/envs/pykeen/lib/python3.8/site-packages/pykeen/hpo/hpo.py", line 327, in save_to_directory json.dump(sel...
TypeError
def hpo_pipeline( *, # 1. Dataset dataset: Union[None, str, Dataset, Type[Dataset]] = None, dataset_kwargs: Optional[Mapping[str, Any]] = None, training: Union[None, str, TriplesFactory] = None, testing: Union[None, str, TriplesFactory] = None, validation: Union[None, str, TriplesFactory] = ...
def hpo_pipeline( *, # 1. Dataset dataset: Union[None, str, Dataset, Type[Dataset]] = None, dataset_kwargs: Optional[Mapping[str, Any]] = None, training: Union[None, str, TriplesFactory] = None, testing: Union[None, str, TriplesFactory] = None, validation: Union[None, str, TriplesFactory] = ...
https://github.com/pykeen/pykeen/issues/230
Traceback (most recent call last): File "hpo_run.py", line 80, in <module> run_hpo_search(args) File "hpo_run.py", line 62, in run_hpo_search hpo_pipeline_result.save_to_directory('study') File "/home/user/anaconda3/envs/pykeen/lib/python3.8/site-packages/pykeen/hpo/hpo.py", line 327, in save_to_directory json.dump(sel...
TypeError
def pipeline( # noqa: C901 *, # 1. Dataset dataset: Union[None, str, Dataset, Type[Dataset]] = None, dataset_kwargs: Optional[Mapping[str, Any]] = None, training: Union[None, TriplesFactory, str] = None, testing: Union[None, TriplesFactory, str] = None, validation: Union[None, TriplesFactor...
def pipeline( # noqa: C901 *, # 1. Dataset dataset: Union[None, str, Dataset, Type[Dataset]] = None, dataset_kwargs: Optional[Mapping[str, Any]] = None, training: Union[None, TriplesFactory, str] = None, testing: Union[None, TriplesFactory, str] = None, validation: Union[None, TriplesFactor...
https://github.com/pykeen/pykeen/issues/230
Traceback (most recent call last): File "hpo_run.py", line 80, in <module> run_hpo_search(args) File "hpo_run.py", line 62, in run_hpo_search hpo_pipeline_result.save_to_directory('study') File "/home/user/anaconda3/envs/pykeen/lib/python3.8/site-packages/pykeen/hpo/hpo.py", line 327, in save_to_directory json.dump(sel...
TypeError
def summary_str(self, title: Optional[str] = None, end="\n") -> str: """Make a summary string of all of the factories.""" rows = self._summary_rows() n_triples = sum(count for *_, count in rows) rows.append(("Total", "-", "-", n_triples)) t = tabulate(rows, headers=["Name", "Entities", "Relations", ...
def summary_str(self, end="\n") -> str: """Make a summary string of all of the factories.""" rows = self._summary_rows() n_triples = sum(count for *_, count in rows) rows.append(("Total", "-", "-", n_triples)) t = tabulate(rows, headers=["Name", "Entities", "Relations", "Triples"]) return f"{sel...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def summarize(self, title: Optional[str] = None, file=None) -> None: """Print a summary of the dataset.""" print(self.summary_str(title=title), file=file)
def summarize(self) -> None: """Print a summary of the dataset.""" print(self.summary_str())
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def _load(self) -> None: self._training = TriplesFactory.from_path( path=self.training_path, create_inverse_triples=self.create_inverse_triples, ) self._testing = TriplesFactory.from_path( path=self.testing_path, entity_to_id=self._training.entity_to_id, # share entity index...
def _load(self) -> None: self._training = TriplesFactory.from_path( path=self.training_path, create_inverse_triples=self.create_inverse_triples, ) self._testing = TriplesFactory.from_path( path=self.testing_path, entity_to_id=self._training.entity_to_id, # share entity index...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def _load_validation(self) -> None: # don't call this function by itself. assumes called through the `validation` # property and the _training factory has already been loaded self._validation = TriplesFactory.from_path( path=self.validation_path, entity_to_id=self._training.entity_to_id, # ...
def _load_validation(self) -> None: # don't call this function by itself. assumes called through the `validation` # property and the _training factory has already been loaded self._validation = TriplesFactory.from_path( path=self.validation_path, entity_to_id=self._training.entity_to_id, # ...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def generate_triples( num_entities: int = 33, num_relations: int = 7, num_triples: int = 101, compact: bool = True, random_state: TorchRandomHint = None, ) -> torch.LongTensor: """Generate random triples in a torch tensor.""" random_state = ensure_torch_random_state(random_state) rv = t...
def generate_triples( num_entities: int = 33, num_relations: int = 7, num_triples: int = 101, compact: bool = True, random_state: RandomHint = None, ) -> np.ndarray: """Generate random triples.""" random_state = ensure_random_state(random_state) rv = np.stack( [ rando...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def generate_labeled_triples( num_entities: int = 33, num_relations: int = 7, num_triples: int = 101, random_state: TorchRandomHint = None, ) -> np.ndarray: """Generate labeled random triples.""" mapped_triples = generate_triples( num_entities=num_entities, num_relations=num_rela...
def generate_labeled_triples( num_entities: int = 33, num_relations: int = 7, num_triples: int = 101, random_state: RandomHint = None, ) -> np.ndarray: """Generate labeled random triples.""" t = generate_triples( num_entities=num_entities, num_relations=num_relations, num...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def generate_triples_factory( num_entities: int = 33, num_relations: int = 7, num_triples: int = 101, random_state: TorchRandomHint = None, create_inverse_triples: bool = False, ) -> TriplesFactory: """Generate a triples factory with random triples.""" mapped_triples = generate_triples( ...
def generate_triples_factory( num_entities: int = 33, num_relations: int = 7, num_triples: int = 101, random_state: RandomHint = None, create_inverse_triples: bool = False, ) -> TriplesFactory: """Generate a triples factory with random triples.""" triples = generate_labeled_triples( ...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def __init__( self, triples_factory: TriplesFactory, minimum_frequency: Optional[float] = None, symmetric: bool = True, ): """Index the inverse frequencies and the inverse relations in the triples factory. :param triples_factory: The triples factory to index. :param minimum_frequency: The m...
def __init__( self, triples_factory: TriplesFactory, minimum_frequency: Optional[float] = None, symmetric: bool = True, use_tqdm: bool = True, use_multiprocessing: bool = False, ): """Index the inverse frequencies and the inverse relations in the triples factory. :param triples_factory:...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def apply(self, triples_factory: TriplesFactory) -> TriplesFactory: """Make a new triples factory containing neither duplicate nor inverse relationships.""" return triples_factory.new_with_restriction( relations=self.relations_to_delete, invert_relation_selection=True )
def apply(self, triples_factory: TriplesFactory) -> TriplesFactory: """Make a new triples factory containing neither duplicate nor inverse relationships.""" return triples_factory.new_without_relations(self.relations_to_delete)
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def unleak( train: TriplesFactory, *triples_factories: TriplesFactory, n: Union[None, int, float] = None, minimum_frequency: Optional[float] = None, ) -> Iterable[TriplesFactory]: """Unleak a train, test, and validate triples factory. :param train: The target triples factory :param triples_...
def unleak( train: TriplesFactory, *triples_factories: TriplesFactory, n: Union[None, int, float] = None, minimum_frequency: Optional[float] = None, ) -> Iterable[TriplesFactory]: """Unleak a train, test, and validate triples factory. :param train: The target triples factory :param triples_...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def reindex(*triples_factories: TriplesFactory) -> List[TriplesFactory]: """Reindex a set of triples factories.""" # get entities and relations occurring in triples all_triples = torch.cat( [factory.mapped_triples for factory in triples_factories], dim=0 ) # generate ID translation and new ...
def reindex(*triples_factories: TriplesFactory) -> List[TriplesFactory]: """Reindex a set of triples factories.""" triples = np.concatenate( [triples_factory.triples for triples_factory in triples_factories], axis=0, ) entity_to_id = create_entity_mapping(triples) relation_to_id = cr...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def _main(): """Test unleaking FB15K. Run with ``python -m pykeen.triples.leakage``. """ from pykeen.datasets import get_dataset logging.basicConfig(format="pykeen: %(message)s", level=logging.INFO) fb15k = get_dataset(dataset="fb15k") fb15k.summarize() n = 401 # magic 401 from the ...
def _main(): """Test unleaking FB15K. Run with ``python -m pykeen.triples.leakage``. """ from pykeen.datasets import get_dataset logging.basicConfig(format="pykeen: %(message)s", level=logging.INFO) print("Summary FB15K") fb15k = get_dataset(dataset="fb15k") summarize(fb15k.training, ...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def from_labeled_triples( cls, triples: LabeledTriples, create_inverse_triples: bool = False, entity_to_id: Optional[EntityMapping] = None, relation_to_id: Optional[RelationMapping] = None, compact_id: bool = True, filter_out_candidate_inverse_relations: bool = True, ) -> "TriplesFactory": ...
def from_labeled_triples( cls, triples: LabeledTriples, create_inverse_triples: bool = False, entity_to_id: Optional[EntityMapping] = None, relation_to_id: Optional[RelationMapping] = None, compact_id: bool = True, ) -> "TriplesFactory": """ Create a new triples factory from label-based ...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def num_relations(self) -> int: # noqa: D401 """The number of unique relations.""" if self.create_inverse_triples: return 2 * self.real_num_relations return self.real_num_relations
def num_relations(self) -> int: # noqa: D401 """The number of unique relations.""" return len(self.relation_to_id)
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def triples(self) -> np.ndarray: # noqa: D401 """The labeled triples, a 3-column matrix where each row are the head label, relation label, then tail label.""" logger.warning( "Reconstructing all label-based triples. This is expensive and rarely needed." ) return self.label_triples(self.mapped_t...
def triples(self) -> np.ndarray: # noqa: D401 """The labeled triples.""" # TODO: Deprecation warning. Will be replaced by re-constructing them from ID-based + mapping soon. return self._triples
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def get_inverse_relation_id(self, relation: Union[str, int]) -> int: """Get the inverse relation identifier for the given relation.""" if not self.create_inverse_triples: raise ValueError("Can not get inverse triple, they have not been created.") relation = next(iter(self.relations_to_ids(relations=...
def get_inverse_relation_id(self, relation: str) -> int: """Get the inverse relation identifier for the given relation.""" if not self.create_inverse_triples: raise ValueError("Can not get inverse triple, they have not been created.") inverse_relation = self.relation_to_inverse[relation] return ...
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError
def create_slcwa_instances(self) -> Instances: """Create sLCWA instances for this factory's triples.""" return SLCWAInstances( mapped_triples=self._add_inverse_triples_if_necessary( mapped_triples=self.mapped_triples ) )
def create_slcwa_instances(self) -> Instances: """Create sLCWA instances for this factory's triples.""" return SLCWAInstances(mapped_triples=self.mapped_triples)
https://github.com/pykeen/pykeen/issues/146
Traceback (most recent call last): File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 49, in <module> main() File "/Users/cthoyt/dev/pykeen/scratch/tst.py", line 36, in main testing.new_with_restriction(relations=evaluation_relation_whitelist) File "/Users/cthoyt/dev/pykeen/src/pykeen/triples/triples_factory.py", lin...
KeyError