AttributeError: 'GPT2Config' object has no attribute 'n_ctx'

Traceback (most recent call last):
File "D:\Python\Test\test\T\decision-transformer-master\gym\experiment.py", line 312, in
experiment('gym-experiment', variant=vars(args))
File "D:\Python\Test\test\T\decision-transformer-master\gym\experiment.py", line 213, in experiment
model = DecisionTransformer(
File "D:\Python\Test\test\T\decision-transformer-master\gym\decision_transformer\models\decision_transformer.py", line 39, in init
self.transformer = GPT2Model(config)
File "D:\Python\Test\test\T\decision-transformer-master\gym\decision_transformer\models\trajectory_gpt2.py", line 522, in init
self.h = nn.ModuleList([Block(config.n_ctx, config, scale=True) for _ in range(config.n_layer)])
File "D:\Python\Test\test\T\decision-transformer-master\gym\decision_transformer\models\trajectory_gpt2.py", line 522, in
self.h = nn.ModuleList([Block(config.n_ctx, config, scale=True) for _ in range(config.n_layer)])
File "E:\Python\python3.10.5\lib\site-packages\transformers\configuration_utils.py", line 260, in getattribute
return super().getattribute(key)
AttributeError: 'GPT2Config' object has no attribute 'n_ctx'

Hello, I also met the same problem, may I ask you how to solve it？

May I know how you solved this problem

@NanBorui
This issue arises due to a version mismatch in huggingface/transformers. The n_ctx attribute has been either removed or altered in the newer versions of transformers, which is causing errors in this repository that uses an older version.
As specified in conda_env.yml, installing transformers==4.5.1 should resolve this issue.
If that's not feasible, you might be able to solve it by manually altering n_ctx, referencing this commit:
https://github.com/huggingface/transformers/commit/5b45422b58da508dab8b18852609a279517b944d.

@feifei-feifei-hub try version transformers=4.12.5

if you are using a higher version of Transformers, change n_ctx to n_positions can solve this problem


Add per-tensor data quantization

Pull Request Template
Checklist

[x] Confirmed that run-checks all script has been executed.

Related Issues/PRs
Progress towards #464
Changes
Note: the changes in this PR add support for per-tensor quantization (one set of quantization params per tensor, as opposed to per-channel quantization where there are multiple sets of quantization params per tensor, i.e. one per channel in the tensor). Other quantization schemes can be added to the enum in the future.

Added QuantizationStrategy enum and Quantization trait w/ concrete implementations for affine and asymmetric

Added Option<QuantizationStrategy> to Data and DataSerialize which defaults to none
Added data.with_quantization(...) method

Added Int8PrecisionSettings

:warning: Breaking :warning:
Binary record formats (BinFileRecorder and BinGzFileRecorder) are not backward compatible.
Other self-describing formats are ok as the Option<QuantizationStrategy> will deserialize to None by default.
Testing
Added unit tests for affine and symmetric int8 quantization
References

https://leimao.github.io/article/Neural-Networks-Quantization/
https://apple.github.io/coremltools/docs-guides/source/quantization-overview.html

As discussed offline, some bigger changes are required first 👀


no such files directory

hello when i lunch bulder.bat the error is
python: can't open file 'C:\Users\______\AppData\Local\Temp\Temp1_Blank-Grabber-main.zip\Blank-Grabber-main\Blank Grabber\gui.py': [Errno 2] No such file or directory
but i dont move any files en de codes sems ok so i dont enderstand
thanks

You have to extract the files to a folder before running.

sorry i'm dumb


Guards Refactor

Changed the way Guards is setup and computed in route functions and in control types

Codecov Report

Merging #59 (f510abb) into main (ad9996f) will decrease coverage by 0.31%.
The diff coverage is 86.20%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
- Coverage   94.29%   93.98%   -0.31%
==========================================
  Files         161      161
  Lines        5383     5374       -9
==========================================
- Hits         5076     5051      -25
- Misses        307      323      +16

Impacted Files
Coverage Δ

ellar/constants.py
100.00% <ø> (ø)

ellar/core/context/interface.py
100.00% <ø> (ø)

ellar/core/modules/ref.py
99.39% <ø> (-0.01%)
:arrow_down:

ellar/services/reflector.py
42.85% <23.07%> (-32.15%)
:arrow_down:

ellar/common/__init__.py
100.00% <100.00%> (ø)

ellar/common/decorators/__init__.py
100.00% <100.00%> (ø)

ellar/common/decorators/controller.py
97.01% <100.00%> (+0.46%)
:arrow_up:

ellar/common/routing/__init__.py
100.00% <100.00%> (ø)

ellar/core/__init__.py
100.00% <100.00%> (ø)

ellar/core/context/execution.py
100.00% <100.00%> (ø)

... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Disable Telemetry Doesn't Only Disable Telemetry

Describe the bug
When used, it also messes with the GPU Scheduling and Priority settings.
To Reproduce
Steps to reproduce the behavior:

Simply run the Disable Telemetry options.

Expected behavior
It should be disabling things related to telemetry, not touching unrelated performance tweaks.
Additional context
I know changing GPU scheduling and other related settings in that specific part of the registry is supposed to help with performance, but it makes things work worse in my setup. I only want to be able to use all the telemetry related tweaks when I press that button.

I agree that some tweaks in 'Disable telemetry' should be moved to a separate toggle.

This is still a thing

Literally only thing that I dislike about the tool, otherwise the Disable Telemetry option would be so useful :'3 Should i make a new issue since this auto closed?


What's the best way to insert ordered u32s in a RoaringBitmap?

This is an open question about this library.
We are extensively using RoaringBitmaps at Meilisearch, and we have very special usage of bitmaps mixed with bit-packing. Bitpacking is primarily used to compress ordered lists of u32s and consume less memory. But when merging multiple bit-packed lists, we retrieve a bunch of ordered (and unique) u32s that we want to insert in roaring bitmaps efficiently.
The following lines show the way we union the ordered u32s into an existing bitmap:
while let Some(block) = iter.next_block() {
    let iter = block.iter().copied();
    let block = RoaringBitmap::from_sorted_iter(iter).unwrap();
    *del |= block;
}

What could be the best and most efficient way to insert a bunch of ordered u32s into an existing bitmap?
I wonder if #288 is related to this and if we should just convert this u32s list into a bitmap.

The implementation of RoaringBitmap::from_sorted_iter seems that it continuously call push_unchecked of each container, store. In case BitmapStore, it will write a bit for each call of push_unchecked. It has the overhead of bitmask and bitshifting. In case ArrayStore, just push to the Vec<u16> their is almost no overheads (except the gradual allocation of vec). If all the stores are bitmap, converting the indices into bitmask in advance would be good for the performance. If they have some ArrayStore, we have another overheads indicies -> bitmask -> indicies.
The solution for this might be calling BitmapStore::from_lsb0_bytes within RoaringBitmap::from_sorted_iter, I guess.

Hey @lemolatoon 👋

The solution for this might be calling BitmapStore::from_lsb0_bytes within RoaringBitmap::from_sorted_iter, I guess.

Thank you very much for your PR again. I'll also ask the help of Daniel Lemire on that just to see what he thinks is the best solution for that before diving into the code. I am still wondering if it doesn't cost too much to convert integers to bitmaps to a union just after. Isn't there a more direct way?
Have a nice day 🦃

Hey @lemire 👋
I'm curious if you can assist me with this topic. I came across the Bitmap::lazy_batch method in the croaring wrapper, allowing multiple operations on bitmaps efficiently without converting containers to arrays. However, this method is most effective when working with pre-existing bitmaps. In my scenario, I have ordered slices of u32 data, aligned in memory, and typically sized at 32/128/256.
Implementing a lazy batch system to insert these ordered u32 blocks into a single roaring bitmap would be beneficial. Do you have insights on the optimal approach for creating bitmaps from sorted u32s?
Have a nice day 🌮

@Kerollmops
In CRoaring, we have a fast bulk add function.
We have something similar in Go's roaring.
In Java, we have a RoaringBitmapWriter which is optimized for fast insertion in some important cases.
Java also has an addN function.

As what is best, it is not possible to answer this question in the abstract. If you have a specific workload, you can tell what works best, but if you just tell me that you have a sorted array of integers... it is not possible to know what will be best.

Thank you very much @lemire. I'll take a look at these functions and will probably take inspiration from that to implement the same in this library.
About the workload. In the new Meilisearch indexer we decided to compress integers with bit packing (with the bit packing library, inspired by your work) to reduce the memory usage of the engine when indexing and sequentially, in parallel, union multiple bit packed (using Bbbul) ordered sets of integers into roaring bitmaps to finally serialize them to disk.

with the bit packing library,

That's interesting.


The url inside the composer.json should be in their secure version?

Hi,
I think the url should be written with https;// instead of http://.
https://github.com/amphp/amp/blob/5c29da05afd44248a6d15abb29ecf8eabb0af814/composer.json#L3
What do you think?
Regards

Sure, do you want to send a PR?

Sure, no problem.


Plan: Products Page

Basic Plan
Header
Shop Image - Square
Shop Name - Under - Heart button Favorite Shop
right side images that navigate to other products of that shop
total shop items (listings)
Body
Column 1
Favorite for the listing
Explanation for favorites
Image
Arrows - grey
On image
Left side hover - blue arrow
right side hover - blue arrow
Box with thumbnails of all images - first image is active
all other greyed out
Zoom
Shop Image
Link to request a custom order
Three Tabs
Tab One - Item Details
contains item details
Tab Two - Star rating
with stars
number of reviews
all reviews
Tab Three - Shipping and Policies for shop
Column 2
Box 1
Item name
Price w/ currency
Ask a Question button
Option Possibilities	(based on product)
Quantity -or- single item -or- # available
Color
Size
Overview - bulleted list, feedback link, favorited by 				link
Does the shop accept gift cards?
Big green add to cart button
Box 2
Favorite button for the item
hamburger menu - add to list
social media
Box 3
Shop Image
Shop Name
Shop Location
2 columns of products
Image, name, price
Stay vs. Placeholders
Items that stay the same
Header
Favorite shop button
4 images (other items)
1 items box (just visual)
Image
Left/Right click arrows
Zoom option
Possible thumbnails
Item info
Three tabs
Item Detail title
Star visual
Shipping & Policies
Column 2
Ask a question
Feedback and Favorited by (what pops will change)
Add to Cart Button
Favorited and menu button
Social media tab
Grid for shop (outline only)
Item details that change
Header
Shop icon
Other items
Number of items
Main image
smaller thumbnails
Item
Info
Star rating / how many reviews
Shipping policy specifics
Item name
Item price
Item quantity (if applicable)
Item options
Item overview
Shop
Icon
Name

https://github.com/MStaehling/TIY-Catalog/pull/5


Add Enzyme to redux testing docs

In #1481, you suggested using Enzyme in tests, and I can see that people helped take this on and get the example apps set up with Enzyme testing. However, Enzyme is not used in the example in the Redux "Writing Tests" doc.
Do you want me to add it there? I can submit a PR for you to check out. For the prose section, I plan to say something like "Facebook provides a basic helper library called ReactTestUtils for testing React components. Here we'll show how to test your component using Airbnb's Enzyme, which uses ReactTestUtils internally, and makes our job of testing easier and provides additional functionality."
PS: I read the guidelines for contributing and wasn't sure if I should add this to #1481 or start a new case. Sorry if I chose wrong. :-)

Sure, please send a PR to the doc!


Use certificates from VBoxGuestAdditions.iso rather than oracle-cert.cer

This fix should more reliably fix the oracle-cert.cer issue #90 by importing the certificates directly from the Guest Additions iso

This works well, why hasn't anyone merged?

Sorry.


Allow to guess Common Lisp and Clojure by the file extension

.lisp is commonly used for Common Lisp and .clj for Clojure.
It would be great to add support for these :)

