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 _parse_args(self, *args, **kwargs): """ Parses an args list for data-header pairs. args can contain any mixture of the following entries: * tuples of data,header * data, header not in a tuple * filename, which will be read * directory, from which all files will be read * glob, from ...
def _parse_args(self, *args, **kwargs): """ Parses an args list for data-header pairs. args can contain any mixture of the following entries: * tuples of data,header * data, header not in a tuple * filename, which will be read * directory, from which all files will be read * glob, from ...
https://github.com/sunpy/sunpy/issues/1664
f = fits.open(files[0]) data = f[0].data[0] header = f[0].header m = sunpy.map.Map((data, header)) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-25-656e1b1b7829> in <module>() 2 data = f[0].data[0] ...
ValueError
def _parse_args(self, *args, **kwargs): """ Parses an args list for data-header pairs. args can contain any mixture of the following entries: * tuples of data,header * data, header not in a tuple * filename, which will be read * directory, from which all files will be read * glob, from ...
def _parse_args(self, *args, **kwargs): """ Parses an args list for data-header pairs. args can contain any mixture of the following entries: * tuples of data,header * data, header not in a tuple * filename, which will be read * directory, from which all files will be read * glob, from ...
https://github.com/sunpy/sunpy/issues/1664
f = fits.open(files[0]) data = f[0].data[0] header = f[0].header m = sunpy.map.Map((data, header)) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-25-656e1b1b7829> in <module>() 2 data = f[0].data[0] ...
ValueError
def from_file(cls, filename): filename = os.path.expanduser(filename) header, data = cls._parse_filepath(filename) if data.empty == True: raise ValueError("No data found!") else: return cls(data, header)
def from_file(cls, filename): filename = os.path.expanduser(filename) header, data = cls._parse_filepath(filename) return cls(data, header)
https://github.com/sunpy/sunpy/issues/471
In[15]  import sunpy In[16]  from sunpy.time import TimeRange In[17]  times = TimeRange('2010/03/04 00:10', '2010/03/04 00:20') In[18]  goes = sunpy.lightcurve.GOESLightCurve.create(times) In[19]  goes.peek() --------------------------------------------------------------------------- KeyError ...
KeyError
def _parse_csv(filepath): """Parses an GOES CSV""" with open(filepath, "rb") as fp: return "", read_csv(fp, sep=",", index_col=0, parse_dates=True)
def _parse_csv(filepath): """Parses an GOES CSV""" with open(filepath, "rb") as fp: # @todo: check for: # "No-Data-Found for the time period requested..." error return "", read_csv(fp, sep=",", index_col=0, parse_dates=True)
https://github.com/sunpy/sunpy/issues/471
In[15]  import sunpy In[16]  from sunpy.time import TimeRange In[17]  times = TimeRange('2010/03/04 00:10', '2010/03/04 00:20') In[18]  goes = sunpy.lightcurve.GOESLightCurve.create(times) In[19]  goes.peek() --------------------------------------------------------------------------- KeyError ...
KeyError
def to_angstrom(value, unit): """Given a value with a unit (given in a string), convert to angstroms""" value_quantity = value * units.Unit(unit) return value_quantity.to(units.angstrom, equivalencies=units.spectral()).value
def to_angstrom(value, unit): C = 299792458.0 ANGSTROM = units["Angstrom"][1] try: type_, n = units[unit] except KeyError: raise ValueError("Cannot convert %s to Angstrom" % unit) if type_ == "wavelength": x = n / ANGSTROM return value / x elif type_ == "frequenc...
https://github.com/sunpy/sunpy/issues/471
In[15]  import sunpy In[16]  from sunpy.time import TimeRange In[17]  times = TimeRange('2010/03/04 00:10', '2010/03/04 00:20') In[18]  goes = sunpy.lightcurve.GOESLightCurve.create(times) In[19]  goes.peek() --------------------------------------------------------------------------- KeyError ...
KeyError
def _call_metadata_identity_endpoint(self, request): """Request ID token from metadata identity endpoint. Args: request (google.auth.transport.Request): The object used to make HTTP requests. Returns: Tuple[str, datetime.datetime]: The ID token and the expiry of the ID token. ...
def _call_metadata_identity_endpoint(self, request): """Request ID token from metadata identity endpoint. Args: request (google.auth.transport.Request): The object used to make HTTP requests. Raises: google.auth.exceptions.RefreshError: If the Compute Engine metadata ...
https://github.com/googleapis/google-auth-library-python/issues/479
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.8/site-packages/google/auth/credentials.py", line 66, in expired skewed_expiry = self.expiry - _helpers.CLOCK_SKEW TypeError: unsupported operand type(s) for -: 'int' and 'datetime.timedelta'
TypeError
def __init__( self, source_credentials, target_principal, target_scopes, delegates=None, lifetime=_DEFAULT_TOKEN_LIFETIME_SECS, ): """ Args: source_credentials (google.auth.Credentials): The source credential used as to acquire the impersonated credentials. ta...
def __init__( self, source_credentials, target_principal, target_scopes, delegates=None, lifetime=_DEFAULT_TOKEN_LIFETIME_SECS, ): """ Args: source_credentials (google.auth.Credentials): The source credential used as to acquire the impersonated credentials. ta...
https://github.com/googleapis/google-auth-library-python/issues/416
Traceback (most recent call last): File "main.py", line 13, in <module> creds.refresh(Request()) File "/google/lib/python3.7/site-packages/google/auth/impersonated_credentials.py", line 218, in refresh self._update_token(request) File "/google/lib/python3.7/site-packages/google/auth/impersonated_credentials.py", line 2...
google.auth.exceptions.RefreshError
def _get_data_points( sdk_metric_record: MetricRecord, data_point_class: Type[DataPointT] ) -> List[DataPointT]: if isinstance(sdk_metric_record.aggregator, SumAggregator): value = sdk_metric_record.aggregator.checkpoint elif isinstance(sdk_metric_record.aggregator, MinMaxSumCountAggregator): ...
def _get_data_points( sdk_metric: MetricRecord, data_point_class: Type[DataPointT] ) -> List[DataPointT]: data_points = [] for ( label, bound_counter, ) in sdk_metric.instrument.bound_instruments.items(): string_key_values = [] for label_key, label_value in label: ...
https://github.com/open-telemetry/opentelemetry-python/issues/1236
Exception in thread Thread-1: Traceback (most recent call last): File "/home/ocelotl/.pyenv/versions/3.8.3/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/home/ocelotl/codeboten/opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py", line 48, in run self....
AttributeError
def _translate_data(self, data: Sequence[MetricRecord]) -> ExportMetricsServiceRequest: # pylint: disable=too-many-locals,no-member # pylint: disable=attribute-defined-outside-init sdk_resource_instrumentation_library_metrics = {} # The criteria to decide how to translate data is based on this table ...
def _translate_data(self, data: Sequence[MetricRecord]) -> ExportMetricsServiceRequest: # pylint: disable=too-many-locals,no-member # pylint: disable=attribute-defined-outside-init sdk_resource_instrumentation_library_metrics = {} # The criteria to decide how to translate data is based on this table ...
https://github.com/open-telemetry/opentelemetry-python/issues/1236
Exception in thread Thread-1: Traceback (most recent call last): File "/home/ocelotl/.pyenv/versions/3.8.3/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/home/ocelotl/codeboten/opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py", line 48, in run self....
AttributeError
def __init__(self, config=None): self._lock = threading.Lock() self.last_update_timestamp = 0 self.initial_checkpoint_timestamp = 0 self.checkpointed = True if config is not None: self.config = config else: self.config = {}
def __init__(self, config=None): self._lock = threading.Lock() self.last_update_timestamp = 0 self.last_checkpoint_timestamp = 0 if config is not None: self.config = config else: self.config = {}
https://github.com/open-telemetry/opentelemetry-python/issues/1236
Exception in thread Thread-1: Traceback (most recent call last): File "/home/ocelotl/.pyenv/versions/3.8.3/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/home/ocelotl/codeboten/opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py", line 48, in run self....
AttributeError
def update(self, value): """Updates the current with the new value.""" if self.checkpointed: self.initial_checkpoint_timestamp = time_ns() self.checkpointed = False self.last_update_timestamp = time_ns()
def update(self, value): """Updates the current with the new value.""" self.last_update_timestamp = time_ns()
https://github.com/open-telemetry/opentelemetry-python/issues/1236
Exception in thread Thread-1: Traceback (most recent call last): File "/home/ocelotl/.pyenv/versions/3.8.3/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/home/ocelotl/codeboten/opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py", line 48, in run self....
AttributeError
def take_checkpoint(self): """Stores a snapshot of the current value.""" self.checkpointed = True
def take_checkpoint(self): """Stores a snapshot of the current value.""" self.last_checkpoint_timestamp = time_ns()
https://github.com/open-telemetry/opentelemetry-python/issues/1236
Exception in thread Thread-1: Traceback (most recent call last): File "/home/ocelotl/.pyenv/versions/3.8.3/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/home/ocelotl/codeboten/opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py", line 48, in run self....
AttributeError
def merge(self, other): """Combines two aggregator values.""" self.last_update_timestamp = max( self.last_update_timestamp, other.last_update_timestamp ) self.initial_checkpoint_timestamp = max( self.initial_checkpoint_timestamp, other.initial_checkpoint_timestamp, )
def merge(self, other): """Combines two aggregator values.""" self.last_update_timestamp = max( self.last_update_timestamp, other.last_update_timestamp ) self.last_checkpoint_timestamp = max( self.last_checkpoint_timestamp, other.last_checkpoint_timestamp )
https://github.com/open-telemetry/opentelemetry-python/issues/1236
Exception in thread Thread-1: Traceback (most recent call last): File "/home/ocelotl/.pyenv/versions/3.8.3/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/home/ocelotl/codeboten/opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py", line 48, in run self....
AttributeError
def started(self, event: monitoring.CommandStartedEvent): """Method to handle a pymongo CommandStartedEvent""" if not self.is_enabled: return command = event.command.get(event.command_name, "") name = DATABASE_TYPE + "." + event.command_name statement = event.command_name if command: ...
def started(self, event: monitoring.CommandStartedEvent): """Method to handle a pymongo CommandStartedEvent""" if not self.is_enabled: return command = event.command.get(event.command_name, "") name = DATABASE_TYPE + "." + event.command_name statement = event.command_name if command: ...
https://github.com/open-telemetry/opentelemetry-python/issues/1012
Traceback (most recent call last): File "/Users/drubin/cargurus/analytics/snowblower/.venv/lib/python3.7/site-packages/pymongo/monitoring.py", line 1266, in publish_command_start subscriber.started(event) File "/Users/drubin/cargurus/analytics/snowblower/.venv/lib/python3.7/site-packages/opentelemetry/instrumentation/p...
TypeError
def _common_request( # pylint: disable=too-many-locals self, args_name, traced_args, operation_name, original_func, instance, args, kwargs, ): endpoint_name = getattr(instance, "host").split(".")[0] with self._tracer.start_as_current_span( "{}.command".format(endpoint_n...
def _common_request( # pylint: disable=too-many-locals self, args_name, traced_args, operation_name, original_func, instance, args, kwargs, ): endpoint_name = getattr(instance, "host").split(".")[0] with self._tracer.start_as_current_span( "{}.command".format(endpoint_n...
https://github.com/open-telemetry/opentelemetry-python/issues/817
Traceback (most recent call last): File "/opt/cadre/web/.venv/lib/python3.7/site-packages/opentelemetry/sdk/trace/export/__init__.py", line 80, in on_end self.span_exporter.export((span,)) File "/opt/cadre/web/.venv/lib/python3.7/site-packages/opentelemetry/ext/jaeger/__init__.py", line 156, in export jaeger_spans = _t...
AttributeError
def _patched_api_call(self, original_func, instance, args, kwargs): endpoint_name = deep_getattr(instance, "_endpoint._endpoint_prefix") with self._tracer.start_as_current_span( "{}.command".format(endpoint_name), kind=SpanKind.CONSUMER, ) as span: operation = None if args: ...
def _patched_api_call(self, original_func, instance, args, kwargs): endpoint_name = deep_getattr(instance, "_endpoint._endpoint_prefix") with self._tracer.start_as_current_span( "{}.command".format(endpoint_name), kind=SpanKind.CONSUMER, ) as span: operation = None if args: ...
https://github.com/open-telemetry/opentelemetry-python/issues/817
Traceback (most recent call last): File "/opt/cadre/web/.venv/lib/python3.7/site-packages/opentelemetry/sdk/trace/export/__init__.py", line 80, in on_end self.span_exporter.export((span,)) File "/opt/cadre/web/.venv/lib/python3.7/site-packages/opentelemetry/ext/jaeger/__init__.py", line 156, in export jaeger_spans = _t...
AttributeError
def __init__(self, thrift_url="", auth=None): self.thrift_url = thrift_url self.auth = auth self.http_transport = THttpClient.THttpClient(uri_or_host=self.thrift_url) self.protocol = TBinaryProtocol.TBinaryProtocol(self.http_transport) # set basic auth header if auth is not None: auth_h...
def __init__( self, thrift_url="", auth=None, client=jaeger.Client, http_transport=THttpClient.THttpClient, ): self.thrift_url = thrift_url self.auth = auth self.http_transport = http_transport(uri_or_host=thrift_url) self.client = client( iprot=TBinaryProtocol.TBinaryProtoco...
https://github.com/open-telemetry/opentelemetry-python/issues/493
Exception while exporting Span. Traceback (most recent call last): File "/home/tsutsumi/workspace/opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py", line 81, in on_end self.span_exporter.export((span,)) File "/home/tsutsumi/workspace/opentelemetry-python/ext/opentelemetry-ext-jaeger...
EOFError
def submit(self, batch: jaeger.Batch): """Submits batches to Thrift HTTP Server through Binary Protocol. Args: batch: Object to emit Jaeger spans. """ batch.write(self.protocol) self.http_transport.flush() code = self.http_transport.code msg = self.http_transport.message if code...
def submit(self, batch: jaeger.Batch): """Submits batches to Thrift HTTP Server through Binary Protocol. Args: batch: Object to emit Jaeger spans. """ try: self.client.submitBatches([batch]) # it will call http_transport.flush() and # status code and message will be upda...
https://github.com/open-telemetry/opentelemetry-python/issues/493
Exception while exporting Span. Traceback (most recent call last): File "/home/tsutsumi/workspace/opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py", line 81, in on_end self.span_exporter.export((span,)) File "/home/tsutsumi/workspace/opentelemetry-python/ext/opentelemetry-ext-jaeger...
EOFError
def get_or_create_warehouse(apps): Warehouse = apps.get_model("warehouse", "Warehouse") ShippingZone = apps.get_model("shipping", "ShippingZone") Site = apps.get_model("sites", "Site") warehouses = Warehouse.objects.annotate( zones_count=models.Count("shipping_zones") ).filter(zones_count=S...
def get_or_create_warehouse(apps): Warehouse = apps.get_model("warehouse", "Warehouse") ShippingZone = apps.get_model("shipping", "ShippingZone") Site = apps.get_model("sites", "Site") warehouses = Warehouse.objects.annotate( zones_count=models.Count("shipping_zones") ).filter(zones_count=S...
https://github.com/mirumee/saleor/issues/5607
Applying warehouse.0003_warehouse_slug...Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Users/timur/Code/pyenv/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line utility.execute() File "/Users/timu...
IndexError
def create_unique_slug_for_warehouses(apps, schema_editor): Warehouse = apps.get_model("warehouse", "Warehouse") warehouses = ( Warehouse.objects.filter(slug__isnull=True).order_by(Lower("name")).iterator() ) previous_char = None slug_values = [] for warehouse in warehouses: if ...
def create_unique_slug_for_warehouses(apps, schema_editor): Warehouse = apps.get_model("warehouse", "Warehouse") warehouses = ( Warehouse.objects.filter(slug__isnull=True).order_by(Lower("name")).iterator() ) previous_char = "" slug_values = [] for warehouse in warehouses: first...
https://github.com/mirumee/saleor/issues/5607
Applying warehouse.0003_warehouse_slug...Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Users/timur/Code/pyenv/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line utility.execute() File "/Users/timu...
IndexError
def generate_unique_slug(instance, slug_values): slug = slugify(instance.name) if instance.name else DEFAULT_SLUG_VALUE unique_slug = slug extension = 1 while unique_slug in slug_values: extension += 1 unique_slug = f"{slug}-{extension}" return unique_slug
def generate_unique_slug(instance, slug_values): slug = slugify(instance.name) unique_slug = slug extension = 1 while unique_slug in slug_values: extension += 1 unique_slug = f"{slug}-{extension}" return unique_slug
https://github.com/mirumee/saleor/issues/5607
Applying warehouse.0003_warehouse_slug...Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Users/timur/Code/pyenv/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line utility.execute() File "/Users/timu...
IndexError
def create_allocations(apps, schema_editor): Allocation = apps.get_model("warehouse", "Allocation") OrderLine = apps.get_model("order", "OrderLine") Warehouse = apps.get_model("warehouse", "Warehouse") for warehouse in Warehouse.objects.iterator(): shipping_zone = warehouse.shipping_zones.first(...
def create_allocations(apps, schema_editor): Allocation = apps.get_model("warehouse", "Allocation") OrderLine = apps.get_model("order", "OrderLine") Warehouse = apps.get_model("warehouse", "Warehouse") for warehouse in Warehouse.objects.iterator(): shipping_zone_pk = warehouse.shipping_zones.fir...
https://github.com/mirumee/saleor/issues/5607
Applying warehouse.0003_warehouse_slug...Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Users/timur/Code/pyenv/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line utility.execute() File "/Users/timu...
IndexError
def create_unique_slugs_for_producttypes(apps, schema_editor): ProductType = apps.get_model("product", "ProductType") product_types = ( ProductType.objects.filter(slug__isnull=True).order_by(Lower("name")).iterator() ) previous_char = "" slug_values = [] for product_type in product_type...
def create_unique_slugs_for_producttypes(apps, schema_editor): ProductType = apps.get_model("product", "ProductType") product_types = ( ProductType.objects.filter(slug__isnull=True).order_by(Lower("name")).iterator() ) previous_char = "" slug_values = [] for product_type in product_type...
https://github.com/mirumee/saleor/issues/5592
Applying product.0111_auto_20191209_0437... OK Applying product.0112_auto_20200129_0050...Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) psycopg2.errors.NotNullViolation: column "slug" contains nu...
django.db.utils.IntegrityError
def update_non_unique_slugs_for_models(apps, schema_editor): models_to_update = ["Category", "Collection"] for model in models_to_update: Model = apps.get_model("product", model) duplicated_slugs = ( Model.objects.all() .values("slug") .annotate(duplicated_s...
def update_non_unique_slugs_for_models(apps, schema_editor): models_to_update = ["Category", "Collection"] for model in models_to_update: Model = apps.get_model("product", model) duplicated_slugs = ( Model.objects.all() .values("slug") .annotate(duplicated_s...
https://github.com/mirumee/saleor/issues/5592
Applying product.0111_auto_20191209_0437... OK Applying product.0112_auto_20200129_0050...Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) psycopg2.errors.NotNullViolation: column "slug" contains nu...
django.db.utils.IntegrityError
def create_unique_slug_for_products(apps, schema_editor): Product = apps.get_model("product", "Product") products = ( Product.objects.filter(slug__isnull=True).order_by(Lower("name")).iterator() ) previous_char = "" slug_values = [] for product in products: first_char = product....
def create_unique_slug_for_products(apps, schema_editor): Product = apps.get_model("product", "Product") products = ( Product.objects.filter(slug__isnull=True).order_by(Lower("name")).iterator() ) previous_char = "" slug_values = [] for product in products: first_char = product....
https://github.com/mirumee/saleor/issues/5592
Applying product.0111_auto_20191209_0437... OK Applying product.0112_auto_20200129_0050...Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) psycopg2.errors.NotNullViolation: column "slug" contains nu...
django.db.utils.IntegrityError
def create_unique_slug_for_warehouses(apps, schema_editor): Warehouse = apps.get_model("warehouse", "Warehouse") warehouses = ( Warehouse.objects.filter(slug__isnull=True).order_by(Lower("name")).iterator() ) previous_char = "" slug_values = [] for warehouse in warehouses: first...
def create_unique_slug_for_warehouses(apps, schema_editor): Warehouse = apps.get_model("warehouse", "Warehouse") warehouses = ( Warehouse.objects.filter(slug__isnull=True).order_by(Lower("name")).iterator() ) previous_char = "" slug_values = [] for warehouse in warehouses: first...
https://github.com/mirumee/saleor/issues/5592
Applying product.0111_auto_20191209_0437... OK Applying product.0112_auto_20200129_0050...Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) psycopg2.errors.NotNullViolation: column "slug" contains nu...
django.db.utils.IntegrityError
def resolve_category(root: models.Product, info): category_id = root.category_id if category_id is None: return None return CategoryByIdLoader(info.context).load(category_id)
def resolve_category(root: models.Product, info): return CategoryByIdLoader(info.context).load(root.category_id)
https://github.com/mirumee/saleor/issues/5589
{ "errors": [ { "message": "The loader.load() function must be called with a value,but got: None.", "locations": [ { "line": 82, "column": 3 } ], "path": [ "productCreate", "product", "category" ], "extensions": { "exception": { "code": "TypeError", "stacktrace": [ "Traceback (most recent call last):", " File \"/Users...
TypeError
def add_users_to_groups_based_on_users_permissions(apps, schema_editor): """Add every user to group with "user_permissions" if exists, else create new one. For each user, if the group with the exact scope of permissions exists, add the user to it, else create a new group with this scope of permissions ...
def add_users_to_groups_based_on_users_permissions(apps, schema_editor): """Add every user to group with "user_permissions" if exists, else create new one. For each user, if the group with the exact scope of permissions exists, add the user to it, else create a new group with this scope of permissions ...
https://github.com/mirumee/saleor/issues/5555
Running migrations: Applying account.0041_permissions_to_groups...Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) psycopg2.errors.StringDataRightTruncation: value too long for type character varyin...
django.db.utils.DataError
def create_permissions_mapping(User): """Create mapping permissions to users and potential new group name.""" mapping = defaultdict(set) users = ( User.objects.filter(user_permissions__isnull=False) .distinct() .prefetch_related("user_permissions") ) for user in users: ...
def create_permissions_mapping(User, GroupData): """Create mapping permissions to users and potential new group name.""" mapping = {} users = User.objects.filter(user_permissions__isnull=False).prefetch_related( "user_permissions" ) for user in users: permissions = user.user_permissi...
https://github.com/mirumee/saleor/issues/5555
Running migrations: Applying account.0041_permissions_to_groups...Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) psycopg2.errors.StringDataRightTruncation: value too long for type character varyin...
django.db.utils.DataError
def create_group_with_given_permissions(perm_pks, counter, Group): """Create new group with given set of permissions.""" group_name = f"Group {counter:03d}" group = Group.objects.create(name=group_name) group.permissions.add(*perm_pks) return group
def create_group_with_given_permissions(perm_pks, group_name, Group): """Create new group with given set of permissions.""" group = Group.objects.create(name=group_name) group.permissions.add(*perm_pks) return group
https://github.com/mirumee/saleor/issues/5555
Running migrations: Applying account.0041_permissions_to_groups...Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) psycopg2.errors.StringDataRightTruncation: value too long for type character varyin...
django.db.utils.DataError
def order_created(self, order: "Order", previous_value: Any) -> Any: if not self.active: return previous_value data = get_order_tax_data(order, self.config, force_refresh=True) transaction_url = urljoin( get_api_url(self.config.use_sandbox), "transactions/createoradjust" ) api_post_...
def order_created(self, order: "Order", previous_value: Any) -> Any: if not self.active: return previous_value data = get_order_tax_data(order, self.config, force_refresh=True) transaction_url = urljoin( get_api_url(self.config.use_sandbox), "transactions/createoradjust" ) api_post_...
https://github.com/mirumee/saleor/issues/5490
web_1 | Traceback (most recent call last): web_1 | File "/usr/local/lib/python3.8/site-packages/promise/promise.py", line 489, in _resolve_from_executor web_1 | executor(resolve, reject) web_1 | File "/usr/local/lib/python3.8/site-packages/promise/promise.py", line 756, in execut...
TypeError
def api_post_request_task(transaction_url, data, config): config = AvataxConfiguration(**config) api_post_request(transaction_url, data, config)
def api_post_request_task(transaction_url, data, config): api_post_request(transaction_url, data, config)
https://github.com/mirumee/saleor/issues/5490
web_1 | Traceback (most recent call last): web_1 | File "/usr/local/lib/python3.8/site-packages/promise/promise.py", line 489, in _resolve_from_executor web_1 | executor(resolve, reject) web_1 | File "/usr/local/lib/python3.8/site-packages/promise/promise.py", line 756, in execut...
TypeError
def update_products_minimal_variant_prices_of_catalogues( product_ids=None, category_ids=None, collection_ids=None ): # Building the matching products query q_list = [] if product_ids: q_list.append(Q(pk__in=product_ids)) if category_ids: q_list.append(Q(category_id__in=category_ids)...
def update_products_minimal_variant_prices_of_catalogues( product_ids=None, category_ids=None, collection_ids=None ): # Building the matching products query q_list = [] if product_ids: q_list.append(Q(pk__in=product_ids)) if category_ids: q_list.append(Q(category_id__in=category_ids)...
https://github.com/mirumee/saleor/issues/5351
ERROR celery.app.trace Task saleor.product.tasks.update_products_minimal_variant_prices_of_discount_task[4ec46245-d1f1-47ae-ab23-0c0ab73a9981] raised unexpected: ValueError('Provide at least one of the ID lists:\n\tproduct_ids,\n\tcategory_ids,\n\tcollection_ids.') [PID:31316:Thread-175] Traceback (most recent call las...
ValueError
def validate_image_file(file, field_name): """Validate if the file is an image.""" if not file: raise ValidationError( {field_name: ValidationError("File is required", code="required")} ) if not file.content_type.startswith("image/"): raise ValidationError( {f...
def validate_image_file(file, field_name): """Validate if the file is an image.""" if not file.content_type.startswith("image/"): raise ValidationError( {field_name: ValidationError("Invalid file type", code="invalid")} )
https://github.com/mirumee/saleor/issues/5230
Traceback (most recent call last): File "./saleor/graphql/core/mutations.py", line 279, in mutate response = cls.perform_mutation(root, info, **data) File "./saleor/graphql/product/mutations/products.py", line 1400, in perform_mutation validate_image_file(image_data, "image") File "./saleor/graphql/core/utils/__init__....
AttributeError
def create_unique_slugs_for_producttypes(apps, schema_editor): ProductType = apps.get_model("product", "ProductType") product_types = ( ProductType.objects.filter(slug__isnull=True).order_by(Lower("name")).iterator() ) previous_char = "" slug_values = [] for product_type in product_type...
def create_unique_slugs_for_producttypes(apps, schema_editor): ProductType = apps.get_model("product", "ProductType") product_types = ( ProductType.objects.filter(slug__isnull=True).order_by(Lower("name")).iterator() ) previous_char = "" slug_values = [] for product_type in product_type...
https://github.com/mirumee/saleor/issues/5391
Operations to perform: Apply all migrations: account, auth, checkout, contenttypes, core, discount, django_prices_openexchangerates, django_prices_vatlayer, extensions, giftcard, menu, order, page, payment, product, shipping, site, sites, warehouse, webhook, wishlist Running migrations: Applying product.0112_auto_20200...
AttributeError
def create_permission_groups(): super_users = User.objects.filter(is_superuser=True) if not super_users: super_users = create_staff_users(1, True) group = create_group("Full Access", get_permissions(), super_users) yield f"Group: {group}" staff_users = create_staff_users() customer_supp...
def create_permission_groups(): super_users = User.objects.filter(is_superuser=True) if not super_users: super_users = create_staff_users(1, True) group = create_group("Full Access", Permission.objects.all(), super_users) yield f"Group: {group}" staff_users = create_staff_users() custom...
https://github.com/mirumee/saleor/issues/5340
{ "errors": [ { "message": "'account.add_address' is not a valid PermissionEnum", "locations": [ { "line": 34, "column": 3 } ], "path": [ "permissionGroup", "permissions" ], "extensions": { "exception": { "code": "ValueError", "stacktrace": [ "ValueError: 'account.add_address' is not a valid PermissionEnum", "", "Durin...
ValueError
def category_delete(request, pk): category = get_object_or_404(Category, pk=pk) if request.method == "POST": descendants = category.get_descendants() menus = get_menus_that_need_update(categories=descendants) category.delete() if menus: update_menus(menus) mes...
def category_delete(request, pk): category = get_object_or_404(Category, pk=pk) if request.method == "POST": descendants = category.get_descendants() menus = get_menus_that_needs_update(categories=descendants) category.delete() if menus: update_menus(menus) me...
https://github.com/mirumee/saleor/issues/4471
Traceback (most recent call last): File "/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py", line 487, in _resolve_from_executor executor(resolve, reject) File "/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py", line 754, in executor return resolve(...
ValueError
def collection_delete(request, pk=None): collection = get_object_or_404(Collection, pk=pk) if request.method == "POST": menus = get_menus_that_need_update(collection=collection) collection.delete() if menus: update_menus(menus) msg = pgettext_lazy("Collection message"...
def collection_delete(request, pk=None): collection = get_object_or_404(Collection, pk=pk) if request.method == "POST": menus = get_menus_that_needs_update(collection=collection) collection.delete() if menus: update_menus(menus) msg = pgettext_lazy("Collection message...
https://github.com/mirumee/saleor/issues/4471
Traceback (most recent call last): File "/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py", line 487, in _resolve_from_executor executor(resolve, reject) File "/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py", line 754, in executor return resolve(...
ValueError
def page_delete(request, pk): page = get_object_or_404(Page, pk=pk) if request.POST: menus = get_menus_that_need_update(page=page) page.delete() if menus: update_menus(menus) msg = pgettext_lazy("Dashboard message", "Removed page %s") % (page.title,) messages....
def page_delete(request, pk): page = get_object_or_404(Page, pk=pk) if request.POST: menus = get_menus_that_needs_update(page=page) page.delete() if menus: update_menus(menus) msg = pgettext_lazy("Dashboard message", "Removed page %s") % (page.title,) messages...
https://github.com/mirumee/saleor/issues/4471
Traceback (most recent call last): File "/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py", line 487, in _resolve_from_executor executor(resolve, reject) File "/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py", line 754, in executor return resolve(...
ValueError
def clean_input(cls, info, instance, data): cleaned_input = super().clean_input(info, instance, data) _validate_menu_item_instance(cleaned_input, "page", page_models.Page) _validate_menu_item_instance(cleaned_input, "collection", product_models.Collection) _validate_menu_item_instance(cleaned_input, "c...
def clean_input(cls, info, instance, data): cleaned_input = super().clean_input(info, instance, data) items = [ cleaned_input.get("page"), cleaned_input.get("collection"), cleaned_input.get("url"), cleaned_input.get("category"), ] items = [item for item in items if item i...
https://github.com/mirumee/saleor/issues/4471
Traceback (most recent call last): File "/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py", line 487, in _resolve_from_executor executor(resolve, reject) File "/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py", line 754, in executor return resolve(...
ValueError
def perform_mutation(cls, _root, info, menu, moves): _type, menu_id = from_global_id(menu) # type: str, int assert _type == "Menu", "Expected a menu of type Menu" operations = cls.clean_moves(info, menu_id, moves) for operation in operations: cls.perform_operation(operation) menu = model...
def perform_mutation(cls, _root, info, menu, moves): _type, menu_id = from_global_id(menu) # type: str, int assert _type == "Menu", "Expected a menu of type Menu" operations = cls.clean_moves(info, menu_id, moves) for operation in operations: cls.perform_operation(operation) return cls(m...
https://github.com/mirumee/saleor/issues/4471
Traceback (most recent call last): File "/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py", line 487, in _resolve_from_executor executor(resolve, reject) File "/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py", line 754, in executor return resolve(...
ValueError
def try_payment_action(self, action): amount = self.cleaned_data["amount"] try: action(amount.gross) except (PaymentError, ValueError) as e: self.payment_error(str(e)) return False return True
def try_payment_action(self, action): amount = self.cleaned_data["amount"] try: action(amount.gross) except (PaymentError, ValueError) as e: self.payment_error(e.message) return False return True
https://github.com/mirumee/saleor/issues/1667
Traceback (most recent call last): File "py3venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "py3venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, reque...
AttributeError
def done(self): arr = numpy.array(self.data, dtype=self.dtype) if self.shape: if len(arr.shape) != len(self.shape): try: arr = arr.reshape(self.shape) except ValueError: raise ValueError( "Reshape error. What is defined in data ...
def done(self): arr = numpy.array(self.data, dtype=self.dtype) if self.shape: if len(arr.shape) != len(self.shape): try: arr = arr.reshape(self.shape) except ValueError: raise ValueError( "Reshape error. What is defined in data ...
https://github.com/PaddlePaddle/Paddle/issues/15317
W0114 15:51:07.217496 116714 device_context.cc:262] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 9.0, Runtime API Version: 9.0 W0114 15:51:07.217563 116714 device_context.cc:270] device: 0, cuDNN Version: 7.0. W0114 15:51:07.217572 116714 device_context.cc:294] WARNING: device: 0. The installed Padd...
ValueError
def generate_proposal_labels( rpn_rois, gt_classes, is_crowd, gt_boxes, im_info, batch_size_per_im=256, fg_fraction=0.25, fg_thresh=0.25, bg_thresh_hi=0.5, bg_thresh_lo=0.0, bbox_reg_weights=[0.1, 0.1, 0.2, 0.2], class_nums=None, use_random=True, ): """ ** Gen...
def generate_proposal_labels( rpn_rois, gt_classes, is_crowd, gt_boxes, im_info, batch_size_per_im=256, fg_fraction=0.25, fg_thresh=0.25, bg_thresh_hi=0.5, bg_thresh_lo=0.0, bbox_reg_weights=[0.1, 0.1, 0.2, 0.2], class_nums=None, use_random=True, ): """ ** Gen...
https://github.com/PaddlePaddle/Paddle/issues/15317
W0114 15:51:07.217496 116714 device_context.cc:262] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 9.0, Runtime API Version: 9.0 W0114 15:51:07.217563 116714 device_context.cc:270] device: 0, cuDNN Version: 7.0. W0114 15:51:07.217572 116714 device_context.cc:294] WARNING: device: 0. The installed Padd...
ValueError
def sigmoid_cross_entropy_with_logits( x, label, ignore_index=kIgnoreIndex, name=None, normalize=False ): """ ${comment} Args: x(${x_type}): ${x_comment} label(${label_type}): ${label_comment} ignore_index(&{ignore_index}): ${ignore_index_comment} name(basestring|None): ...
def sigmoid_cross_entropy_with_logits(x, label, ignore_index=kIgnoreIndex, name=None): """ ${comment} Args: x(${x_type}): ${x_comment} label(${label_type}): ${label_comment} ignore_index(&{ignore_index}): ${ignore_index_comment} name(basestring|None): Name of the output. ...
https://github.com/PaddlePaddle/Paddle/issues/15317
W0114 15:51:07.217496 116714 device_context.cc:262] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 9.0, Runtime API Version: 9.0 W0114 15:51:07.217563 116714 device_context.cc:270] device: 0, cuDNN Version: 7.0. W0114 15:51:07.217572 116714 device_context.cc:294] WARNING: device: 0. The installed Padd...
ValueError
def get_trainer_program(self): # remove optimize ops and add a send op to main_program self.program.global_block().delete_ops(self.optimize_ops) # FIXME(typhoonzero): serialize once will fix error occurs when clone. self.program.__str__() return self.program
def get_trainer_program(self): # remove optimize ops and add a send op to main_program self.program.global_block().delete_ops(self.optimize_ops) return self.program
https://github.com/PaddlePaddle/Paddle/issues/9019
Traceback (most recent call last): File "dist_test.py", line 281, in <module> main(False, False, "conv", False) File "dist_test.py", line 237, in main params_filename=params_filename) File "dist_test.py", line 177, in train pserver_prog = t.get_pserver_program(current_endpoint) File "/paddle/build/python/build/lib-pyth...
KeyError
def get_pserver_program(self, endpoint): """ Get pserver side program using the endpoint. NOTE: assume blocks of the same variable is not distributed on the same pserver, only change param/grad varnames for trainers to fetch. """ # step1 pserver_program = Program() # step2 recv_i...
def get_pserver_program(self, endpoint): """ Get pserver side program using the endpoint. NOTE: assume blocks of the same variable is not distributed on the same pserver, only change param/grad varnames for trainers to fetch. """ # step1 pserver_program = Program() # step2 recv_i...
https://github.com/PaddlePaddle/Paddle/issues/9019
Traceback (most recent call last): File "dist_test.py", line 281, in <module> main(False, False, "conv", False) File "dist_test.py", line 237, in main params_filename=params_filename) File "dist_test.py", line 177, in train pserver_prog = t.get_pserver_program(current_endpoint) File "/paddle/build/python/build/lib-pyth...
KeyError
def _append_pserver_ops(self, optimize_block, opt_op, endpoint, origin_program): program = optimize_block.program pserver_block = program.global_block() new_inputs = dict() # update param/grad shape first, then other inputs like # moment can use the updated shape for key in opt_op.input_names: ...
def _append_pserver_ops(self, optimize_block, opt_op, endpoint): program = optimize_block.program pserver_block = program.global_block() new_inputs = dict() # update param/grad shape first, then other inputs like # moment can use the updated shape for key in opt_op.input_names: if key ==...
https://github.com/PaddlePaddle/Paddle/issues/9019
Traceback (most recent call last): File "dist_test.py", line 281, in <module> main(False, False, "conv", False) File "dist_test.py", line 237, in main params_filename=params_filename) File "dist_test.py", line 177, in train pserver_prog = t.get_pserver_program(current_endpoint) File "/paddle/build/python/build/lib-pyth...
KeyError
def begin_parse(): init_config_environment() for hook in _parse_config_hooks: hook() logger.findCaller = find_caller logger.fatal = my_fatal g_config.model_config.type = "nn" global g_current_submodel, g_root_submodel g_root_submodel = g_config.model_config.sub_models.add() g_...
def begin_parse(config_arg_str=""): """ @param config_arg_str: a string of the form var1=val1,var2=val2. It will be passed to config script as a dictionary CONFIG_ARGS """ init_config_environment() for hook in _parse_config_hooks: hook() logger.findCaller = find_caller logger.fa...
https://github.com/PaddlePaddle/Paddle/issues/2349
AttributeError Traceback (most recent call last) <ipython-input-5-5ce86945bbbe> in <module>() ----> 1 cost = seqToseq_net(source_dict_dim, target_dict_dim) /Users/liling.tan/seqtoseq.py in seqToseq_net(source_dict_dim, target_dict_dim, is_generating) 160 161 decoder_group_name = "decoder...
AttributeError
def parse_config(trainer_config, config_arg_str): """ @param config_arg_str: a string of the form var1=val1,var2=val2. It will be passed to config script as a dictionary CONFIG_ARGS """ begin_parse() config_args = {} if config_arg_str: config_args = dict([f.split("=") for f in conf...
def parse_config(trainer_config, config_arg_str): begin_parse(config_arg_str) config_args = {} if config_arg_str: config_args = dict([f.split("=") for f in config_arg_str.split(",")]) global g_command_config_args g_command_config_args.update(config_args) extension_module_name = confi...
https://github.com/PaddlePaddle/Paddle/issues/2349
AttributeError Traceback (most recent call last) <ipython-input-5-5ce86945bbbe> in <module>() ----> 1 cost = seqToseq_net(source_dict_dim, target_dict_dim) /Users/liling.tan/seqtoseq.py in seqToseq_net(source_dict_dim, target_dict_dim, is_generating) 160 161 decoder_group_name = "decoder...
AttributeError
def beam_search( step, input, bos_id, eos_id, beam_size, max_length=500, name=None, num_results_per_sample=None, ): """ Beam search is a heuristic search algorithm used in sequence generation. It explores a graph by expanding the most promising nodes in a limited set to m...
def beam_search( step, input, bos_id, eos_id, beam_size, max_length=500, name=None, num_results_per_sample=None, ): """ Beam search is a heuristic search algorithm used in sequence generation. It explores a graph by expanding the most promising nodes in a limited set to m...
https://github.com/PaddlePaddle/Paddle/issues/2349
AttributeError Traceback (most recent call last) <ipython-input-5-5ce86945bbbe> in <module>() ----> 1 cost = seqToseq_net(source_dict_dim, target_dict_dim) /Users/liling.tan/seqtoseq.py in seqToseq_net(source_dict_dim, target_dict_dim, is_generating) 160 161 decoder_group_name = "decoder...
AttributeError
def __need_to_keep__(name): return name in [ "StaticInput", "SubsequenceInput", "GeneratedInput", "LayerType", "layer_support", ]
def __need_to_keep__(name): if name in ["StaticInput", "LayerType", "layer_support"]: return False return True
https://github.com/PaddlePaddle/Paddle/issues/2349
AttributeError Traceback (most recent call last) <ipython-input-5-5ce86945bbbe> in <module>() ----> 1 cost = seqToseq_net(source_dict_dim, target_dict_dim) /Users/liling.tan/seqtoseq.py in seqToseq_net(source_dict_dim, target_dict_dim, is_generating) 160 161 decoder_group_name = "decoder...
AttributeError
def __convert_name__(inname): if __need_to_keep__(inname): return inname if inname == "maxid_layer": return "max_id" elif ( inname.endswith("memory") or inname.endswith("_seq") or inname.endswith("_sim") or inname == "hsigmoid" ): return inname ...
def __convert_name__(inname): if inname == "maxid_layer": return "max_id" elif ( inname.endswith("memory") or inname.endswith("_seq") or inname.endswith("_sim") or inname == "hsigmoid" ): return inname elif inname in [ "cross_entropy", "mul...
https://github.com/PaddlePaddle/Paddle/issues/2349
AttributeError Traceback (most recent call last) <ipython-input-5-5ce86945bbbe> in <module>() ----> 1 cost = seqToseq_net(source_dict_dim, target_dict_dim) /Users/liling.tan/seqtoseq.py in seqToseq_net(source_dict_dim, target_dict_dim, is_generating) 160 161 decoder_group_name = "decoder...
AttributeError
def __get_used_layers__(output_layers): layer_names = set() parents = {} def add_parent(child, parent): if child in parents: parents[child].append(parent) else: parents[child] = [parent] def add_additional_parents(): for sub_model in cp.g_config.model_co...
def __get_used_layers__(output_layers, extra_layers=None): layer_names = set() parents = {} def add_parent(child, parent): if child in parents: parents[child].append(parent) else: parents[child] = [parent] def add_additional_parents(): for sub_model in c...
https://github.com/PaddlePaddle/Paddle/issues/2349
AttributeError Traceback (most recent call last) <ipython-input-5-5ce86945bbbe> in <module>() ----> 1 cost = seqToseq_net(source_dict_dim, target_dict_dim) /Users/liling.tan/seqtoseq.py in seqToseq_net(source_dict_dim, target_dict_dim, is_generating) 160 161 decoder_group_name = "decoder...
AttributeError
def add_additional_parents(): for sub_model in cp.g_config.model_config.sub_models: if sub_model.name == "root": continue for link in sub_model.in_links: add_parent(link.link_name, link.layer_name) add_parent(sub_model.name, link.layer_name) for link in su...
def add_additional_parents(): for sub_model in cp.g_config.model_config.sub_models: if sub_model.name == "root": continue for link in sub_model.in_links: add_parent(link.link_name, link.layer_name) add_parent(sub_model.name, link.layer_name) for link in su...
https://github.com/PaddlePaddle/Paddle/issues/2349
AttributeError Traceback (most recent call last) <ipython-input-5-5ce86945bbbe> in <module>() ----> 1 cost = seqToseq_net(source_dict_dim, target_dict_dim) /Users/liling.tan/seqtoseq.py in seqToseq_net(source_dict_dim, target_dict_dim, is_generating) 160 161 decoder_group_name = "decoder...
AttributeError
def parse_network(output_layers, extra_layers=None): if not isinstance(output_layers, collections.Sequence): output_layers = [output_layers] if extra_layers is not None: if not isinstance(extra_layers, collections.Sequence): extra_layers = [extra_layers] else: extra_layer...
def parse_network(output_layers, extra_layers=None): if not isinstance(output_layers, collections.Sequence): output_layers = [output_layers] if extra_layers is not None and not isinstance(extra_layers, collections.Sequence): extra_layers = [extra_layers] else: extra_layers = [] ...
https://github.com/PaddlePaddle/Paddle/issues/2349
AttributeError Traceback (most recent call last) <ipython-input-5-5ce86945bbbe> in <module>() ----> 1 cost = seqToseq_net(source_dict_dim, target_dict_dim) /Users/liling.tan/seqtoseq.py in seqToseq_net(source_dict_dim, target_dict_dim, is_generating) 160 161 decoder_group_name = "decoder...
AttributeError
def __init__(self, layers, extra_layers=None): def __check__(layers): if not isinstance(layers, collections.Sequence): layers = [layers] for layer in layers: __check_layer_type__(layer) return layers layers = __check__(layers) self.layers = layers if extr...
def __init__(self, layers, extra_layers=None): def __check__(layers): if not isinstance(layers, collections.Sequence): __check_layer_type__(layers) layers = [layers] for layer in layers: __check_layer_type__(layer) return layers layers = __check__(lay...
https://github.com/PaddlePaddle/Paddle/issues/2349
AttributeError Traceback (most recent call last) <ipython-input-5-5ce86945bbbe> in <module>() ----> 1 cost = seqToseq_net(source_dict_dim, target_dict_dim) /Users/liling.tan/seqtoseq.py in seqToseq_net(source_dict_dim, target_dict_dim, is_generating) 160 161 decoder_group_name = "decoder...
AttributeError
def __check__(layers): if not isinstance(layers, collections.Sequence): layers = [layers] for layer in layers: __check_layer_type__(layer) return layers
def __check__(layers): if not isinstance(layers, collections.Sequence): __check_layer_type__(layers) layers = [layers] for layer in layers: __check_layer_type__(layer) return layers
https://github.com/PaddlePaddle/Paddle/issues/2349
AttributeError Traceback (most recent call last) <ipython-input-5-5ce86945bbbe> in <module>() ----> 1 cost = seqToseq_net(source_dict_dim, target_dict_dim) /Users/liling.tan/seqtoseq.py in seqToseq_net(source_dict_dim, target_dict_dim, is_generating) 160 161 decoder_group_name = "decoder...
AttributeError
def serialize(self, name, f): """ :param name: :param f: :type f: file :return: """ param = self.get(name) size = reduce(lambda a, b: a * b, param.shape) f.write(struct.pack("IIQ", 0, 4, size)) param = param.astype(np.float32) f.write(param.tostring())
def serialize(self, name, f): """ :param name: :param f: :type f: file :return: """ param = self.get(name) size = reduce(lambda a, b: a * b, param.shape) f.write(struct.pack("IIQ", 0, 4, size)) param = param.astype(np.float32) f.write(param.tobytes())
https://github.com/PaddlePaddle/Paddle/issues/2036
/paddle/build {develop} ctest -R test_v2_api -V UpdateCTestConfiguration from :/paddle/build/DartConfiguration.tcl UpdateCTestConfiguration from :/paddle/build/DartConfiguration.tcl Test project /paddle/build Constructing a list of tests Done constructing a list of tests Checking test dependency graph... Checking tes...
AttributeError
def array_back( param, nodes, vul_function=None, file_path=None, isback=None ): # 回溯数组定义赋值 """ 递归回溯数组赋值定义 :param isback: :param file_path: :param vul_function: :param param: :param nodes: :return: """ param_name = param.node.name param_expr = param.expr is_co = 3 ...
def array_back( param, nodes, vul_function=None, file_path=None, isback=None ): # 回溯数组定义赋值 """ 递归回溯数组赋值定义 :param isback: :param file_path: :param vul_function: :param param: :param nodes: :return: """ param_name = param.node.name param_expr = param.expr is_co = 3 ...
https://github.com/LoRexxar/Kunlun-M/issues/65
[DEBUG] [MainThread] [18:13:28] [engine.py:801] [RULE_MATCH] ['mysql_query', 'mysql_db_query'] [DEBUG] [MainThread] [18:13:28] [parser.py:1316] [AST] vul_function:mysql_query [DEBUG] [MainThread] [18:13:28] [parser.py:1123] [AST] AST to find param Variable('$c') [DEBUG] [MainThread] [18:13:28] [parser.py:598] [BT] para...
AttributeError
def serve( panels, port=0, address=None, websocket_origin=None, loop=None, show=True, start=True, title=None, verbose=True, location=True, threaded=False, **kwargs, ): """ Allows serving one or more panel objects on a single server. The panels argument should ...
def serve( panels, port=0, address=None, websocket_origin=None, loop=None, show=True, start=True, title=None, verbose=True, location=True, **kwargs, ): """ Allows serving one or more panel objects on a single server. The panels argument should be either a Panel ob...
https://github.com/holoviz/panel/issues/1447
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-15-da8b0df4fb70> in <module> ----> 1 color_mapper.update(high=100) ~/miniconda3/envs/PyX/lib/python3.7/site-packages/bokeh/core/has_props.py in update(s...
RuntimeError
def get_server( panel, port=0, address=None, websocket_origin=None, loop=None, show=False, start=False, title=None, verbose=False, location=True, static_dirs={}, oauth_provider=None, oauth_key=None, oauth_secret=None, oauth_extra_params={}, cookie_secret=N...
def get_server( panel, port=0, address=None, websocket_origin=None, loop=None, show=False, start=False, title=None, verbose=False, location=True, static_dirs={}, oauth_provider=None, oauth_key=None, oauth_secret=None, oauth_extra_params={}, cookie_secret=N...
https://github.com/holoviz/panel/issues/1447
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-15-da8b0df4fb70> in <module> ----> 1 color_mapper.update(high=100) ~/miniconda3/envs/PyX/lib/python3.7/site-packages/bokeh/core/has_props.py in update(s...
RuntimeError
def sync_busy(self, indicator): """ Syncs the busy state with an indicator with a boolean value parameter. Arguments --------- indicator: An BooleanIndicator to sync with the busy property """ if not isinstance(indicator.param.value, param.Boolean): raise ValueError("Busy indica...
def sync_busy(self, indicator): """ Syncs the busy state with an indicator with a boolean value parameter. """ self._indicators.append(indicator)
https://github.com/holoviz/panel/issues/1447
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-15-da8b0df4fb70> in <module> ----> 1 color_mapper.update(high=100) ~/miniconda3/envs/PyX/lib/python3.7/site-packages/bokeh/core/has_props.py in update(s...
RuntimeError
def add_periodic_callback( self, callback, period=500, count=None, timeout=None, start=True ): """ Schedules a periodic callback to be run at an interval set by the period. Returns a PeriodicCallback object with the option to stop and start the callback. Arguments --------- callback: ca...
def add_periodic_callback( self, callback, period=500, count=None, timeout=None, start=True ): """ Schedules a periodic callback to be run at an interval set by the period. Returns a PeriodicCallback object with the option to stop and start the callback. Arguments --------- callback: ca...
https://github.com/holoviz/panel/issues/1447
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-15-da8b0df4fb70> in <module> ----> 1 color_mapper.update(high=100) ~/miniconda3/envs/PyX/lib/python3.7/site-packages/bokeh/core/has_props.py in update(s...
RuntimeError
def show( self, title=None, port=0, address=None, websocket_origin=None, threaded=False, verbose=True, open=True, location=True, **kwargs, ): """ Starts a Bokeh server and displays the Viewable in a new tab. Arguments --------- title : str A string titl...
def show( self, title=None, port=0, address=None, websocket_origin=None, threaded=False, verbose=True, open=True, location=True, **kwargs, ): """ Starts a Bokeh server and displays the Viewable in a new tab. Arguments --------- title : str A string titl...
https://github.com/holoviz/panel/issues/1447
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-15-da8b0df4fb70> in <module> ----> 1 color_mapper.update(high=100) ~/miniconda3/envs/PyX/lib/python3.7/site-packages/bokeh/core/has_props.py in update(s...
RuntimeError
def get_server( panel, port=0, websocket_origin=None, loop=None, show=False, start=False, title=None, verbose=False, location=True, static_dirs={}, **kwargs, ): """ Returns a Server instance with this panel attached as the root app. Arguments --------- ...
def get_server( panel, port=0, websocket_origin=None, loop=None, show=False, start=False, title=None, verbose=False, location=True, static_dirs={}, **kwargs, ): """ Returns a Server instance with this panel attached as the root app. Arguments --------- ...
https://github.com/holoviz/panel/issues/1405
$ docker run -it --entrypoint=//bin/bash --rm python:3.7.7-stretch root@4074b09e57fc:/# pip install panel ipython Collecting panel Downloading panel-0.9.5-py2.py3-none-any.whl (1.3 MB) |████████████████████████████████| 1.3 MB 762 kB/s Collecting ipython Downloading ipython-7.15.0-py3-none-any.whl (783 kB) |███████████...
KeyError
def jslink(self, target, code=None, args=None, bidirectional=False, **links): """ Links properties on the source object to those on the target object in JS code. Supports two modes, either specify a mapping between the source and target model properties as keywords or provide a dictionary of JS code...
def jslink(self, target, code=None, args=None, bidirectional=False, **links): """ Links properties on the source object to those on the target object in JS code. Supports two modes, either specify a mapping between the source and target model properties as keywords or provide a dictionary of JS code...
https://github.com/holoviz/panel/issues/1346
ValueError Traceback (most recent call last) <ipython-input-27-627e90bb010e> in <module> 16 ''' 17 #pp.jslink(m, code={'x_range.start': jsupdateinfo}) ---> 18 pp.jslink(s, **{'x_range.start': 'value'}) 19 20 # params -> plot ~/anaconda3/envs/panel/lib/python3.8/site-packages/panel/viewab...
ValueError
def __init__(self, root_model, link, source, target=None, arg_overrides={}): self.root_model = root_model self.link = link self.source = source self.target = target self.arg_overrides = arg_overrides self.validate() specs = self._get_specs(link, source, target) for src_spec, tgt_spec, co...
def __init__(self, root_model, link, source, target=None, arg_overrides={}): self.root_model = root_model self.link = link self.source = source self.target = target self.arg_overrides = arg_overrides self.validate() specs = self._get_specs(link, source, target) for src_spec, tgt_spec, co...
https://github.com/holoviz/panel/issues/1084
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) ~/PythonWorkspace/py37/lib/python3.7/site-packages/IPython/core/formatters.py in __call__(self, obj, include, exclude) 968 969 if method is not None: --> 97...
KeyError
def init(self): """ Registers the Callback """ if self.source in self.registry: links = self.registry[self.source] params = {k: v for k, v in self.get_param_values() if k != "name"} for link in links: link_params = {k: v for k, v in link.get_param_values() if k != "na...
def init(self): """ Registers the Callback """ if self.source in self.registry: links = self.registry[self.source] params = {k: v for k, v in self.get_param_values() if k != "name"} for link in links: link_params = {k: v for k, v in link.get_param_values() if k != "na...
https://github.com/holoviz/panel/issues/830
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-9-885dd74dd613> in <module> 3 mkd2 = pn.pane.Markdown(object=ti.value) 4 ti.jscallback(args={'mkd1': mkd1},value="mkd1.text = cb_obj.value") ----> 5 ti.j...
AttributeError
def _get_model(self, doc, root=None, parent=None, comm=None): """ Should return the bokeh model to be rendered. """ if "panel.models.vtk" not in sys.modules: if isinstance(comm, JupyterComm): self.param.warning( "VTKVolumePlot was not imported on instantiation " ...
def _get_model(self, doc, root=None, parent=None, comm=None): """ Should return the bokeh model to be rendered. """ if "panel.models.vtk" not in sys.modules: if isinstance(comm, JupyterComm): self.param.warning( "VTKVolumePlot was not imported on instantiation " ...
https://github.com/holoviz/panel/issues/819
2019-11-27 14:11:22,010 Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x0000 019A696F59D8>, <Future finished exception=ValueError("'data' is not a parameter of VTK00004")>) Traceback (most recent call last): File "D:\Python\Python37-64\pyenv\py37\lib\site-packages\tornado\ioloop.py", l...
ValueError
def _get_model(self, doc, root=None, parent=None, comm=None): """ Should return the bokeh model to be rendered. """ if "panel.models.vtk" not in sys.modules: if isinstance(comm, JupyterComm): self.param.warning( "VTKPlot was not imported on instantiation " ...
def _get_model(self, doc, root=None, parent=None, comm=None): """ Should return the bokeh model to be rendered. """ if "panel.models.vtk" not in sys.modules: if isinstance(comm, JupyterComm): self.param.warning( "VTKPlot was not imported on instantiation " ...
https://github.com/holoviz/panel/issues/819
2019-11-27 14:11:22,010 Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x0000 019A696F59D8>, <Future finished exception=ValueError("'data' is not a parameter of VTK00004")>) Traceback (most recent call last): File "D:\Python\Python37-64\pyenv\py37\lib\site-packages\tornado\ioloop.py", l...
ValueError
def _get_sources(self, json, sources): datasets = json.get("datasets", {}) for name in list(datasets): if name in sources or isinstance(datasets[name], dict): continue data = datasets.pop(name) columns = set(data[0]) if data else [] if self.is_altair(self.object): ...
def _get_sources(self, json, sources): datasets = json.get("datasets", {}) for name in list(datasets): if name in sources or isinstance(datasets[name], dict): continue data = datasets.pop(name) columns = set(data[0]) if data else [] if self.is_altair(self.object): ...
https://github.com/holoviz/panel/issues/780
KeyError Traceback (most recent call last) /opt/conda/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj, include, exclude) 968 969 if method is not None: --> 970 return method(include=include, exclude=exclude) 971 return...
KeyError
def _get_model(self, doc, root=None, parent=None, comm=None): if "panel.models.vega" not in sys.modules: if isinstance(comm, JupyterComm): self.param.warning( "VegaPlot was not imported on instantiation " "and may not render in a notebook. Restart " ...
def _get_model(self, doc, root=None, parent=None, comm=None): if "panel.models.vega" not in sys.modules: if isinstance(comm, JupyterComm): self.param.warning( "VegaPlot was not imported on instantiation " "and may not render in a notebook. Restart " ...
https://github.com/holoviz/panel/issues/780
KeyError Traceback (most recent call last) /opt/conda/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj, include, exclude) 968 969 if method is not None: --> 970 return method(include=include, exclude=exclude) 971 return...
KeyError
def _update(self, model): if self.object is None: json = None else: json = self._to_json(self.object) self._get_sources(json, model.data_sources) props = { p: getattr(self, p) for p in list(Layoutable.param) if getattr(self, p) is not None } self._get_...
def _update(self, model): if self.object is None: json = None else: json = self._to_json(self.object) self._get_sources(json, model.data_sources) model.data = json
https://github.com/holoviz/panel/issues/780
KeyError Traceback (most recent call last) /opt/conda/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj, include, exclude) 968 969 if method is not None: --> 970 return method(include=include, exclude=exclude) 971 return...
KeyError
def widgets_from_dimensions(cls, object, widget_types=None, widgets_type="individual"): from holoviews.core import Dimension, DynamicMap from holoviews.core.options import SkipRendering from holoviews.core.util import isnumeric, unicode, datetime_types, unique_iterator from holoviews.core.traversal impo...
def widgets_from_dimensions(cls, object, widget_types=None, widgets_type="individual"): from holoviews.core import Dimension, DynamicMap from holoviews.core.options import SkipRendering from holoviews.core.util import isnumeric, unicode, datetime_types, unique_iterator from holoviews.core.traversal impo...
https://github.com/holoviz/panel/issues/759
Traceback (most recent call last): File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/holoviews/plotting/util.py", line 273, in get_plot_frame return map_obj[key] File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/holoviews/core/spaces.py", line 1324, in __getitem...
TypeError
def _from_numpy(self, data): from scipy.io import wavfile buffer = BytesIO() wavfile.write(buffer, self.sample_rate, data) return buffer
def _from_numpy(self, data): buffer = BytesIO() wavfile.write(buffer, self.sample_rate, data) return buffer
https://github.com/holoviz/panel/issues/720
$ conda create -n panel -c pyviz/label/dev panel ... $ conda activate panel (panel) $ python Python 3.7.4 (default, Aug 13 2019, 15:17:50) [Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information. import panel Traceback (most recent call la...
ModuleNotFoundError
def _get_model(self, doc, root=None, parent=None, comm=None): model = self._widget_type(**self._process_param_change(self._init_properties())) if root is None: root = model # Link parameters and bokeh model values = dict(self.get_param_values()) properties = self._filter_properties(list(self...
def _get_model(self, doc, root=None, parent=None, comm=None): model = self._widget_type(**self._process_param_change(self._init_properties())) if root is None: root = model # Link parameters and bokeh model values = dict(self.get_param_values()) properties = list(self._process_param_change(v...
https://github.com/holoviz/panel/issues/548
Traceback (most recent call last): File "/users/huang/anaconda3/lib/python3.7/site-packages/tornado/ioloop.py", line 743, in _run_callback ret = callback() File "/users/huang/anaconda3/lib/python3.7/site-packages/tornado/ioloop.py", line 767, in _discard_future_result future.result() File "/users/huang/anaconda3/lib/py...
ValueError
def _process_param_change(self, msg): msg = super(FileInput, self)._process_param_change(msg) if "value" in msg: msg.pop("value") if "mime_type" in msg: msg.pop("mime_type") return msg
def _process_param_change(self, msg): msg = super(FileInput, self)._process_param_change(msg) if "value" in msg: if self.mime_type: template = "data:{mime};base64,{data}" data = b64encode(msg["value"]) msg["value"] = template.format( data=data.decode("...
https://github.com/holoviz/panel/issues/548
Traceback (most recent call last): File "/users/huang/anaconda3/lib/python3.7/site-packages/tornado/ioloop.py", line 743, in _run_callback ret = callback() File "/users/huang/anaconda3/lib/python3.7/site-packages/tornado/ioloop.py", line 767, in _discard_future_result future.result() File "/users/huang/anaconda3/lib/py...
ValueError
def _process_property_change(self, msg): msg = super(FileInput, self)._process_property_change(msg) if "value" in msg: msg["value"] = b64decode(msg["value"]) return msg
def _process_property_change(self, msg): msg = super(FileInput, self)._process_property_change(msg) if "value" in msg: header, content = msg["value"].split(",", 1) msg["mime_type"] = header.split(":")[1].split(";")[0] msg["value"] = b64decode(content) return msg
https://github.com/holoviz/panel/issues/548
Traceback (most recent call last): File "/users/huang/anaconda3/lib/python3.7/site-packages/tornado/ioloop.py", line 743, in _run_callback ret = callback() File "/users/huang/anaconda3/lib/python3.7/site-packages/tornado/ioloop.py", line 767, in _discard_future_result future.result() File "/users/huang/anaconda3/lib/py...
ValueError
def append(self, pane): from .pane import panel name = None if isinstance(pane, tuple): name, pane = pane new_objects = list(self) new_objects.append(panel(pane, name=name)) name = param_name(new_objects[-1].name) if name is None else name self._names.append(name) self.objects =...
def append(self, pane): from .pane import panel name = None if isinstance(pane, tuple): name, pane = pane new_objects = list(self) new_objects.append(panel(pane, name=name)) name = param_name(new_objects[-1].name) if name is None else name self._names[-1] = name self.objects = n...
https://github.com/holoviz/panel/issues/280
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-100-8bd431d8f26d> in <module> ----> 1 pn.Column([]) ~/panel/panel/layout.py in __init__(self, *objects, **params) 33 def __init__(self, *objects, **...
ModuleNotFoundError
def applies(cls, obj): return ( isinstance(obj, list) and obj and all(cls.applies(o) for o in obj) ) or hasattr(obj, "to_plotly_json")
def applies(cls, obj): return (isinstance(obj, list) and all(cls.applies(o) for o in obj)) or hasattr( obj, "to_plotly_json" )
https://github.com/holoviz/panel/issues/280
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-100-8bd431d8f26d> in <module> ----> 1 pn.Column([]) ~/panel/panel/layout.py in __init__(self, *objects, **params) 33 def __init__(self, *objects, **...
ModuleNotFoundError
def main(args): jax_config.update("jax_platform_name", args.device) print("Start vanilla HMC...") vanilla_samples = mcmc( args.num_warmup, args.num_samples, init_params=np.array([2.0, 0.0]), potential_fn=dual_moon_pe, progbar=True, ) opt_init, opt_update, ge...
def main(args): jax_config.update("jax_platform_name", args.device) print("Start vanilla HMC...") vanilla_samples = mcmc( args.num_warmup, args.num_samples, init_params=np.array([2.0, 0.0]), potential_fn=dual_moon_pe, progbar=True, ) opt_init, opt_update, ge...
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def body_fn(val, i): opt_state_, rng_ = val loss, opt_state_, rng_ = svi_update(i, rng_, opt_state_) return (opt_state_, rng_), loss
def body_fn(val): i, loss, opt_state_, rng_ = val loss, opt_state_, rng_ = svi_update(i, rng_, opt_state_) return i + 1, loss, opt_state_, rng_
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def decoder(hidden_dim, out_dim): return stax.serial( stax.Dense(hidden_dim, W_init=stax.randn()), stax.Softplus, stax.Dense(out_dim, W_init=stax.randn()), stax.Sigmoid, )
def decoder(hidden_dim, out_dim): return stax.serial( stax.Dense(hidden_dim, W_init=stax.randn()), stax.Softplus, stax.Dense(out_dim, W_init=stax.randn()), Sigmoid, )
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def main(args): encoder_init, encode = encoder(args.hidden_dim, args.z_dim) decoder_init, decode = decoder(args.hidden_dim, 28 * 28) opt_init, opt_update, get_params = optimizers.adam(args.learning_rate) svi_init, svi_update, svi_eval = svi( model, guide, elbo, opt_init, ...
def main(args): encoder_init, encode = encoder(args.hidden_dim, args.z_dim) decoder_init, decode = decoder(args.hidden_dim, 28 * 28) opt_init, opt_update, get_params = optimizers.adam(args.learning_rate) svi_init, svi_update, svi_eval = svi( model, guide, elbo, opt_init, ...
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def epoch_train(opt_state, rng): def body_fn(i, val): loss_sum, opt_state, rng = val rng, rng_binarize = random.split(rng) batch = binarize(rng_binarize, train_fetch(i, train_idx)[0]) # TODO: we will want to merge (i, rng, opt_state) into `svi_state` # Here the index `i` is r...
def epoch_train(opt_state, rng): def body_fn(i, val): loss_sum, opt_state, rng = val rng, rng_binarize = random.split(rng) batch = binarize(rng_binarize, train_fetch(i, train_idx)[0]) loss, opt_state, rng = svi_update( i, rng, opt_state, ...
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def body_fn(i, val): loss_sum, opt_state, rng = val rng, rng_binarize = random.split(rng) batch = binarize(rng_binarize, train_fetch(i, train_idx)[0]) # TODO: we will want to merge (i, rng, opt_state) into `svi_state` # Here the index `i` is reseted after each epoch, which causes no # problem fo...
def body_fn(i, val): loss_sum, opt_state, rng = val rng, rng_binarize = random.split(rng) batch = binarize(rng_binarize, train_fetch(i, train_idx)[0]) loss, opt_state, rng = svi_update( i, rng, opt_state, (batch,), (batch,), ) loss_sum += loss return l...
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def get_dtypes(*args): return [canonicalize_dtype(lax.dtype(arg)) for arg in args]
def get_dtypes(*args): return [canonicalize_dtype(onp.result_type(arg)) for arg in args]
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def matrix_to_tril_vec(x, diagonal=0): idxs = np.tril_indices(x.shape[-1], diagonal) return x[..., idxs[0], idxs[1]]
def matrix_to_tril_vec(x, diagonal=0): idxs = onp.tril_indices(x.shape[-1], diagonal) return x[..., idxs[0], idxs[1]]
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def vec_to_tril_matrix(t, diagonal=0): # NB: the following formula only works for diagonal <= 0 n = round((math.sqrt(1 + 8 * t.shape[-1]) - 1) / 2) - diagonal n2 = n * n idx = np.reshape(np.arange(n2), (n, n))[np.tril_indices(n, diagonal)] x = lax.scatter_add( np.zeros(t.shape[:-1] + (n2,)),...
def vec_to_tril_matrix(t, diagonal=0): # NB: the following formula only works for diagonal <= 0 n = round((math.sqrt(1 + 8 * t.shape[-1]) - 1) / 2) - diagonal n2 = n * n idx = np.reshape(np.arange(n2), (n, n))[onp.tril_indices(n, diagonal)] x = lax.scatter_add( np.zeros(t.shape[:-1] + (n2,))...
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def consensus(subposteriors, num_draws=None, diagonal=False, rng=None): """ Merges subposteriors following consensus Monte Carlo algorithm. **References:** 1. *Bayes and big data: The consensus Monte Carlo algorithm*, Steven L. Scott, Alexander W. Blocker, Fernando V. Bonassi, Hugh A. Chipman, ...
def consensus(subposteriors, num_draws=None, diagonal=False, rng=None): """ Merges subposteriors following consensus Monte Carlo algorithm. **References:** 1. *Bayes and big data: The consensus Monte Carlo algorithm*, Steven L. Scott, Alexander W. Blocker, Fernando V. Bonassi, Hugh A. Chipman, ...
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def parametric(subposteriors, diagonal=False): """ Merges subposteriors following (embarrassingly parallel) parametric Monte Carlo algorithm. **References:** 1. *Asymptotically Exact, Embarrassingly Parallel MCMC*, Willie Neiswanger, Chong Wang, Eric Xing :param list subposteriors: a list ...
def parametric(subposteriors, diagonal=False): """ Merges subposteriors following (embarrassingly parallel) parametric Monte Carlo algorithm. **References:** 1. *Asymptotically Exact, Embarrassingly Parallel MCMC*, Willie Neiswanger, Chong Wang, Eric Xing :param list subposteriors: a list ...
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def init_to_median(site, num_samples=15, skip_param=False): """ Initialize to the prior median. """ if site["type"] == "sample" and not site["is_observed"]: if isinstance(site["fn"], dist.TransformedDistribution): fn = site["fn"].base_dist else: fn = site["fn"] ...
def init_to_median(site, num_samples=15, skip_param=False): """ Initialize to the prior median. """ if site["type"] == "sample" and not site["is_observed"]: if isinstance(site["fn"], dist.TransformedDistribution): fn = site["fn"].base_dist else: fn = site["fn"] ...
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def mcmc( num_warmup, num_samples, init_params, num_chains=1, sampler="hmc", constrain_fn=None, print_summary=True, **sampler_kwargs, ): """ Convenience wrapper for MCMC samplers -- runs warmup, prints diagnostic summary and returns a collections of samples from the poste...
def mcmc( num_warmup, num_samples, init_params, num_chains=1, sampler="hmc", constrain_fn=None, print_summary=True, **sampler_kwargs, ): """ Convenience wrapper for MCMC samplers -- runs warmup, prints diagnostic summary and returns a collections of samples from the poste...
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def while_loop(cond_fun, body_fun, init_val): if _DISABLE_CONTROL_FLOW_PRIM: val = init_val while cond_fun(val): val = body_fun(val) return val else: return lax.while_loop(cond_fun, body_fun, init_val)
def while_loop(cond_fun, body_fun, init_val): if _DISABLE_CONTROL_FLOW_PRIM: val = init_val while cond_fun(val): val = body_fun(val) return val else: # TODO: consider jitting while_loop similar to fori_loop return lax.while_loop(cond_fun, body_fun, init_val)
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def fori_loop(lower, upper, body_fun, init_val): if _DISABLE_CONTROL_FLOW_PRIM: val = init_val for i in range(int(lower), int(upper)): val = body_fun(i, val) return val else: return lax.fori_loop(lower, upper, body_fun, init_val)
def fori_loop(lower, upper, body_fun, init_val): if _DISABLE_CONTROL_FLOW_PRIM: val = init_val for i in range(int(lower), int(upper)): val = body_fun(i, val) return val else: return jit(lax.fori_loop, static_argnums=(2,))(lower, upper, body_fun, init_val)
https://github.com/pyro-ppl/numpyro/issues/279
test/test_examples.py::test_cpu[hmm.py --num-samples 100 --num-warmup 100 --num-chains 2] Running: python examples/hmm.py --num-samples 100 --num-warmup 100 --num-chains 2 Simulating data... Starting inference... Traceback (most recent call last): File "/home/travis/build/pyro-ppl/numpyro/examples/hmm.py", line 180, in...
RuntimeError
def _build_import_removals() -> Dict[MinVersion, Dict[str, Tuple[str, ...]]]: ret = {} future: Tuple[Tuple[MinVersion, Tuple[str, ...]], ...] = ( ((2, 7), ("nested_scopes", "generators", "with_statement")), ( (3,), ( "absolute_import", "div...
def _build_import_removals() -> Dict[MinVersion, Dict[str, Tuple[str, ...]]]: ret = {} future: Tuple[Tuple[MinVersion, Tuple[str, ...]], ...] = ( ((2, 7), ("nested_scopes", "generators", "with_statement")), ( (3,), ( "absolute_import", "div...
https://github.com/asottile/pyupgrade/issues/378
venv/bin/pyupgrade --py39-plus src/**.py Traceback (most recent call last): File "/Users/bgabor8/git/a/venv/bin/pyupgrade", line 8, in <module> sys.exit(main()) File "/Users/bgabor8/git/a/venv/lib/python3.9/site-packages/pyupgrade.py", line 2823, in main ret |= _fix_file(filename, args) File "/Users/bgabor8/git/a/venv/...
KeyError
def visit_Call(self, node: ast.Call) -> None: if ( isinstance(node.func, ast.Name) and node.func.id in {"isinstance", "issubclass"} and len(node.args) == 2 and self._is_six(node.args[1], SIX_TYPE_CTX_ATTRS) ): arg = node.args[1] # _is_six() enforces this a...
def visit_Call(self, node: ast.Call) -> None: if ( isinstance(node.func, ast.Name) and node.func.id in {"isinstance", "issubclass"} and len(node.args) == 2 and self._is_six(node.args[1], SIX_TYPE_CTX_ATTRS) ): arg = node.args[1] # _is_six() enforces this a...
https://github.com/asottile/pyupgrade/issues/312
Traceback (most recent call last): File "blah.py", line 1, in <module> with open('blah.txt', 'utf-8') as fp: ValueError: invalid mode: 'utf-8'
ValueError
def visit_Name(self, node: ast.Name) -> None: if self._is_six(node, SIX_SIMPLE_ATTRS): self.six_simple[_ast_to_offset(node)] = node if self._scope_stack: if isinstance(node.ctx, ast.Load): self._scope_stack[-1].reads.add(node.id) elif isinstance(node.ctx, (ast.Store, ast.Del...
def visit_Name(self, node: ast.Name) -> None: if self._is_six(node, SIX_SIMPLE_ATTRS): self.six_simple[_ast_to_offset(node)] = node if self._scope_stack: if isinstance(node.ctx, ast.Load): self._scope_stack[-1].reads.add(node.id) elif isinstance(node.ctx, ast.Store): ...
https://github.com/asottile/pyupgrade/issues/306
Traceback (most recent call last): File "./venv/bin/pyupgrade", line 8, in <module> sys.exit(main()) File "/home/jon/venv/lib64/python3.8/site-packages/pyupgrade.py", line 2680, in main ret |= _fix_file(filename, args) File "/home/jon/venv/lib64/python3.8/site-packages/pyupgrade.py", line 2638, in _fix_file contents_te...
AssertionError
def visit_Call(self, node): # type: (ast.Call) -> None if ( isinstance(node.func, ast.Name) and node.func.id in {"isinstance", "issubclass"} and len(node.args) == 2 and self._is_six(node.args[1], SIX_TYPE_CTX_ATTRS) ): arg = node.args[1] # _is_six() enforces this...
def visit_Call(self, node): # type: (ast.Call) -> None if ( isinstance(node.func, ast.Name) and node.func.id in {"isinstance", "issubclass"} and len(node.args) == 2 and self._is_six(node.args[1], SIX_TYPE_CTX_ATTRS) ): arg = node.args[1] # _is_six() enforces this...
https://github.com/asottile/pyupgrade/issues/246
Traceback (most recent call last): File ".../venv/bin/pyupgrade", line 10, in <module> sys.exit(main()) File ".../venv/lib64/python3.8/site-packages/pyupgrade.py", line 2318, in main ret |= _fix_file(filename, args) File ".../venv/lib64/python3.8/site-packages/pyupgrade.py", line 2280, in _fix_file contents_text = _fix...
IndexError