Skip to content

Commit

Permalink
Lock deps
Browse files Browse the repository at this point in the history
  • Loading branch information
pablormier committed Nov 8, 2024
1 parent ba3cacf commit e4a109b
Show file tree
Hide file tree
Showing 13 changed files with 558 additions and 530 deletions.
2 changes: 1 addition & 1 deletion .asv/html/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"project": "corneto", "project_url": "http://saezlab.github.io/corneto", "show_commit_url": "http://github.com/saezlab/corneto/commit/", "hash_length": 8, "revision_to_hash": {"1": "54c466447c96490c192539a4db5b0f7a23196922", "3": "56da00d1d9e4bd1a9f6e7bab3f54ea9801ad6914", "11": "bbcdf4b854275eb80e4efcc2d5530b0a80cfe26b", "12": "c6b0797aa75f79c11e145bf15e9f5fcfd925cc23", "18": "3b0d4e5ce459ed5d2801f784393977987f035274", "25": "3146fe504dc3bb1d059b740904044e956ba2a18a", "28": "49839a604e8be3f7dc2ba74901ae9b8dc24a897d", "30": "a171596d4d671515c985973a1fadf3ebdbb0d013", "49": "6baeec3a41c11bd6821f0d84a365a56b26712f53", "61": "9b65bca341c94c453b003f2573e764c3a7b5bcb6", "68": "05e6da0edc5cd505f478f7ca580e74977734af9b", "69": "9283fbe8e7e9a149809fd078d9fbffe5179eb399", "70": "dbfce02d9677fbd2738710022ef4622a3db51350", "74": "816423f166089b8fe2931d15724301a06af4c945", "288": "f9f2baa76ff7d50e79d5c5f6914a8a0bc01594c2", "290": "260a6719fd2714792b094624d99391ec50935fda"}, "revision_to_date": {"1": 1660130961000, "3": 1660733176000, "11": 1661269385000, "12": 1661271467000, "18": 1661851384000, "25": 1663329924000, "28": 1664554303000, "30": 1674468452000, "49": 1676046121000, "61": 1680768995000, "68": 1689886315000, "69": 1689930727000, "70": 1695803487000, "74": 1699872477000, "288": 1726578506000, "290": 1726644816000}, "params": {"branch": ["main", "dev"]}, "graph_param_list": [], "benchmarks": {"benchmarks.MemSuite.mem_list": {"code": "class MemSuite:\n def mem_list(self):\n return [0] * 256", "name": "benchmarks.MemSuite.mem_list", "param_names": [], "params": [], "type": "memory", "unit": "bytes", "version": "abe86bab484550a681c61d7bb6eb081fbd37eb6d5009eba1df85c935530577b9"}, "benchmarks.TimeSuite.time_keys": {"code": "class TimeSuite:\n def time_keys(self):\n for key in self.d.keys():\n pass\n\n def setup(self):\n self.d = {}\n for x in range(500):\n self.d[x] = None", "min_run_count": 2, "name": "benchmarks.TimeSuite.time_keys", "number": 0, "param_names": [], "params": [], "repeat": 0, "rounds": 2, "sample_time": 0.01, "type": "time", "unit": "seconds", "version": "86e015a3c40c52da31e4185fff7c7176c38c5e1e1e4aba71912db0b388225191", "warmup_time": -1}, "benchmarks.TimeSuite.time_range": {"code": "class TimeSuite:\n def time_range(self):\n d = self.d\n for key in range(500):\n d[key]\n\n def setup(self):\n self.d = {}\n for x in range(500):\n self.d[x] = None", "min_run_count": 2, "name": "benchmarks.TimeSuite.time_range", "number": 0, "param_names": [], "params": [], "repeat": 0, "rounds": 2, "sample_time": 0.01, "type": "time", "unit": "seconds", "version": "72a6802b5ba2270cc4af88ddbd67e3c44fe4f4c8b292257438a394167fbb158b", "warmup_time": -1}, "benchmarks.TimeSuite.time_values": {"code": "class TimeSuite:\n def time_values(self):\n for value in self.d.values():\n pass\n\n def setup(self):\n self.d = {}\n for x in range(500):\n self.d[x] = None", "min_run_count": 2, "name": "benchmarks.TimeSuite.time_values", "number": 0, "param_names": [], "params": [], "repeat": 0, "rounds": 2, "sample_time": 0.01, "type": "time", "unit": "seconds", "version": "cace9f2d006aa364dcf5762823afba3680c2fb50179ee30beaf880c0697256e2", "warmup_time": -1}}, "machines": {"laptop": {"arch": "AMD64", "cpu": "11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz", "machine": "laptop", "num_cpu": "8", "os": "Windows 10", "ram": "16GB", "version": 1}}, "tags": {"0.9.0-alpha.0": 1, "0.9.0-alpha.1": 3, "0.9.0-alpha.2": 11, "0.9.0-alpha.3": 12, "0.9.0-alpha.4": 18, "0.9.0-alpha.5": 25, "0.9.0-alpha.6": 28, "0.9.0-alpha.7": 30, "0.9.1-alpha.0": 49, "0.9.1-alpha.1": 61, "0.9.1-alpha.2": 68, "0.9.1-alpha.3": 69, "0.9.1-alpha.4": 70, "0.9.1-alpha.5": 74, "1.0.0.dev0": 288, "1.0.0-alpha": 290}, "pages": [["", "Grid view", "Display as a agrid"], ["summarylist", "List view", "Display as a list"], ["regressions", "Show regressions", "Display information about recent regressions"]]}
{"project": "corneto", "project_url": "http://saezlab.github.io/corneto", "show_commit_url": "http://github.com/saezlab/corneto/commit/", "hash_length": 8, "revision_to_hash": {"1": "54c466447c96490c192539a4db5b0f7a23196922", "3": "56da00d1d9e4bd1a9f6e7bab3f54ea9801ad6914", "11": "bbcdf4b854275eb80e4efcc2d5530b0a80cfe26b", "12": "c6b0797aa75f79c11e145bf15e9f5fcfd925cc23", "18": "3b0d4e5ce459ed5d2801f784393977987f035274", "25": "3146fe504dc3bb1d059b740904044e956ba2a18a", "28": "49839a604e8be3f7dc2ba74901ae9b8dc24a897d", "30": "a171596d4d671515c985973a1fadf3ebdbb0d013", "49": "6baeec3a41c11bd6821f0d84a365a56b26712f53", "61": "9b65bca341c94c453b003f2573e764c3a7b5bcb6", "68": "05e6da0edc5cd505f478f7ca580e74977734af9b", "69": "9283fbe8e7e9a149809fd078d9fbffe5179eb399", "70": "dbfce02d9677fbd2738710022ef4622a3db51350", "74": "816423f166089b8fe2931d15724301a06af4c945", "288": "f9f2baa76ff7d50e79d5c5f6914a8a0bc01594c2", "290": "260a6719fd2714792b094624d99391ec50935fda"}, "revision_to_date": {"1": 1660130961000, "3": 1660733176000, "11": 1661269385000, "12": 1661271467000, "18": 1661851384000, "25": 1663329924000, "28": 1664554303000, "30": 1674468452000, "49": 1676046121000, "61": 1680768995000, "68": 1689886315000, "69": 1689930727000, "70": 1695803487000, "74": 1699872477000, "288": 1726578506000, "290": 1726644816000}, "params": {"branch": ["main", "dev"]}, "graph_param_list": [], "benchmarks": {"benchmarks.MemSuite.mem_list": {"code": "class MemSuite:\n def mem_list(self):\n return [0] * 256", "name": "benchmarks.MemSuite.mem_list", "param_names": [], "params": [], "type": "memory", "unit": "bytes", "version": "abe86bab484550a681c61d7bb6eb081fbd37eb6d5009eba1df85c935530577b9"}, "benchmarks.TimeSuite.time_keys": {"code": "class TimeSuite:\n def time_keys(self):\n for key in self.d.keys():\n pass\n\n def setup(self):\n self.d = {}\n for x in range(500):\n self.d[x] = None", "min_run_count": 2, "name": "benchmarks.TimeSuite.time_keys", "number": 0, "param_names": [], "params": [], "repeat": 0, "rounds": 2, "sample_time": 0.01, "type": "time", "unit": "seconds", "version": "86e015a3c40c52da31e4185fff7c7176c38c5e1e1e4aba71912db0b388225191", "warmup_time": -1}, "benchmarks.TimeSuite.time_range": {"code": "class TimeSuite:\n def time_range(self):\n d = self.d\n for key in range(500):\n d[key]\n\n def setup(self):\n self.d = {}\n for x in range(500):\n self.d[x] = None", "min_run_count": 2, "name": "benchmarks.TimeSuite.time_range", "number": 0, "param_names": [], "params": [], "repeat": 0, "rounds": 2, "sample_time": 0.01, "type": "time", "unit": "seconds", "version": "72a6802b5ba2270cc4af88ddbd67e3c44fe4f4c8b292257438a394167fbb158b", "warmup_time": -1}, "benchmarks.TimeSuite.time_values": {"code": "class TimeSuite:\n def time_values(self):\n for value in self.d.values():\n pass\n\n def setup(self):\n self.d = {}\n for x in range(500):\n self.d[x] = None", "min_run_count": 2, "name": "benchmarks.TimeSuite.time_values", "number": 0, "param_names": [], "params": [], "repeat": 0, "rounds": 2, "sample_time": 0.01, "type": "time", "unit": "seconds", "version": "cace9f2d006aa364dcf5762823afba3680c2fb50179ee30beaf880c0697256e2", "warmup_time": -1}}, "machines": {"laptop": {"arch": "AMD64", "cpu": "11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz", "machine": "laptop", "num_cpu": "8", "os": "Windows 10", "ram": "16GB", "version": 1}}, "tags": {"0.9.0-alpha.0": 1, "0.9.0-alpha.1": 3, "0.9.0-alpha.2": 11, "0.9.0-alpha.3": 12, "0.9.0-alpha.4": 18, "0.9.0-alpha.5": 25, "0.9.0-alpha.6": 28, "0.9.0-alpha.7": 30, "0.9.1-alpha.0": 49, "0.9.1-alpha.1": 61, "0.9.1-alpha.2": 68, "0.9.1-alpha.3": 69, "0.9.1-alpha.4": 70, "0.9.1-alpha.5": 74, "1.0.0.dev0": 288, "1.0.0-alpha": 290}, "pages": [["", "Grid view", "Display as a agrid"], ["summarylist", "List view", "Display as a list"], ["regressions", "Show regressions", "Display information about recent regressions"]]}
2 changes: 1 addition & 1 deletion .asv/html/info.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"asv-version": "0.6.4",
"timestamp": 1728862093918
}
}
2 changes: 1 addition & 1 deletion .asv/html/regressions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"regressions": []}
{"regressions": []}
2 changes: 1 addition & 1 deletion .asv/html/regressions.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version='1.0' encoding='utf-8'?>
<feed xmlns="http://www.w3.org/2005/Atom"><id>tag:corneto.asv,1970-01-01:/9786c7b0ede6801a54a78836c115d06c01b9fcad359ba9686c040c9be8721be8</id><author><name>Airspeed Velocity</name></author><title xml:lang="en">corneto performance regressions</title><updated>2024-10-13T23:28:13Z</updated></feed>
<feed xmlns="http://www.w3.org/2005/Atom"><id>tag:corneto.asv,1970-01-01:/9786c7b0ede6801a54a78836c115d06c01b9fcad359ba9686c040c9be8721be8</id><author><name>Airspeed Velocity</name></author><title xml:lang="en">corneto performance regressions</title><updated>2024-10-13T23:28:13Z</updated></feed>
2 changes: 1 addition & 1 deletion .asv/results/benchmarks.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@
"warmup_time": -1
},
"version": 2
}
}
2 changes: 1 addition & 1 deletion .asv/results/laptop/machine.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"os": "Windows 10",
"ram": "16GB",
"version": 1
}
}
6 changes: 2 additions & 4 deletions benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import random
from copy import deepcopy