LGTM


Create the animals table using the Postgresql database

💯 Here is the screenshot of the result of the queries:⤵

What does this PR do?
This PR is raised to implement the following features: 👍 :

In this project, I used a relational database to create the initial data structure for a vet clinic. I created a table to store animals' information, insert some data into it, and query it. 🪄🎈

[ ]  Created a database named vet_clinic👍.
[ ] Created a table named animals with corresponding columns upon the requirements💯.
[ ] Inserted data of 4 animals with the corresponding name, date_of_birth, weight, neutered status, and escape attempts

Description of the task to be completed 👎

[ ] Inset data into the table👌
[ ] Wrote SQL queries to answer questions based on stated requirements.⤵
[ ] Retrieve the data from the table using select statement💯

How should it be tested
Clone the repository
git clone https://github.com/osamaashraf6/Vet-clinic-database.git

Navigate to the folder
cd Vet-clinic-database

Checkout the branch
git checkout animals__table

Thanks for reviewing my PR 😊
Don't forget to give a ⭐ to support me 😃

Thanks @Mihndim2020 🙏 for reviewing my pull request I appreciate your review 💯

Thanks again for reviewing my PR  and have a good day😊


Resize function fails on addition of new content

Upon adding new Jpeg files to assets/img/comic and creation of the appropriate page, hugo fails to run, throwing the following error message:

ERROR render of "page" failed: "[path]Sites/mini-hugo-webcomic/layouts/page/archive.html:10:32": execute of template failed: template: page/archive.html:10:32: executing "main" at <$page.comicThumbImgRaw.Resize>: nil pointer evaluating interface {}.Resize
ERROR render of "home" failed: "[path]Sites/mini-hugo-webcomic/layouts/index.html:3:6": execute of template failed: template: index.html:3:6: executing "main" at <partial "comic/comic.html" $comics.lastPage>: error calling partial: "[path]Sites/mini-hugo-webcomic/layouts/partials/comic/comic.html:3:20": execute of template failed: template: partials/comic/comic.html:3:20: executing "partials/comic/comic.html" at <$page.comicImgRaw.Resize>: nil pointer evaluating interface {}.Resize
Built in 40 ms
Error: error building site: render: failed to render pages: render of "page" failed: "[path]/Sites/mini-hugo-webcomic/layouts/comic/single.html:2:6": execute of template failed: template: comic/single.html:2:6: executing "main" at <partial "comic/comic.html" .>: error calling partial: "[path]/Sites/mini-hugo-webcomic/layouts/partials/comic/comic.html:3:20": execute of template failed: template: partials/comic/comic.html:3:20: executing "partials/comic/comic.html" at <$page.comicImgRaw.Resize>: nil pointer evaluating interface {}.Resize

This does not happen if only the default content is present. As far as I can tell, I've followed all instructions correctly and I wonder if there isn't something that works differently between Hugo versions. My version of Hugo is

hugo v0.121.1-00b46fed8e47f7bb0a85d7cfc2d9f1356379b740+extended darwin/amd64 BuildDate=2023-12-08T08:47:45Z VendorInfo=brew

Thanks for sharing this template!

Hello! It looks like Hugo can't find the new images; perhaps they're named incorrectly? Could you show me your directory structure?

Hi,
The images are in /Users/[my name]/Dropbox/Sites/mini-hugo-webcomic/assets/img/comic/  and are named green-knights-belt-preamble_001.jpg and green-knights-belt-preamble_thumb.jpg -
Hugo is being run from within /Users/[my name]/Dropbox/Sites/mini-hugo-webcomic

What's in the content/comic folder?

1.md with the default front matter:
+++
date = 2023-12-30T15:51:48+01:00
hover = 'Add your hover text here.'
+++

Write your comic description or transcript here.

Could you show me the entire contents of the comic folder including all subdirectories and files within them?

Latest version, after generating with
hugo new content --kind comic-page comic/green-knights-belt-preamble/1.md

Thank you! I see the problem now. You need to place an _index.md file in the green-knights-belt-preamble folder with the following content:
+++
[[cascade]]
title = 'Green Knights Belt Preamble (or whatever you want the title to be)'
chapterID = 'green-knights-belt-preamble'

[_build]
render = 'never'
+++

This can be done automatically by running hugo new content --kind chapter comic/green-knights-belt-preamble/_index.md, as explained here. The important part is the chapterID tag, which should be the same string as used in the image filenames. The chapterID is what the template uses to find the image files.
I hope this helps! Let me know if you still have issues.

Thank you so much! I can't believe I overlooked that step.

No problem! Good luck on your comic 😄


Webview Plugin: is there any loadDataWithBaseURL alternative?

In the android version of my app, I use loadDataWithBaseURL to load the local HTML file and I use it to play youtube videos using youtube JS SDK.
loadDataWithBaseURL("https://www.youtube.com", htmlPageString, "text/html", "utf-8", null)
In flutter, I am able to load the local HTML file but I am not able to play youtube video as Youtube throws video not available error and I used to get same error while using loadData api insead of loadDataWithBaseURL in android.

Hi @Praveena0989, Can you post a reproduction of the issue? We will need more information to help you resolve it.

This is my HTML file
<!DOCTYPE html>

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

And I am using it in my code like this
void didChangeDependencies() {
    DefaultAssetBundle.of(context)
        .loadString('assets/youtube_player.html')
        .then((html) {
      setState(() {
        _html = html;
      });
    });
    super.didChangeDependencies();
  }

@override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      child: SafeArea(
          child: AspectRatio(
            aspectRatio: 16.0 / 9.0,
            child: _html == null
                ? CupertinoActivityIndicator()
                : WebView(
                      initialUrl:
                          new Uri.dataFromString(_html, mimeType: 'text/html')
                              .toString(),
                      javascriptMode: JavascriptMode.unrestricted)))
}

But youtube video won't play but shows video unavailable it's because youtube doesn't allow playing from local HTML which can be solved in android using loadDataWithBaseURL("https://www.youtube.com", htmlPageString, "text/html", "utf-8", null) but I don't see any alternative for this in flutter.

Any guidance to help in implementing this?
I'm not sure I can do it all or do it on my own because I have 0 knowledge in Swift and IDK if loadDataWithBaseUrl is available for iOS.
so if someone can help, I may help in implementing this.

@Piinks  any idea, please?

I had opened pull request for this, in which the flutter webview has the support for baseUrl and localHtml support same as react native. I don't know why it is still not merged.
https://github.com/flutter/plugins/pull/2830
by adding simply two new attributes, html string with baseUrl(optional) can be loaded.
html: "Sample",
baseUrl: "file://" + HOME_PATH + '/',
also if required the html inside webview can be replaced with other other using webviewController.
webViewController.loadHtml(html);
---This needs to be added in pubspec.yaml---
webview_flutter:
git:
url: https://github.com/uc-apa/plugins.git
path: packages/webview_flutter

I had opened pull request for this, in which the flutter webview has the support for baseUrl and localHtml support same as react native. I don't know why it is still not merged.
flutter/plugins#2830
by adding simply two new attributes, html string with baseUrl(optional) can be loaded.
html: "Sample",
baseUrl: "file://" + HOME_PATH + '/',
also if required the html inside webview can be replaced with other other using webviewController.
webViewController.loadHtml(html);
---This needs to be added in pubspec.yaml---
webview_flutter:
git:
url: https://github.com/uc-apa/plugins.git
path: packages/webview_flutter

Hey! please let us know when it will be merged?
and is there any way to provide assets path in baseUrl

Closing as resolved; the current API has loadHtmlString, which can take a base URL.


Fix PIXI.Graphics.drawTorus() behavior with existing geometry

Description of change
Fix for drawTorus() bug #6885
Pre-Merge Checklist

[X] Documentation is changed or added
[ ] Lint process passed (npm run lint)
[ ] Tests passed (npm run test)

Oops, spoke too soon. Better, but I'm seeing this weird artifact:
https://jsfiddle.net/bigtimebuddy/0m891ry4/

Yeah, wasn't sure what the expected outcome should be with a moveTo followed by a draw call.  My naive understanding would be that the torus segment should still be drawn properly, i.e. that the call to drawTorus() should implicitly end any prior drawing geometry.  Was planning on digging in more tonight to figure it out.  moveTo() + drawRect() works fine, for example.
It seems like there needs to be a more clear delineation between "draw a full shape" and "draw a path segment" in the Graphics API, where full shape calls implicitly close/complete any prior actions.  But perhaps I'm not understanding the API well enough.

No, you're right @irongaze. The thing that makes drawTorus different is that the other shapes like drawStar, drawRegularPolygon go thru the drawShape API which doesn't have the issue.
Adding a finishPoly() call before adding the arcs fixes the problem. Updated and this is what I would expect to happen:
https://jsfiddle.net/bigtimebuddy/0m891ry4/


Fonts

Hi, I'm trying to install your kanagawa settings on fedora, but I don't find any of the fonts you use on dnf, could you tell me which one you have installed?
I have looked into the repo, but I don't see anything helpful