from corneto._graph import Attributes, Graph
from corneto._graph import Graph


class TimeSuite:

def setup(self):
# Create a graph with at least 1000 edges
self.g = Graph()
Expand All @@ -30,7 +28,7 @@ def time_add_single_edge(self):

def time_add_edges(self):
self.g = Graph()
edges = [(i, i+1) for i in range(1000)]
edges = [(i, i + 1) for i in range(1000)]
self.g.add_edges(edges)

def time_bfs(self):
Expand Down
5 changes: 2 additions & 3 deletions corneto/backend/_base.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import abc
import numbers
import warnings
from copy import copy as shallow_copy
from numbers import Number
from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, Union
import warnings

import numpy as np

Expand Down Expand Up @@ -1403,8 +1403,7 @@ def __bool__(self) -> bool:
return False

def __getattr__(self, name):
"""
Intercept any attribute or method call that isn't already defined in the Backend class
"""Intercept any attribute or method call that isn't already defined in the Backend class
and raise a NotImplementedError.
"""
if hasattr(super(), name):
Expand Down
2 changes: 1 addition & 1 deletion corneto/methods/method.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def build(self, data: List[GraphData]):
output_vertices = d.attributes.get("outputs", set())
output_values = list(d.vertex_data.get(v, 0) for v in output_vertices)
vertex_indexes = [graph.V.index(key) for key in output_vertices]
#error = self.elementwise_error()
# error = self.elementwise_error()

# Getter for the graph
@property
Expand Down
7 changes: 4 additions & 3 deletions corneto/utils/_attr.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Attr(str, Enum):
TARGET_ATTR: Represents the key for a target attribute.
CUSTOM_ATTR: Represents the key for a custom attribute.
"""

VALUE = "__value"
EDGE_TYPE = "__edge_type"
SOURCE_ATTR = "__source_attr"
Expand All @@ -35,7 +36,7 @@ def __setattr__(self, __name: str, __value: Any) -> None:
Args:
__name (str): The name of the attribute to set.
__value (Any): The value to assign to the attribute. If the value is an instance
__value (Any): The value to assign to the attribute. If the value is an instance
of `Attr`, its value is used.
Raises:
Expand Down Expand Up @@ -69,7 +70,7 @@ def set_attr(self, key: Attr, value: Any) -> None:
Args:
key (Attr): The key for the attribute, represented as an `Attr` enum.
value (Any): The value to assign to the key. If the value is an enum,
value (Any): The value to assign to the key. If the value is an enum,
its value is used.
"""
v = value if not isinstance(value, Enum) else value.value
Expand All @@ -83,7 +84,7 @@ def has_attr(self, key: Attr, value: Optional[Any] = None) -> bool:
value (Optional[Any]): The optional value to check for.
Returns:
bool: `True` if the attribute exists and matches the value (if provided),
bool: `True` if the attribute exists and matches the value (if provided),
otherwise `False`.
"""
if value is None:
Expand Down
Loading

0 comments on commit e4a109b

Please sign in to comment.