Kanagawa is using Operator Mono as the terminal/monospace font and Inter as the UI font. I've actually moved to IBM Plex Sans for UI now and would recommend giving it a try!


[kimchi][WIP] adding benchmarks code

This PR adds a toy benchmark using:

criterion.rs a benchmark crate
iai a benchmark crate better suited for CI

Codecov Report

Merging #207 (ed17276) into master (d71f66d) will decrease coverage by 0.67%.
The diff coverage is 0.98%.

@@            Coverage Diff             @@
##           master     #207      +/-   ##
==========================================
- Coverage   88.94%   88.26%   -0.68%
==========================================
  Files          74       75       +1
  Lines       18237    18380     +143
==========================================
+ Hits        16220    16224       +4
- Misses       2017     2156     +139

Impacted Files
Coverage Δ

dlog/kimchi/src/bench.rs
0.00% <0.00%> (ø)

dlog/kimchi/src/lib.rs
100.00% <100.00%> (ø)

dlog/kimchi/src/index.rs
73.58% <0.00%> (-23.92%)
:arrow_down:

dlog/kimchi/src/prover.rs
98.10% <0.00%> (-0.57%)
:arrow_down:

dlog/commitment/src/commitment.rs
92.34% <0.00%> (+0.35%)
:arrow_up:

groupmap/src/lib.rs
95.90% <0.00%> (+0.81%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d71f66d...ed17276. Read the comment docs.

rebase


BitAssets updated every block

According to https://bitsharestalk.org/index.php/topic,19661.0.html for some reason every BitAsset is getting pushed to every subscriber in every block.  There is no reason for this to happen, and I suspect we're wrongly updating every BitAsset in every block.

This issue was moved to bitshares/bitshares-core#122


ImportError: cannot import name 'available_if' from 'sklearn.utils.metaestimators'

Running the line from pyAudioAnalysis import audioSegmentation as aS gives this error in my terminal
Traceback (most recent call last):
File "C:\Users\John\Desktop\pyAudioAnalysis\test.py", line 1, in
from pyAudioAnalysis import audioSegmentation as aS
File "C:\Users\John\Desktop\pyAudioAnalysis\pyAudioAnalysis\audioSegmentation.py", line 19, in
import pyAudioAnalysis.audioTrainTest as at
File "C:\Users\John\Desktop\pyAudioAnalysis\pyAudioAnalysis\audioTrainTest.py", line 2, in
from imblearn.under_sampling import RandomUnderSampler
File "C:\Users\John\AppData\Local\Programs\Python\Python39\lib\site-packages\imblearn_init_.py", line 53, in
from . import ensemble
File "C:\Users\John\AppData\Local\Programs\Python\Python39\lib\site-packages\imblearn\ensemble_init_.py", line 6, in
from ._easy_ensemble import EasyEnsembleClassifier
File "C:\Users\John\AppData\Local\Programs\Python\Python39\lib\site-packages\imblearn\ensemble_easy_ensemble.py", line 21, in
from ..pipeline import Pipeline
File "C:\Users\John\AppData\Local\Programs\Python\Python39\lib\site-packages\imblearn\pipeline.py", line 18, in
from sklearn.utils.metaestimators import available_if
ImportError: cannot import name 'available_if' from 'sklearn.utils.metaestimators' (C:\Users\John\AppData\Local\Programs\Python\Python39\lib\site-packages\sklearn\utils\metaestimators.py)

ImportError: cannot import name 'available_if' from 'sklearn.utils.metaestimators' (C:\Users\Dell\anaconda3\lib\site-packages\sklearn\utils\metaestimators.py)


Make react a singleton client side with webpack resolve.alias

Getting closer to react-server-cli working as a global install.

Superseded by #484.


Shared metrics context (Client -> SDK, SDK -> Client)

Add shared context for metrics between Client and SDK

Addressed PR comments.
Not super familiar with Ampersand, so let me know if there is some other pattern you'd like followed for the map instantiation.
Cheers.

Made changes as requested.

Created README

@ianwremmel  any word on when we might get this merged in?
No specific task we have right now that requires this, but would be nice to get this in for use around metrics we may need.
Cheers.


fix(versions): update Activiti/activiti-cloud-full-chart-security versions

UpdateBot pushed helm dependency: activiti-cloud-full-example to: 7.1.363

UpdateBot commands:
updatebot push-version --kind helm activiti-cloud-full-example 7.1.363


fix fetching binary files such as images

Hello, when I fetch binary files such as images create by code_interpreter, I get a parsing error.
I determined that this is because response.is_a?(String) returns true for binary files such as png.
This PR fixes the parsing error, but I suspect there may be a better way to fix it.
For example, if someone was using non-utf-8 string encoding, this could break.
May need more investigation?
All Submissions:

[*] Have you followed the guidelines in our Contributing document?
[*] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
[*] Have you added an explanation of what your changes do and why you'd like us to include them?

Thanks, @nickurban - what about instead adding rescue JSON::ParserError?
It would be great to have a simple spec for this also.


Setting the environment variable os.environ['OMP_NUM_THREADS'] > 64

I am running the program on a HPC cluster having 128 cores, so I want to utilize all the possible cores, but  I am getting the following error message on setting the  os.environ['OMP_NUM_THREADS']="128" and
os.environ['MKL_NUM_THREADS']="128"
Error.  nthreads cannot be larger than environment variable "NUMEXPR_MAX_THREADS" (64)
Could you please help me with this?

This is an issue with numexpr I would submit an issue there.


[Doc]: Submit xcdat as an xarray related project

Describe your documentation update

Xarray provides a list of xarray related projects, so we should submit xcdat here: https://xarray.pydata.org/en/stable/ecosystem.html

Closed by https://github.com/pydata/xarray/issues/7577#event-8657091877


junos-netconify failing install using pip

Hi,
pip install junos-netconify is failing the installation. I get the following message

Python 2.7.6 is installed.  is there a dependency that I am unaware of?

What's the command you used to install the netconify?
Did you use sudo

sudo pip install netconify
Could not find a version that satisfies the requirement netconify (from versions: )
No matching distribution found for netconify

You need to submit it to https://pypi.python.org/pypi?%3Aaction=submit_form

@bbaassssiiee
It should be
pip install junos-netconify


Currency converter

Proposal
Add currency converter using api to convet one currency  to other

I would like to work on this issue @sairish2001 under gssoc 2021

Feel free to ask your doubts, if any
Deadline 16 March,2021 (11:59 PM IST)


MSI vendor field

JDK8 Windows .MSI binaries should populate the vendor as Eclipse Foundation

This has been done and a new MSI installer will be uploaded today


WEB-3837 Hugo theming as a hugo module

Build succeeded (check pipeline).

https://checklist.intgdc.com/job/compliance/job/gooddata-docs-theme-oss-check/24/ : SUCCESS in 4s

Build succeeded (check pipeline).

https://checklist.intgdc.com/job/compliance/job/gooddata-docs-theme-oss-check/25/ : SUCCESS in 4s

Build succeeded (gate pipeline).

https://checklist.intgdc.com/job/compliance/job/gooddata-docs-theme-fossa-scanning-oss-zuul/19/ : SUCCESS in 26s (non-voting)
https://checklist.intgdc.com/job/compliance/job/gooddata-docs-theme-merge-compliance-check/4/ : SUCCESS in 9s


Fix travis pushing build artifacts

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Hooray, its fixed!


New test: install the operator with debug enabled

Test Case
Use case: As an user installing CoCo via operator I want to switch on the debugging messages so that I can debug errors on the installation.
Add a new test case to the operator tests to check the condition debug=true.
Split out of https://github.com/confidential-containers/operator/issues/247
Implementation
In order to switch debugging on/off , you should change the kustomization file on the corresponding ccruntime's overlay directory. For example, in the default ccruntime kustomization file:
diff --git a/config/samples/ccruntime/default/kustomization.yaml b/config/samples/ccruntime/default/kustomization.yaml
index b22bc16..1ebd13c 100644
--- a/config/samples/ccruntime/default/kustomization.yaml
+++ b/config/samples/ccruntime/default/kustomization.yaml
@@ -33,7 +33,7 @@ patches:
       value: "kata-qemu"
     - op: add
       path: /spec/config/debug
-      value: false
+      value: true
     - op: add
       path: /spec/config/environmentVariables
       value:

Questions:

Once the operator is installed then it should be checked that kata-deploy emit debugging messages. How? Maybe grep'ing the messages of the installer pod?

I'm not sure the debug is set correctly. kata-deploy expects an environment variable exported as DEBUG=true|false whereas the generated ccruntime deployment has spec/config/debug set:
[wmoschet@wainer-laptop operator]$ ./kustomize build config/samples/ccruntime/default/
apiVersion: confidentialcontainers.org/v1beta1
kind: CcRuntime
metadata:
  name: ccruntime-sample
spec:
  ccNodeSelector:
    matchLabels:
      node.kubernetes.io/worker: ""
  config:
    cleanupCmd:
    - /opt/kata-artifacts/scripts/kata-deploy.sh
    - reset
    debug: false
    defaultRuntimeClassName: kata-qemu
    environmentVariables:
    - name: INSTALL_OFFICIAL_CONTAINERD
      value: "false"
    installCmd:
    - /opt/kata-artifacts/scripts/kata-deploy.sh
    - install
    installDoneLabel:

<SNIP>

I'm not sure the debug is set correctly. kata-deploy expects an environment variable exported as DEBUG=true|false whereas the generated ccruntime deployment has spec/config/debug set:
[wmoschet@wainer-laptop operator]$ ./kustomize build config/samples/ccruntime/default/
apiVersion: confidentialcontainers.org/v1beta1
kind: CcRuntime
metadata:
  name: ccruntime-sample
spec:
  ccNodeSelector:
    matchLabels:
      node.kubernetes.io/worker: ""
  config:
    cleanupCmd:
    - /opt/kata-artifacts/scripts/kata-deploy.sh
    - reset
    debug: false
    defaultRuntimeClassName: kata-qemu
    environmentVariables:
    - name: INSTALL_OFFICIAL_CONTAINERD
      value: "false"
    installCmd:
    - /opt/kata-artifacts/scripts/kata-deploy.sh
    - install
    installDoneLabel:

<SNIP>

Actually controllers/ccruntime_controller.go converts the spec/config/debug into an environment variable.

Once the operator is installed then it should be checked that kata-deploy emit debugging messages. How? Maybe grep'ing the messages of the installer pod?

Is there a clean way to do this by checking for any logs with priority level == debug? If not, maybe that's a longer term goal to improve our logging.

Hi @portersrc !

Once the operator is installed then it should be checked that kata-deploy emit debugging messages. How? Maybe grep'ing the messages of the installer pod?

Is there a clean way to do this by checking for any logs with priority level == debug? If not, maybe that's a longer term goal to improve our logging.

Just after opening this issue I looked at kata-deploy's code again, now I have a better understanding of what it enables in terms of debugging. It is not that kata-deploy script itself will emit debug messages, but rather it will enable debugging of the following components:

Kata Container - set debug=true on various sections of the kata's configuration toml (https://github.com/kata-containers/kata-containers/blob/main/tools/packaging/kata-deploy/scripts/kata-deploy.sh#L163)
Containerd (https://github.com/kata-containers/kata-containers/blob/main/tools/packaging/kata-deploy/scripts/kata-deploy.sh#L367)
Cri-o (https://github.com/kata-containers/kata-containers/blob/main/tools/packaging/kata-deploy/scripts/kata-deploy.sh#L338)

Good eyes. Well, one passing condition could be to check that all 3 of those files have debug enabled. It's a little error-prone, crude, etc., but that would work for now.

Good eyes. Well, one passing condition could be to check that all 3 of those files have debug enabled. It's a little error-prone, crude, etc., but that would work for now.

Yep, I had the same thing in mind :)


Improve our most popular content so that we can drive developer activation

Prioritization:
Most read documentation
/docs/articles/sites/code/using-the-pantheon-workflow/
/docs/articles/users/importing-an-existing-site/
/docs/articles/local/git-faq/
/docs/articles/local/drush-command-line-utility/
/docs/articles/sites/code/redirect-incoming-requests/
/docs/articles/drupal/configuring-settings-php/
/docs/articles/sites/domains/dns-records-for-directing-your-domain-to-your-pantheon-site/
/docs/articles/users/generating-ssh-keys/
Created by Brian.

Wrong repo.


Recent intermittent BCP-003-01 failures on Windows asio platform

The Google Sheet shows that since c3f0cf7 five of the BCP-003-01 tests have been failing intermittently on the Windows asio build, where they haven't before. These are all tests that run testssl.sh with:
-S, --server-defaults         displays the server's default picks and certificate info

(https://github.com/drwetter/testssl.sh/wiki/Usage-Documentation)
In order to avoid running testssl.sh multiple times unnecessarily, the test suite caches the results with the same command line arguments, and we can see from the results that some times all five tests that ask for -S report DISABLED (test_03, test_05, test_06, test_08, test_09, some times the first four or fewer, and once, it obviously succeeded at the first attempt.
Since this doesn't happen on the non-asio Windows build, it would appear not to be related to how testssl.sh is run on Windows, and since it didn't happen at c3f0cf7 or earlier, it would appear to be related to PR #183. Perhaps the cert files are being read and the certs becoming available later or something?
The test suite is running testssl.sh with --openssl-timeout (see https://github.com/drwetter/testssl.sh/commit/a288954d36f80f2745ccbf0af8a4d12b16ecc070) set based on CONFIG.HTTP_TIMEOUT which is 1 second by default (and I don't think is changed by nmos-cpp CI). I wonder if the test suite could be improved to detect and distinguish timeout from other issues with testssl.sh... See https://man7.org/linux/man-pages/man1/timeout.1.html (in which timeout --preserve-status used by the above is documented) and https://github.com/AMWA-TV/nmos-testing/blob/2c8bb19fb06160be64da04041e39f997e1914d2e/nmostesting/suites/BCP00301Test.py#L63.

Here are what we found:

Running tests locally - test-suite on WSL 18.04 (WSL 1) and WSL 20.04  (WSL 2)
Pass - using memory buffer and file-based asio interfaces to load certificates.

Running tests on GitHub - test-suite on WSL 20.04
Fail - using memory buffer asio interface
Pass - using file-based asio interface

Running tests on GitHub - test-suite on WSL 18.04
Pass - using memory buffer asio interface
Pass - using file-based asio interface

Note: changing testssl.sh --openssl-timeout (CONFIG.HTTP_TIMEOUT) to 10s does not help.
In our case, according to MS, it would be better to use WSL 1 than WSL 2.

Your project files must be stored in the Windows file system. WSL 1 offers faster access to files mounted from Windows.
If you will be using your WSL Linux distribution to access project files on the Windows file system, and these files cannot be stored on the Linux file system, you will achieve faster performance across the OS files systems by using WSL 1.

See https://docs.microsoft.com/en-us/windows/wsl/compare-versions#exceptions-for-using-wsl-1-rather-than-wsl-2

Fixed by 58aa4d20ccada0636fac0d8580b1abe8635e102f


bug fix

The methods with Base.- were incorrect (and not needed) since -(::AbstractSciMLOperator) isa ScaledOperator, and that has no field ops

@ChrisRackauckas

and version bump pls


Project does not load

Saved project raised python error when trying to load. Unfortunately I wasn't able to reliably reproduce this. This is project using the Waxholm atlas and loading a single .tif slice, doing a single round of matching, and then trying to add a few probe locations in the atlas view.
Download link of project
Traceback (most recent call last):
  File "C:\Users\...\anaconda3\lib\site-packages\herbs\herbsgui.py", line 5487, in load_project_called
    p_dict = pickle.load(infile)
EOFError: Ran out of input

Hello,
I am also having the same issue as this - some of the projects I load works but others give this 'ran out of input error'. Is there a solution?
Brilliant software otherwise!

Hello,
I am also having this issue.  I had previously registered a .tif file to the Allen Atlas with a few labelled cell bodies. the project was saved but when attempting to open the project again, I get the error message shown below.
EOFError                                  Traceback (most recent call last)
File ~/opt/anaconda3/envs/HERBS/lib/python3.8/site-packages/herbs/herbsgui.py:5733, in HERBS.load_project_called(self)
   5731 try:
   5732     infile = open(project_path[0], 'rb')
-> 5733     p_dict = pickle.load(infile)
   5734     infile.close()
   5735 except (IOError, OSError, pickle.PickleError, pickle.UnpicklingError):

EOFError: Ran out of input

Thank you all for the feedback! I answered @torbenott in other issues he opened that I noticed the problem. Will update the code next week. But I just realised that it is autumn holiday next week in Norway, I probably will have limited working hours. I will try my best to debug the problem, and try to fix it in 2 weeks.
It will be great help for me If @rjp109 you could let me know what you did that the loaded project works and what did that the loaded project not work. I mean what kind of steps you did before saving the projects. Many thanks in advance.

Hi @JingyiGF,
I'm afraid I can't identify any differences for what i did with the projects that load compared to the ones that don't (but the vast majority do not load). I am using herbs to identify probe location, so I load the atlas, load my image, use the triangulation to map the image onto the atlas, add the probe location, and then save the project. I also can't load objects that i have saved either, i get the same error.
Help with this would be much appreciated,
Thanks,
Ross

Thank you all for the feedback and updates last week. I just update the code on GitHub and PyPI and hopefully this fixed the problem about loading a project and objects. Let me know if something went wrong. Many thanks!

Hello,
Unfortunately it is still not working for me. Now I get a different error:
Traceback (most recent call last):
File "C:\Users\rp17047\PycharmProjects\pythonProject\venv\lib\site-packages\herbs\herbsgui.py", line 4726, in load_objects
object_dict, msg = check_loading_pickle_file(object_file_path[0][i])
ValueError: too many values to unpack (expected 2)
I'm running HERBS on PyCharm.

or this error for loading a project:
Traceback (most recent call last):
File "C:\Users\rp17047\PycharmProjects\pythonProject\venv\lib\site-packages\herbs\herbsgui.py", line 5390, in load_project_called
p_dict, msg = check_loading_pickle_file(project_path[0])
ValueError: too many values to unpack (expected 2)

did you load the saved projects or objects? if so, it will not work. as the problem before when you can load. projects or objects was not actually loading problem. it was actually a saving problem. I saved some thing that can not be pickled.
Could you please try to save new objects and projects and load?

Ah ok, I was trying to load previously saved projects. I guess I will need to re-do and re-save my projects then.
Thank you for the help.

sorry for the inconvenience. I hope I fixed the problem this time. let me know if something went wrong. and looking forward to your feedback :-)

Hello,
I can load the project fine now thank you. However I am now having a new issue when trying to merge probe parts. I typically load an image, map to atlas, add probe part, save. Then load next image, repeat. But when i try to merge the parts i get the following error (which i was not getting before):
Traceback (most recent call last):
File "C:\Users\rp17047\PycharmProjects\pythonProject\venv\lib\site-packages\herbs\herbsgui.py", line 4193, in merge_probes
info_dict = calculate_probe_info(data[i], label_data, self.atlas_view.label_info,
File "C:\Users\rp17047\PycharmProjects\pythonProject\venv\lib\site-packages\herbs\uuuuuu.py", line 402, in calculate_probe_info
new_sp = correct_start_pnt(label_data, start_pnt, start_vox, direction)
File "C:\Users\rp17047\PycharmProjects\pythonProject\venv\lib\site-packages\herbs\uuuuuu.py", line 162, in correct_start_pnt
return new_sp
UnboundLocalError: local variable 'new_sp' referenced before assignment

Another more minor point, when loading a project, i can no longer get the atlas overlay to show up over the image, regardless of composition selected or opacity used.

Hello, I can load the project fine now thank you. However I am now having a new issue when trying to merge probe parts. I typically load an image, map to atlas, add probe part, save. Then load next image, repeat. But when i try to merge the parts i get the following error (which i was not getting before):
Traceback (most recent call last): File "C:\Users\rp17047\PycharmProjects\pythonProject\venv\lib\site-packages\herbs\herbsgui.py", line 4193, in merge_probes info_dict = calculate_probe_info(data[i], label_data, self.atlas_view.label_info, File "C:\Users\rp17047\PycharmProjects\pythonProject\venv\lib\site-packages\herbs\uuuuuu.py", line 402, in calculate_probe_info new_sp = correct_start_pnt(label_data, start_pnt, start_vox, direction) File "C:\Users\rp17047\PycharmProjects\pythonProject\venv\lib\site-packages\herbs\uuuuuu.py", line 162, in correct_start_pnt return new_sp UnboundLocalError: local variable 'new_sp' referenced before assignment

I also encounter this error in version 19. Works fine in version 18.

Thank you all for the updates. Yup, I have checked the code, and found I for some reason changed the order of the code at some point. This can happen when the start point is very close to the boundary. You must be very lucky and did very nice job :-)
I rewrote the code for this part this morning and updated on GitHub. will update on PyPI later today. Trying to finish the code for user defined atlas while sick kiddo next to me at home now. Will update you when I upload to PyPI.
Also fixed the atlas boundary problem. The boundary layer was lower than overlay layer. so if you decreased the opacity for the overlay, you would see the boundary. Now I put the boundary layer above to the overlay layer, so you can see boundary without changing opacity.
Thanks for the update and feedback again 😊

Update the code on PyPI now with the user defined atlas processor and tutorial. Let me know if it works fine :-)

Hi,
Sorry to bother again, This works for some of my probes, but for others I'm still getting an error when trying to merge probe pieces:
Traceback (most recent call last):
File "C:\Users\rp17047\PycharmProjects\pythonProject\venv\lib\site-packages\herbs\herbsgui.py", line 4193, in merge_probes
info_dict = calculate_probe_info(data[i], label_data, self.atlas_view.label_info,
File "C:\Users\rp17047\PycharmProjects\pythonProject\venv\lib\site-packages\herbs\uuuuuu.py", line 473, in calculate_probe_info
left_merged_labels, left_merged_colors, left_block_count = block_same_label_one_side(
File "C:\Users\rp17047\PycharmProjects\pythonProject\venv\lib\site-packages\herbs\uuuuuu.py", line 371, in block_same_label_one_side
merged_labels = [sites_label_one_side[0]]
IndexError: index 0 is out of bounds for axis 0 with size 0

Hi @rjp109, thank you for your feedback. this is an error from another function, I am really curious where you put the probe. Could you please paste a screen shot of the probe? and which atlas are you using?

Hello,
Images attached. I am trying to merge a probe spanning two sections in the prefrontal area using the waxholm space rat atlas V4

can you also list the page number? So I can reproduce the same error to check? Many thanks for the figures!

Yep, its 716 and 727.

I wonder if it is because it is limited to only two sections which may be too far apart, so it struggles to create a linear trajectory of the probe when merging..?

I can re-produce the same error. Will fix it and come back to you later today.

code update on GitHub, I will update on PyPI next week.

Great, thank you very much for your help and quick response!

Hi, I'm having an issue loading a saved project as well, so I'm posting it here but let me know if I should open a separate issue.
This occurs with HERBS installed from the Github code, updated yesterday (October 24).
Here's the error output:
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
File D:\Code\HERBS\herbs\herbsgui.py:5407, in HERBS.load_project_called(self)
   5402         self.delete_all_atlas_layer()
   5404     # if self.image_view.image_file is not None:
   5405     #     self.delete_all
-> 5407     self.load_project(p_dict)
   5409 else:
   5410     self.print_message('', self.normal_color)

File D:\Code\HERBS\herbs\herbsgui.py:5183, in HERBS.load_project(self, p_dict)
   5181 if self.current_atlas == 'volume':
   5182     if self.current_atlas_path is not None:
-> 5183         self.load_volume_atlas(self.current_atlas_path)
   5185     self.atlas_display = atlas_ctrl_data['atlas_display']
   5187     if self.atlas_display == 'coronal':

File D:\Code\HERBS\herbs\herbsgui.py:4603, in HERBS.load_volume_atlas(self, atlas_folder)
   4599 boundary = {'s_contour': s_boundary, 'c_contour': c_boundary, 'h_contour': h_boundary}
   4601 self.set_volume_atlas_to_view(atlas_data, segmentation_data, atlas_info, label_info, boundary)
-> 4603 self.set_volume_atlas_3d(unique_label, meshdata, small_meshdata_list)

File D:\Code\HERBS\herbs\herbsgui.py:4517, in HERBS.set_volume_atlas_3d(self, unique_label, meshdata, small_meshdata_list)
   4515 if id in self.atlas_view.label_info['index']:
   4516     color_to_set = self.atlas_view.label_info['color'][(self.atlas_view.label_info['index'] == id)][0] / 255
-> 4517     mesh = gl.GLMeshItem(meshdata=small_meshdata_list[str(id)], smooth=True,
   4518                          color=(color_to_set[0], color_to_set[1], color_to_set[2], 0.8), shader='balloon')
   4519     mesh.setGLOptions('opaque')
   4520     mesh.translate(-mesh_origin[0], -mesh_origin[1], -mesh_origin[2])

KeyError: '545'

Thanks

Hi @vncntprvst , thank you for the feedback and very clear error trace. I wonder if you download and process the atlas using the new code? Or the atlas was processed some time ago? brain region with label id '545' covers only 2 voxels, which can not merge to a 3d mesh object. If you processed the atlas some time ago, could you please re-download and re-process the atlas and try again? If you processed the atlas using the new code, I will have a closer look at it. Thanks.

Hi Jingyi.
The atlas was processed with an older version of the code. I'll download and re-process the atlas and let you know how it goes.
Thanks.

It does work now. Thanks for the help!


Updated prompting docs

What type of PR is this? (check all applicable)

[ ] Refactor
[ ] Feature
[ ] Bug Fix
[ ] Optimization
[ ] Documentation Update
[ ] Community Node Submission

Have you discussed this change with the InvokeAI team?

[ ] Yes
[ ] No, because:

Have you updated all relevant documentation?

[ ] Yes
[ ] No

Description
Related Tickets & Documents

Related Issue #
Closes #

QA Instructions, Screenshots, Recordings

Added/updated tests?

[ ] Yes
[ ] No : please replace this line with details on why tests
have not been included

[optional] Are there any post deployment tasks we need to perform?

Meant to open this against my fork, not the upstream


Display locked token balance breakdown on Account Detail page

Overview
Related issue in Wallet: https://github.com/near/near-wallet/issues/481
We display "locked" balance, which is the amount staked. We should also display the other types of locked balances:

Vesting

Several community members (NEAR team, contributors) have tokens that vest over time, and will be unlocked linearly, block by block

State stake (Minimum Balance)

There is a minimum required balance (NEP #40) for all accounts. This can only be transferred by deleting the account

Staking
Delegating

Story
As a user, I want to view both my active and locked (vesting, state staked, delegated, staked) token balances, so I can understand the quantity of tokens that are fully usable and transferrable.
Acceptance Criteria

[ ] Total NEAR balance (available+locked) is visible
[ ] Available NEAR balance is visible (total - locked)
[ ] Locked NEAR balance is visible, and broken down into

[ ] Staked
[ ] Minimum Balance (storage_used * cost_per_byte)
[ ] Vesting
[ ] Delegating

[ ] Difference between locked and available is explained
[ ] Minimum balance is explained
[ ] Mobile ok
[ ] Tested

Change "Locked" to "Staked Balance"
Add "Lockup Balance" for a lockup contract

Add help messages to those briefly describing the balance type and link to a relevant documentation page

Where can we get "Lockup Balance"?

lockup contract:  |  |  |

what is link to it and lockup details you mentioned? @ilblackdragon

@icerove Here is the line in the wallet which computes the lockup account name: https://github.com/near/near-wallet/blob/master/src/utils/wallet.js#L601
LOCKUP_ACCOUNT_ID_SUFFIX = lockup.near for mainnet

From this line, what I can know is that I can not reverse account ID from lockup ID. I do not know how to get lockup balance for now since I can not know which account is lockup, right? @kcole16 @ilblackdragon

From this line, what I can know is that I can not reverse account ID from lockup ID

Lockup contract has get_owner_account_id view method: https://github.com/near/core-contracts/blob/215d4ed2edb563c47edd961555106b74275c4274/lockup/src/getters.rs#L9

I do not know how to get lockup balance for now since I can not know which account is lockup, right?

If a given account id ends with the LOCKUP_ACCOUNT_ID_SUFFIX (.lockup.near on mainnet), it is a lockup contract, otherwise, use the function to compute the lockup account id from the given account id and try calling the view methods on it. There are various methods on the lockup contract; Wallet displays it in the finest break down [get_owners_balance, get_liquid_owners_balance, get_locked_amount] (read the documentation comments on those); I believe we should just display the get_balance on Explorer side and link to https://wallet.near.org/profile/<account_id> for the breakdown.

otherwise, use the function to compute the lockup account id from the given account id and try calling the view methods on it.

This only works for a certain amount of lockups deployed on mainnet. In general there is not necessarily any relationship between the owner account id and the lockup account id.

@bowenwang1996 If I read this correctly, this means that to implement it 100% correctly, we need to implement Indexer for lockup contracts drawing the relationships to their owners, right?

@bowenwang1996 If I read this correctly, this means that to implement it 100% correctly, we need to implement Indexer for lockup contracts drawing the relationships to their owners, right?

That is correct.

Our implementation in the wallet is pretty naive, in that it just checks for a lockup for the currently selected account, and shows it if it exists.
A complete solution in Explorer should deal with the case of the lockup itself, and also further naming conventions (whichever those end up being). That being said, I think for this pass it is fine to have a one-way lookup. This will solve 100% of the questions we are currently receiving from users.

Given Wallet has the same naive approach, I think we should at least implement it this way in Explorer for now. We are currently deploying the initial version of Indexer for Explorer on testnet, and I think this naive implementation can be implemented before we settle down on Indexer for Explorer on mainnet and Explorer frontend updated to the new data source (SQLite -> Postgres with some data structure changes)

As pointed out in the message - you can grab code that pulls all lockup details (finding account, getting internal state, showing vesting/lockup) from here https://github.com/near/account-lookup

https://github.com/near/near-explorer/issues/291#issuecomment-705661921
To be clear, I don't think we need this - I think we should just show the state of the lockup on the account itself.
E.g. we just use code above to fetch the state from lockup and don't need to do anything the other way.

This only works for a certain amount of lockups deployed on mainnet. In general there is not necessarily any relationship between the owner account id and the lockup account id.

@bowenwang1996 you are wrong, all lockups respect this relationship.

@icerove Let me give you the exact values:
Minimum Balance = cost_per_byte [RPC EXPERIMENTAL_genesis_config] multiplied by storage_used [RPC query(view_account)]
Staked Balance = locked [RPC query(view_account)]
Liquid Balance = minimum of two(amount OR (amount [RPC query(view_account)] plus Staked Balance minus Minimum Balance))
Lockup Balance = make a view-call to the lockup contract method get_balance
Total Balance = amount plus Staked Balance plus Lockup Balance
Let's skip Vesting and Delegating balances for now (unless someone considers them to be crucial for Explorer).

Hm, I think liquid balance calculation is wrong - it's amount - min(staked balance, minimum balance)
e.g. https://wallet.near.org/profile/illia.near Available Balance here.
Also we should prob use the same terms across all this places.

@ilblackdragon your liquid (immediately available) balance formula does not make sense to me 🤔
The liquid balance is something that you can spend immediately, but the amount provided by RPC includes the liquid balance for storage. The full balance for storage is (cost-per-byte * storage-used), but if you stake some tokens, those are accounted as ones that cover storage, and liquid balance for storage is max(0, balance for storage - staked).
The liquid balance is (amount - liquid balance for storage) = (amount - max(0, full balance for storage - staked)) = min(amount, amount + staked - full balance for storage)
Let me know if I miss something

@frol hmm I think the amount returned in rpc does not include staked balance (which is returned as locked). So the liquid balance should simply be amount - storage cost? Did I miss something here?

@bowenwang1996 you are wrong, all lockups respect this relationship.

Yes I was wrong. On mainnet all lockups respect this relationship, but I wanted to say that in general there is nothing enforcing such relationship. However it appears that we want to make this a standard (from my conversation with @ilblackdragon )

hmm I think the amount returned in rpc does not include staked balance (which is returned as locked).

Correct

So the liquid balance should simply be amount - storage cost? Did I miss something here?

@bowenwang1996  Almost correct (please, refer to my comment above).
The liquid balance is amount - liquid storage cost
liquid storage cost is the storage cost that is not covered by the balance locked for stake
@evgenykuzyakov we need your final word here

liquid storage cost is the storage cost that is not covered by the balance locked for stake

Why? Balance locked for stake can also be used to cover storage cost

Can we make at least basic UI change for this?
E.g. change current "Locked" to "Staked". And add a section of "Locked" to query associate lockup contract if it is present.
As I mentioned, we have a lot of people confused with where are their tokens.

Minimum Balance = cost_per_byte [RPC EXPERIMENTAL_genesis_config] multiplied by storage_used [RPC query(view_account)]

I see many cost_per_byte here and they are different numbers, which one should I use for that? @frol

@icerove it is "runtime_config"."storage_amount_per_byte", sorry for the confusion


Fix the bottom nav location

Task:
Make sure the bottom nav is in the correct location on the homepage.
(Left: What's on our website// Right: What it should look like)

@wonilsuhibm @jeffchew Can you two take a look at this and see if this is something we can get the fix in before the release this Friday?
FYI - @RobertaJHahn

This issue may be fixed by upgrading to the current Carbon Gatsby version.

@wonilsuhibm @jacobottesen-dgc
I clicked around and it looks fine to me but for testing purposes. Can you two help by clicking around the website via the bottom nav to see if anything broke before we merge the change?
Deploy preview link is here:
https://ibmdotcom-library.s3.us-south.cloud-object-storage.appdomain.cloud/deploy-previews/413/index.html

The resource card on the homepage is gone. Do we want that?

@jacobottesen-dgc Yes, we do. So weird, it was there earlier.
@kennylam Can you help by taking a look? I am not sure if this has anything to do with the image update we talked about earlier.
Thank you!

Issue moved to carbon-design-system/ibm-dotcom-library-website #430 via ZenHub


[Numpy] Update QA Dataset and revise run_squad

Description

[x] Downlaod script supports SearchQA, TriviaQA and HotpotQA
[x] Update the squad results of Electra Model
[x] revise the run_squad.py and implement the evaluation utils cloned from offical sciprt

Comments
We are not going to provide the downlaod script for Microsoft NewsQA and Google Natural Questions
cc @dmlc/gluon-nlp-team

CI needs fixing.

@szha  Seems that our test cases triggers some internal problems in MXNet.

@ZheyuYe Would you help upload this file to S3 and revise the link  https://github.com/dmlc/gluon-nlp/blob/85b6f0927c5417516e9daa26cde8256b169f33d8/src/gluonnlp/data/filtering.py#L195-L199? This is for language identification using fasttext.


CLose out Splash Buddy,  keeps reappearing

I just tested the app and opened it,  I'm able to  use command, alt Q to quit, but keeps reopening.  I've rebooted in to safe mode, closed all apps, but when i reboot eventually splashbuddy keeps appearing.  I've deleted it from apps, the unzipped folder.  Any other instances where it may be hiding out.

Library/Application Support/SplashBuddy/

Marking issue as closed since it was resolved.


Extracting local variables and reconstructing causes conflicts with parameter names

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: 1.87.2
OS Version: Windows11
-Language：java
Steps to Reproduce:

select "5"
click “Refacator-Extract local variable”
new variable name " localVar"

public class Example {
public void method(int localVar) {
// extract variable: 5, rename localVar
System.out.println(5);
}
}
refactoring result:
Reason: When extracting local variables, there was no detection of naming conflicts between the new variable name and the context
Expected behavior: Check for naming conflicts before and after refactoring, and provide warning prompts

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.88.1. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

/extJava

It looks like this is caused by the Java extension. Please file the issue to the Java extension repository. Make sure to check their troubleshooting instructions and provide relevant information such as the extension version you're using. See also our issue reporting guidelines for more information.
Happy Coding!


Update webext-dynamic-content-scripts

Hello, I recently updated the script to make it more reliable and even easier to use, so I thought I'd send you a PR 🎉

The build is failing because webpack needs to be updated. PR pending: https://github.com/lvarayut/github-file-icons/pull/7

(updating)

Perfect, thanks :)


Consider creating an aws package

As a lib User
I want aws-specific code package
So I don't misuse entities therein

Might move these two:

recruitment.agency.aws.Broker
recruitment.agency.aws.Config

while the following classes remain in same position:

recruitment.agency.Agent
recruitment.agency.Consumer
recruitment.agency.Publisher

it becomes clear that only the Broker and Config objects depend on AWS. Future iterations could seem addition of other "agencies"--e.g. "azure", "google", etc

google's pub/sub lib

azure's pub/sub lib

tabling this until a GCP Broker is created


docs(storybook): Add templates for authentication pages

Summary
Implements the USWDS authentication page templates in Storybook.
Related Issues or PRs
Closes #1102
How To Test

yarn lint and verify no errors appear.
In storybook, view the three files in "Authentication pages" folder located in the "Templates" section, and verify that they match the USWDS implementations for

Create account
Sign in
Multiple sign in options

Warnings

:warning:
This PR does not include changes to tests, even though it affects source code.

  Generated by :no_entry_sign: dangerJS against 7c99c8d308c98d918f75bcb243fca996d9174479


Change DAS-board to DILCIS

DAS-board is mentioned 9 times.
Change to DILCIS.

DAS Board -> DILCIS renaming was done in ver 1.1 of the CS IP. Hope to have v1.1 also on GitHub by the end of July..


Keep getting AuthenticationError: Error code: 401 - {'statusCode': 401, 'message': 'Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired.'}

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.

Example Code
import os
from langchain.schema import SystemMessage, HumanMessage
from langchain_openai import AzureChatOpenAI
from langchain.callbacks import get_openai_callback
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
AZURE_OPENAI_API_KEY = os.getenv("AZURE_OPENAI_API_KEY")
Create an instance of chat llm
llm = AzureChatOpenAI(
azure_endpoint=azure_endpoint,
api_key = AZURE_OPENAI_API_KEY,
api_version="2023-05-15",
azure_deployment="gpt-3.5-turbo",
model="gpt-3.5-turbo",
)
messages = [
SystemMessage(
content=(
"You are ExpertGPT, an AGI system capable of "
"anything except answering questions about cheese. "
"It turns out that AGI does not fathom cheese as a "
"concept, the reason for this is a mystery."
)
),
HumanMessage(content="Tell me about parmigiano, the Italian cheese!")
]
with get_openai_callback() as cb:
res = llm.invoke(messages)

# print the response
print(res.content)

# print the total tokens used
print(cb.total_tokens)

Error Message and Stack Trace (if applicable)
HTTP Request: POST https://oxcxxxxxxx-dev.openai.azure.com/openai/deployments/gpt-3.5-turbo/chat/completions?api-version=2023-05-15 "HTTP/1.1 401 Unauthorized"
DEBUG:httpcore.http11:receive_response_body.started request=<Request [b'POST']>
receive_response_body.started request=<Request [b'POST']>
DEBUG:httpcore.http11:receive_response_body.complete
receive_response_body.complete
DEBUG:httpcore.http11:response_closed.started
response_closed.started
DEBUG:httpcore.http11:response_closed.complete
response_closed.complete
DEBUG:openai._base_client:HTTP Request: POST https://oxcxxxxxxx-dev.openai.azure.com/openai/deployments/gpt-3.5-turbo/chat/completions?api-version=2023-05-15 "401 Unauthorized"
HTTP Request: POST https://oxcxxxxxxx-dev.openai.azure.com/openai/deployments/gpt-3.5-turbo/chat/completions?api-version=2023-05-15 "401 Unauthorized"
DEBUG:openai._base_client:Encountered httpx.HTTPStatusError
Traceback (most recent call last):
File "/home/mlakka/.local/lib/python3.10/site-packages/openai/_base_client.py", line 959, in _request
response.raise_for_status()
File "/home/mlakka/.local/lib/python3.10/site-packages/httpx/_models.py", line 759, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://oxcxxxxxxx-dev.openai.azure.com/openai/deployments/gpt-3.5-turbo/chat/completions?api-version=2023-05-15'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
Encountered httpx.HTTPStatusError
Traceback (most recent call last):
File "/home/mlakka/.local/lib/python3.10/site-packages/openai/_base_client.py", line 959, in _request
response.raise_for_status()
File "/home/mlakka/.local/lib/python3.10/site-packages/httpx/_models.py", line 759, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://oxcxxxxxxx-dev.openai.azure.com/openai/deployments/gpt-3.5-turbo/chat/completions?api-version=2023-05-15'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
DEBUG:openai._base_client:Not retrying
Not retrying
DEBUG:openai._base_client:Re-raising status error
Re-raising status error
Error is coming from here
Description
My key works for other calls but with langchain is not working and giving the above error. Please help. By the way, I am using Azure open ai
AuthenticationError                       Traceback (most recent call last)
Cell In[6], line 32
18 messages = [
19     SystemMessage(
20         content=(
(...)
27     HumanMessage(content="Tell me about parmigiano, the Italian cheese!")
28 ]
30 with get_openai_callback() as cb:
---> 32     res = llm.invoke(messages)
34     # print the response
35     print(res.content)
File ~/.local/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py:166, in BaseChatModel.invoke(self, input, config, stop, **kwargs)
155 def invoke(
156     self,
157     input: LanguageModelInput,
(...)
161     **kwargs: Any,
162 ) -> BaseMessage:
163     config = ensure_config(config)
164     return cast(
165         ChatGeneration,
--> 166         self.generate_prompt(
167             [self._convert_input(input)],
168             stop=stop,
169             callbacks=config.get("callbacks"),
170             tags=config.get("tags"),
171             metadata=config.get("metadata"),
172             run_name=config.get("run_name"),
173             **kwargs,
174         ).generations[0][0],
175     ).message
File ~/.local/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py:544, in BaseChatModel.generate_prompt(self, prompts, stop, callbacks, **kwargs)
536 def generate_prompt(
537     self,
538     prompts: List[PromptValue],
(...)
541     **kwargs: Any,
542 ) -> LLMResult:
543     prompt_messages = [p.to_messages() for p in prompts]
--> 544     return self.generate(prompt_messages, stop=stop, callbacks=callbacks, **kwargs)
File ~/.local/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py:408, in BaseChatModel.generate(self, messages, stop, callbacks, tags, metadata, run_name, **kwargs)
406         if run_managers:
407             run_managers[i].on_llm_error(e, response=LLMResult(generations=[]))
--> 408         raise e
409 flattened_outputs = [
410     LLMResult(generations=[res.generations], llm_output=res.llm_output)
411     for res in results
412 ]
413 llm_output = self._combine_llm_outputs([res.llm_output for res in results])
File ~/.local/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py:398, in BaseChatModel.generate(self, messages, stop, callbacks, tags, metadata, run_name, **kwargs)
395 for i, m in enumerate(messages):
396     try:
397         results.append(
--> 398             self._generate_with_cache(
399                 m,
400                 stop=stop,
401                 run_manager=run_managers[i] if run_managers else None,
402                 **kwargs,
403             )
404         )
405     except BaseException as e:
406         if run_managers:
File ~/.local/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py:577, in BaseChatModel._generate_with_cache(self, messages, stop, run_manager, **kwargs)
573     raise ValueError(
574         "Asked to cache, but no cache found at langchain.cache."
575     )
576 if new_arg_supported:
--> 577     return self._generate(
578         messages, stop=stop, run_manager=run_manager, **kwargs
579     )
580 else:
581     return self._generate(messages, stop=stop, **kwargs)
File ~/.local/lib/python3.10/site-packages/langchain_openai/chat_models/base.py:451, in ChatOpenAI._generate(self, messages, stop, run_manager, stream, **kwargs)
445 message_dicts, params = self._create_message_dicts(messages, stop)
446 params = {
447     **params,
448     **({"stream": stream} if stream is not None else {}),
449     **kwargs,
450 }
--> 451 response = self.client.create(messages=message_dicts, **params)
452 return self._create_chat_result(response)
File ~/.local/lib/python3.10/site-packages/openai/_utils/_utils.py:275, in required_args..inner..wrapper(*args, **kwargs)
273             msg = f"Missing required argument: {quote(missing[0])}"
274     raise TypeError(msg)
--> 275 return func(*args, **kwargs)
File ~/.local/lib/python3.10/site-packages/openai/resources/chat/completions.py:663, in Completions.create(self, messages, model, frequency_penalty, function_call, functions, logit_bias, logprobs, max_tokens, n, presence_penalty, response_format, seed, stop, stream, temperature, tool_choice, tools, top_logprobs, top_p, user, extra_headers, extra_query, extra_body, timeout)
611 @required_args(["messages", "model"], ["messages", "model", "stream"])
612 def create(
613     self,
(...)
661     timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
662 ) -> ChatCompletion | Stream[ChatCompletionChunk]:
--> 663     return self._post(
664         "/chat/completions",
665         body=maybe_transform(
666             {
667                 "messages": messages,
668                 "model": model,
669                 "frequency_penalty": frequency_penalty,
670                 "function_call": function_call,
671                 "functions": functions,
672                 "logit_bias": logit_bias,
673                 "logprobs": logprobs,
674                 "max_tokens": max_tokens,
675                 "n": n,
676                 "presence_penalty": presence_penalty,
677                 "response_format": response_format,
678                 "seed": seed,
679                 "stop": stop,
680                 "stream": stream,
681                 "temperature": temperature,
682                 "tool_choice": tool_choice,
683                 "tools": tools,
684                 "top_logprobs": top_logprobs,
685                 "top_p": top_p,
686                 "user": user,
687             },
688             completion_create_params.CompletionCreateParams,
689         ),
690         options=make_request_options(
691             extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
692         ),
693         cast_to=ChatCompletion,
694         stream=stream or False,
695         stream_cls=Stream[ChatCompletionChunk],
696     )
File ~/.local/lib/python3.10/site-packages/openai/_base_client.py:1200, in SyncAPIClient.post(self, path, cast_to, body, options, files, stream, stream_cls)
1186 def post(
1187     self,
1188     path: str,
(...)
1195     stream_cls: type[_StreamT] | None = None,
1196 ) -> ResponseT | _StreamT:
1197     opts = FinalRequestOptions.construct(
1198         method="post", url=path, json_data=body, files=to_httpx_files(files), **options
1199     )
-> 1200     return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File ~/.local/lib/python3.10/site-packages/openai/_base_client.py:889, in SyncAPIClient.request(self, cast_to, options, remaining_retries, stream, stream_cls)
880 def request(
881     self,
882     cast_to: Type[ResponseT],
(...)
887     stream_cls: type[_StreamT] | None = None,
888 ) -> ResponseT | _StreamT:
--> 889     return self._request(
890         cast_to=cast_to,
891         options=options,
892         stream=stream,
893         stream_cls=stream_cls,
894         remaining_retries=remaining_retries,
895     )
File ~/.local/lib/python3.10/site-packages/openai/_base_client.py:980, in SyncAPIClient._request(self, cast_to, options, remaining_retries, stream, stream_cls)
977         err.response.read()
979     log.debug("Re-raising status error")
--> 980     raise self._make_status_error_from_response(err.response) from None
982 return self._process_response(
983     cast_to=cast_to,
984     options=options,
(...)
987     stream_cls=stream_cls,
988 )
AuthenticationError: Error code: 401 - {'statusCode': 401, 'message': 'Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com/), or have expired.'}
System Info
openai==1.12.0
langchain==0.1.6
langchain-community==0.0.19
langchain-core==0.1.22
langchain-openai==0.0.5

I am also facing same issue

Hi @sagardhakate and @lenka1 all you need to do is to make sure you set the environment variables with following names..
it would work fine..
os.environ["AZURE_OPENAI_API_KEY"] = "your auzre api key "
os.environ["AZURE_OPENAI_ENDPOINT"] = "your end point url "

@HimanshuParmarMoodys : your solution doesn't support the other authentication mechanism on Azure : using Azure AD

Check your API Keys and Endpoint. I've found after researching every stuff. My token was not correct! Version is not the problem mostly, instead credentials are. So pls check yours.

Do you happen to have any news? I'm seeing the same problem. in my case, It only happens after the ChatModel lives for a while, and it's resolved after I restart my application (i.e creating a new instance). Seems like the inner client needs to be re-authenticated after some time.

I face the same issue too. Start getting this error after a few runs. Is there a way to auto authenticate the client internally ?
And has anyone figured out the root cause of this why its happening.


Android 64bit and iOS 64bit architecture not supported

Hello Team, I am using this plugin to detect the digits. It is working fine in the editor and Android ARMv7. But I am getting issue with Android ARM64 and iOSARM64. Can you please help me? Thanks in advance!

Hi!
We encountered the same issue.
Could you help us with how to fix it? thank you very much!


[5.1] [Swift] The AST printer now qualifies type names more consistently

Cherry-pick of #1417 to the 5.1 branch. Reviewed by @dcci and @adrian-prantl.

apple/swift#23666
@swift-ci Please test


Update walletconnect/dapp page

doc link: https://developer.trustwallet.com/wallet-connect/dapp
@trustwallet/walletconnect was deprecated, we can simply suggest user to use official walletconnect lib, and add helpers (https://github.com/trustwallet/web-core/blob/master/packages/walletconnect/src/index.ts)  to the sample code

Hi Team.
Would you mind advising ETA of this issue? Your reply is much appreciated.

@leoneparise will work on this soon

Thank you @hewigovens
@leoneparise Kindly let me know once docs are updated!

@leoneparise it would be greatly appreciated if you can add a timelock order's sample code on the docs as well :D

So how much of the page is outdated now?
https://developer.trustwallet.com/wallet-connect/dapp#sign-transaction -- how should do I do that now?
And are there new methods? Such as "send transaction", not just sign.
The repository you linked for helpers is marked read-only. Is that really where I'm supposed to use stuff from?
Would love to see some examples.

Hi @hewigovens @leoneparise  @losnappas
May I know ETA for updating docs for Dapp page?


Support Django >= 1.9

django.utils.log.getLogger does not appear to have been part of the public API, and no longer works.
django.utils.importlib was deprecated and has been removed.

Dropped the django dependency..


core: add various stream utilities

Useful for returning generators from collections and manipulating them in a lazy way, Haskell/LINQ style

Closing as std::view utilities would do the same things more elegantly


Question

Hello author, thank you for sharing your code! I noticed that the paper mentions using FPS downsampling and KNN search on the original point cloud, but I couldn't find the corresponding parts in the provided code. Do you know where these parts are located? Thank you.

Hi. For FPS downsampling, we get the keypoints from the keypoint file by preprocessing the original point cloud (line 31 in preparation.py), without resampling the point. For KNN search, we use the query_radius function from the sklearn library (in line 33 of preparation.py). It is worth noting that in order to train quickly, local patch point clouds are obtained by processing in advance during training, so downsampling and KNN are not required again.

你好，请问你跑通程序了吗？方便帮我解决一下问题吗？


Refactor: Move expand? method to RequestAdapter

Purpose or Intent
It helps understanding that an expansion is requested by user.
Also, it was one of the remaining user inputs that are not routed through
RequestedAdapter.
@miq-bot add_label api, refactoring, darga/no
@miq-bot assign @abellotti

LGTM.  Thanks !!


threshold null gzip error

I've noticed that the docs use maxSize in the config, since the tagged release hasn't happened yet to change the internals to use maxSize it uses threshold instead. Giving an error like this
./dist/assets/es5.min.js: 65.19kB > threshold null gzip

To fix change the property in your package.json to from maxSize to threshold.
Just popping this here for anyone getting the error.

@leggsimon you can still use threshold value too !! In the README, it has been removed.
Backward compatibility is still there.

@reznord, this is my bad.
I haven't published your change to npm

In the v0.6.1 tag it hasn't got backwards compat. https://github.com/siddharthkp/bundlesize/blob/v0.6.1/src/files.js#L13

Looks like a good project though! Keen to see where it goes and maybe help out along the way.
Also, obviously feel free to close this issue once the change is published.

@siddharthkp I've fixed this after you released 0.6.1. So, no worries :)
I think bundlesize can get a next version, since there are a few fixes :D

For now, I'm undoing your changes in the README.
Will push a new version soon.

@leggsimon Sorry for that! You can use threshold for now 😄

I think bundlesize can get a next version, since there are a few fixes :D

Yeah, there are some that I haven't tested yet. Soon, I promise!


Update docs for new type mapper method signature (#372)

Codecov Report

Merging #375 (692d50e) into master (d494448) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #375   +/-   ##
=========================================
  Coverage     98.41%   98.41%
  Complexity     1575     1575
=========================================
  Files           147      147
  Lines          4235     4235
=========================================
  Hits           4168     4168
  Misses           67       67

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d494448...692d50e. Read the comment docs.


Book example is not working

PGSync version: 1.1.13
Postgres version: debezium/postgres:13-alpine
Elasticsearch version: 7.12
Redis version: latest
Python version:
Problem Description: Book example is not working and also it is not creating elasticsearch settings
Error Message (if any):
wait-for-it.sh: waiting 60 seconds for postgres:5432
wait-for-it.sh: postgres:5432 is available after 0 seconds
wait-for-it.sh: waiting 60 seconds for elasticsearch:9200
wait-for-it.sh: elasticsearch:9200 is available after 0 seconds
wait-for-it.sh: waiting 60 seconds for redis:6379
wait-for-it.sh: redis:6379 is available after 0 seconds
2021-04-27 23:44:40.864:WARNING:pgsync.helper: Database "book" does not exist: (psycopg2.OperationalError) FATAL:  database "book" does not exist

(Background on this error at: http://sqlalche.me/e/14/e3q8)
2021-04-27 23:44:41,049 INFO sqlalchemy.engine.Engine select version()
2021-04-27 23:44:41,049 INFO sqlalchemy.engine.Engine [raw sql] {}
2021-04-27 23:44:41,050 INFO sqlalchemy.engine.Engine select current_schema()
2021-04-27 23:44:41,050 INFO sqlalchemy.engine.Engine [raw sql] {}
2021-04-27 23:44:41,051 INFO sqlalchemy.engine.Engine show standard_conforming_strings
2021-04-27 23:44:41,051 INFO sqlalchemy.engine.Engine [raw sql] {}
2021-04-27 23:44:41,053 INFO sqlalchemy.engine.Engine CREATE EXTENSION IF NOT EXISTS "POSTGIS"
2021-04-27 23:44:41,053 INFO sqlalchemy.engine.Engine [raw sql] (None,)
2021-04-27 23:44:41,054 INFO sqlalchemy.engine.Engine ROLLBACK using DBAPI connection.rollback(), DBAPI should ignore due to autocommit mode
2021-04-27 23:44:41.054:ERROR:pgsync.base: Exception (psycopg2.errors.UndefinedFile) could not open extension control file "/usr/local/share/postgr
esql/extension/POSTGIS.control": No such file or directory

[SQL: CREATE EXTENSION IF NOT EXISTS "POSTGIS"]
[parameters: (None,)]
(Background on this error at: http://sqlalche.me/e/14/e3q8)
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1706, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 716, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedFile: could not open extension control file "/usr/local/share/postgresql/extension/POSTGIS.control": No such file or direc
tory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pgsync/base.py", line 1084, in pg_execute
    conn.execute(query, values)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1190, in execute
    future=False,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1491, in _exec_driver_sql
    distilled_parameters,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1749, in _execute_context
    e, statement, parameters, cursor, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1930, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1706, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 716, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (psycopg2.errors.UndefinedFile) could not open extension control file "/usr/local/share/postgresql/extension/POSTG
IS.control": No such file or directory

[SQL: CREATE EXTENSION IF NOT EXISTS "POSTGIS"]
[parameters: (None,)]
(Background on this error at: http://sqlalche.me/e/14/e3q8)
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1706, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 716, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedFile: could not open extension control file "/usr/local/share/postgresql/extension/POSTGIS.control": No such file or direc
tory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "examples/book/schema.py", line 275, in <module>
    main()
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "examples/book/schema.py", line 271, in main
    setup(config)
  File "examples/book/schema.py", line 248, in setup
    create_extension(database, 'POSTGIS', echo=True)
  File "/usr/local/lib/python3.7/site-packages/pgsync/base.py", line 1117, in create_extension
    pg_execute(engine, f'CREATE EXTENSION IF NOT EXISTS "{extension}"')
  File "/usr/local/lib/python3.7/site-packages/pgsync/base.py", line 1084, in pg_execute
    conn.execute(query, values)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1190, in execute
    future=False,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1491, in _exec_driver_sql
    distilled_parameters,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1749, in _execute_context
    e, statement, parameters, cursor, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1930, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1706, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 716, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (psycopg2.errors.UndefinedFile) could not open extension control file "/usr/local/share/postgresql/extension/POSTG
IS.control": No such file or directory

[SQL: CREATE EXTENSION IF NOT EXISTS "POSTGIS"]
[parameters: (None,)]
(Background on this error at: http://sqlalche.me/e/14/e3q8)
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1686, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 909, in do_executemany
    **kwargs
  File "/usr/local/lib/python3.7/site-packages/psycopg2/extras.py", line 1292, in execute_values
    cur.execute(b''.join(parts))
psycopg2.errors.UndefinedTable: relation "public.continent" does not exist
LINE 1: INSERT INTO public.continent (name) VALUES ('Europe'),('Nort...
                    ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "examples/book/data.py", line 501, in <module>
    main()
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "examples/book/data.py", line 64, in main
    session.add_all(continents.values())
  File "/usr/local/lib/python3.7/site-packages/pgsync/base.py", line 952, in __exit__
    self.session.commit()
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 1423, in commit
    self._transaction.commit(_to_root=self.future)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 829, in commit
    self._prepare_impl()
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 808, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 3255, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 3395, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 72, in __exit__
    with_traceback=exc_tb,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 3355, in _flush
    flush_context.execute()
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py", line 453, in execute
    rec.execute(self)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py", line 630, in execute
    uow,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 247, in save_obj
    insert,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 1154, in _emit_insert_statements
    statement, multiparams, execution_options=execution_options
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1520, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 314, in _execute_on_connection
    self, multiparams, params, execution_options
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1399, in _execute_clauseelement
    cache_hit=cache_hit,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1749, in _execute_context
    e, statement, parameters, cursor, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1930, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1686, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 909, in do_executemany
    **kwargs
  File "/usr/local/lib/python3.7/site-packages/psycopg2/extras.py", line 1292, in execute_values
    cur.execute(b''.join(parts))
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "public.continent" does not exist
LINE 1: INSERT INTO public.continent (name) VALUES ('Europe'),('Nort...
                    ^

[SQL: INSERT INTO public.continent (name) VALUES (%(name)s) RETURNING public.continent.id]
[parameters: ({'name': 'Europe'}, {'name': 'North America'})]
(Background on this error at: http://sqlalche.me/e/14/f405)
Traceback (most recent call last):
  File "/usr/local/bin/bootstrap", line 68, in <module>
    main()
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/bin/bootstrap", line 59, in main
    sync = Sync(document, verbose=verbose, **params)
  File "/usr/local/lib/python3.7/site-packages/pgsync/sync.py", line 80, in __init__
    self.validate()
  File "/usr/local/lib/python3.7/site-packages/pgsync/sync.py", line 88, in validate
    self._plugins = Plugins('plugins', self.plugins)
  File "/usr/local/lib/python3.7/site-packages/pgsync/plugin.py", line 26, in __init__
    self.reload()
  File "/usr/local/lib/python3.7/site-packages/pgsync/plugin.py", line 33, in reload
    self.walk(self.package)
  File "/usr/local/lib/python3.7/site-packages/pgsync/plugin.py", line 38, in walk
    plugins = importlib.import_module(package)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'plugins'
 0:00:00.023201 (0.02 sec)
Traceback (most recent call last):
  File "/usr/local/bin/pgsync", line 7, in <module>
    sync.main()
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/pgsync/sync.py", line 1051, in main
    params=params,
  File "/usr/local/lib/python3.7/site-packages/pgsync/sync.py", line 80, in __init__
    self.validate()
  File "/usr/local/lib/python3.7/site-packages/pgsync/sync.py", line 88, in validate
    self._plugins = Plugins('plugins', self.plugins)
  File "/usr/local/lib/python3.7/site-packages/pgsync/plugin.py", line 26, in __init__
    self.reload()
  File "/usr/local/lib/python3.7/site-packages/pgsync/plugin.py", line 33, in reload
    self.walk(self.package)
  File "/usr/local/lib/python3.7/site-packages/pgsync/plugin.py", line 38, in walk
    plugins = importlib.import_module(package)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'plugins'

runserver.sh
#! /bin/sh
./wait-for-it.sh postgres:5432 -t 60
./wait-for-it.sh elasticsearch:9200 -t 60
./wait-for-it.sh redis:6379 -t 60

python examples/book/schema.py --config examples/book/schema.json
python examples/book/data.py --config examples/book/schema.json

bootstrap --config examples/book/schema.json
pgsync --config examples/book/schema.json --daemon

Should be working now. Sorry about this


time zone still in UTC

Describe the bug
Hello
When the poll command is generated, the file created provide time in UTC but we would like local time. Can you please indicate how to do it?
We have tested several config and all provide UTC time
currently our config is :
[alerts_template]
template = "{{datetime_legacy}} localhost CEF:1|{{vendor}}|{{product}}|{{product_version}}|{{reason_code}}|{{reason}}|{{severity}}|{{extension}}"
type_field = "type"
time_format = "%b %d %Y %H:%m:%S "
Thanks for your help
Reproduction steps

...
Expected behavior
we would like local time in the log file
Thanks
Additional context
No response

We do not support non UTC time this needs managed on the receiving side