Add instructions for associating extensions with vscode-insiders on macOS

In the Visual Studio Marketplace, if you use a browser and click "install" on a vscode extension, it uses a special url "vscode:extension/{extension-name}" to automatically install the extension in vscode.
However, if you have vscode-insiders installed (and not the "normal" vscode), then the special url will fail.
What is needed is a simple way to associate these special urls with vscode-insiders.
In order to do this, the following is needed:

Edit the Info.plist to change the url scheme prefix from vscode-insiders to vscode
Invoke a command line program to re-register the updated url scheme handler

Here's how to do this:

Open an editor with the following file and change the following line to vscode (as shown) instead of vscode-insiders (what it originally was).

nano /Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/Info.plist

Run the following command line program to update the url scheme handler:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -f /Applications/Visual\ Studio\ Code\ -\ Insiders.app
Now, you should be able to click on any extension in the Visual Studio Marketplace and it'll work!

Can these instructions be added somewhere in the vscode-insiders documentation?

The real fix is to get the Marketplace to show Insider links. They are already aware of this limitation.
cc @viradhamMS @pkuma-msft


Update go-github to v43

@bradleyfalzon / @wlynch do you mind taking a look?

lgtm, I’ll tag in about 48 hours


Update earnings.mdx

Typo fix (quarter)

Going to fix this directly, as rebasing this to dev branch caused unexpected behavior on this PR.


Add Effects from effectindex.com

Add all of the subjective effects from effectindex.com

God thanks for creator of effectindex by providing database dump, that's really nice from his side. It would be worthly to build a script that will use futher dumps (in case new effects will be created) and will produce single .json file with all these information.

God thanks for creator of effectindex by providing database dump, that's really nice from his side. It would be worthly to build a script that will use futher dumps (in case new effects will be created) and will produce single .json file with all these information.

Okay... I've checked available database dump and I'm kinda not happy with outcome, a lot of data is missing comparing to one available on website - good move around this would be contacting author about such data.

Nevermind, there's a lot of data manually written in .vue sadly. However, as there's no information in .json I'll take a part in building such based on existing information contained at effectindex.com. Probably some scrapper would work fine but site doens't have consistent structure which may be a little trouble out there.

As more I look on https://effectindex.com the more I understand why there's just a little of information in database and rest was written manually, talking there about one particular example available at: https://effectindex.com/effects/autonomous-entity

I think there is a lot of thinking and design when it comes to Effect class, which would potentially take a whole bunch of time to make it work at the end. I think actually we can stick into simple Effect class and hold this issue as much as it's possible - maybe ideas will come with time.
My current idea is to read closely https://effectindex.com especially entries with high data complexity such as autonomous entities, then find a common points such as intesivity of effects (represented by levels) and maybe create a colum for such, some field like EffectClassification may also work out to add additional information to some effects.

So far, I've crawled complete dataset of https://effectindex.com as complete database was not exactly provided, actually I wish to focus on saving these information in database connected to project, as it will be done issue can be closed.


cr approval: add fuzz test

Pull Request Motivation

Adds a fuzz test for the CR approval validation routine. The PR adds a dependency that allows the fuzzer to randomize structs.
Kind

Release Note

NONE

Could you also add a coverage report you achieve with this fuzz test to the PR description?

Could you also add a coverage report you achieve with this fuzz test to the PR description?

I will have to have a look at this. Go does not have great support for coverage reports for fuzz tests, so I will need to hack it a bit.

/ok-to-test


Fix update-assignment operator on overlapping paths (fix #156)

This PR fixes the update-assignment operator |= to be more compatible with jq, fixing #156.

Thank you for fixing a complicated bug!!


Remove image Url

:tada: This PR is included in version 1.2.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Static profile credentials cannot be resolved if a region cannot be detected

Describe the bug
When resolving profile credentials (e.g., in a ~/.aws/credentials file), the credentials provider throws an exception if the default region resolver chain does successfully detect a region (e.g., in the profile, via env vars, etc.). This happens even if the profile credentials are purely static and don't require a region. Further note that an explicit region passed to a client constructor are unused in region resolution for the purposes of parsing profile credentials.
Expected behavior
Users with static profile credentials should be able to use those credentials successfully without the region resolver needing to detect the region.
Current behavior
Users with static profile credentials get an exception when the region resolver cannot detect the region.
Steps to Reproduce
Create an AWS profile that explicitly specifies aws_access_key_id and aws_secret_access_key but not region. Also ensure that no region is available via AWS_REGION env var, aws.region system property, or via IMDS (e.g., on EC2). Then attempt to create and use an AWS client (e.g., S3):
S3Client
    .fromEnvironment {
        region = "us-west-2"
    }
    .listBuckets { } // throws exception because no credentials can be resolved

Workarounds that do succeed include adding region to the AWS profile or explicitly providing a region to an explicitly-chosen profile credentials provider:
S3Client
    .fromEnvironment {
        region = "us-west-2"
        credentialsProvider = ProfileCredentialsProvider(region = "us-west-2")
    }
    .listBuckets { }

Possible Solution
Remove the requirement that a region resolves correctly for static credentials which do not require a region.
Context
No response
AWS Kotlin SDK version used
0.14.2-beta
Platform (JVM/JS/Native)
JVM
Operating System and version
AL2

closed by #582


Clarify exclude path instructions

When I was beginning to use foodcritic, it was detecting the test subdirectory of some of our cookbooks as another cookbook and throwing false FC011, FC031 and FC045 errors.
When I was trying to exclude the test directory tree, I read the instructions as needing to specify an absolute path, not one relative to the cookbook directory.
This PR spells that out in the --help output.
Closes #488

Certainly worth adding there. Thanks

You're welcome. That was a smoking fast merge :-)


Release new version

@rultor release, tag is 0.2

@rultor release, tag is 0.2

@aliceice OK, I will release it now. Please check the progress here

@rultor release, tag is 0.2

@aliceice Done! FYI, the full log is here (took me 2min)


go back updater versions

hotfix try for https://github.com/KittyCAD/modeling-app/issues/2741

i wanna test a theory so if it still doesnt work one more release we can reopen this


[Bug]: TokenTextSplitter does not split when using huggingface tokenizer

Bug Description
I think this code in TokenTextSplitter is built around the tokenizer from tiktoken. Indeed when we call self.tokenizer(text) with a tokenizer from tiktoken we get as a result a list of tokens. However, when we use a tokenizer from the transformers library (in my case mistralai/Mistral-7B-Instruct-v0.1) the output of the self.tokenizer(text) is not a the list of tokens but a dictionary with two keys: input_ids and attention_mask. The input_ids contain the list of tokens as if it was generated by self.tokenizer(text) with a tiktoken tokenizer.
Version
0.8.61
Steps to Reproduce
from transformers import AutoTokenizer
from llama_index.node_parser import SimpleNodeParser
from llama_index.text_splitter import TokenTextSplitter
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
text_splitter = TokenTextSplitter(
separator=" ",
chunk_size=300,
chunk_overlap=5,
backup_separators=["\n"],
tokenizer=tokenizer
)
node_parser = SimpleNodeParser.from_defaults(
text_splitter=text_splitter
)
base_nodes = node_parser.get_nodes_from_documents(any list of llama index documents, show_progress=True)
print(len(any list of llama index documents.text))
print('---')
print(len(base_nodes[0].text))
Relevant Logs/Tracbacks
No response

It's a workaround but this is a bug. That function self.tokenizer(text) is called 5 times and some logic not to have to worry about which tokenizer you choose would be better.

@manuelrech  the intention of the tokenizer argument is to actually just be any callable that takes string and returns a list.
For huggingface tokenizers, you just need to set tokenizer=hf_tokenizer.encode, no need to edit source code


RSS feed is not updating

blog.ipfs.io/rss.xml shows some very old articles instead of latest ones

This will be fixed with https://github.com/ipfs/blog/pull/118 . Thanks for reporting!

Will be solved with https://github.com/ipfs/blog/issues/120, let's track this there :)


Debug current unit test file

Environment data

VS Code version: 1.22.1
Extension version (available under the Extensions sidebar): 2018.3.1
OS and version: Linux Ubuntu 17.10
Python version (& distribution if applicable, e.g. Anaconda): 3.6.3
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pipenv
Relevant/affected Python packages and their versions: XXX

Actual behavior
We can:

run current unit test file
run all unit test
Debug all unit test

Expected  behavior
We should be able to:

Debug current unit test file

Steps to reproduce:
NA
Logs
NA

Do you mind me asking why you want to debug a specific file versus a single method?

Good question.
Today i had to write a file were some resource (something like a db connection) were not allocated for every tests, but for the entire file (=test suite?).
Every tests alone worked great, but all together some went to error because of the resource that wasn't very well "clean-up" between every tests.
So being able to debug the unit test would have been really helpful (instead of trying to guess why).
Note: but I agree with you, it's the first time I would have needed that.

@Djabx thanks for the info!

We're closing this for now since we have no current plans to do this, but I added it to our overall meta issue tracking testing enhancement ideas so we won't lose track of it when we revisit the topic.


New version: Adobe.Acrobat.Pro version 24.004.20220

Pull request has been created with komac v2.5.0 :rocket:
Microsoft Reviewers: Open in CodeFlow

@ItzLevvie can you please approve? :)

@ItzLevvie I had to modify are you approve sorry to be a bother


[v0.24.0] Rename errorCode to code

See https://github.com/meilisearch/integration-guides/issues/149

Regarding: https://github.com/meilisearch/MeiliSearch/issues/1898
This should be done before the v0.24.0 release otherwise the users cannot use the mini dashboard in v0.24.0

Discussed with @bidoubiwa and @mdubus -> a tag in meilisearch-js will be created for the mini-dashboard with a fresh new version of meilisearch-js containing the needed changes


Regex does not support unicode category "Currency Symbol"

I'm writing a lexer for Cypher language. As specified in its ANTLR grammar, I define the token for unescaped identifiers as follows:
#[Logos, Debug]
pub enum Token {
    #[regex(r"[\p{ID_Start}\p{Pc}][\p{ID_Continue}\p{Sc}]*")]
    UnescapedSymbolicName,

    ...
}

It fails to compile due to regex parse error:
error: regex parse error:
           [\p{ID_Start}\p{Pc}][\p{ID_Continue}\p{Sc}]*
                                               ^^^^^^
       error: Unicode property not found
   --> src/token.rs:236:13
    |
236 |     #[regex(r"[\p{ID_Start}\p{Pc}][\p{ID_Continue}\p{Sc}]*")]
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It seems the problem lies in the dependency regex-syntax = 0.6. I try to parse [\p{Sc}] with it:
#[test]
fn test() {
    let mut parser = regex_syntax::Parser::new();
    let hir = parser.parse(r"\p{Sc}");
    println!("{:?}", hir);
}

And It raises the same error
Err(Translate(Error { kind: UnicodePropertyNotFound, pattern: "\\p{Sc}", span: Span(Position(o: 0, l: 1, c: 1), Position(o: 6, l: 1, c: 7)) }))

The problem might be solved by updating regex-syntax. For example, with regex-syntax = 0.8.2, the test above succeeds:
Ok(Class({'$'..='$', '¢'..='¥', '֏'..='֏', '؋'..='؋', '߾'..='߿', '৲'..='৳', '৻'..='৻', '૱'..='૱', '௹'..='௹', '฿'..='฿', '៛'..='៛', '₠'..='⃀', '꠸'..='꠸', '﷼'..='﷼', '﹩'..='﹩', '＄'..='＄', '￠'..='￡', '￥'..='￦', '𑿝'..='𑿠', '𞋿'..='𞋿', '𞲰'..='𞲰'}))

Hello, #320 already solved this issue by upgrading the regex-syntax dependency. The PR is stalled because I am waiting some reply from the author of this crate, as I cannot publish new releases on my own :/

Hello, #320 already solved this issue by upgrading the regex-syntax dependency. The PR is stalled because I am waiting some reply from the author of this crate, as I cannot publish new releases on my own :/

Nice to hear that. Hope the PR can be merged soon :)

@wzzzzd the issue is not the PR being merged, because I can do that anytime I want. But I cannot publish a new release :/

Fixed with 0.14.


What's the purpose of file resources /etc/samba and /etc/samba/smb_path?

Since the (red hat/centos) package samba-common already provides for creating /etc/samba and setting permissions appropriately, what's the purpose of defining /etc/samba/smb_path as a file resource?
https://github.com/kakwa/puppet-samba/blob/7ce3dd40bfc667a697151d9e79ba6e2982160db5/manifests/classic.pp#L98

It's necessary for the lib used to managed individual settings in the smb.conf file (basically an ini file):
https://github.com/kakwa/puppet-samba/blob/master/lib/puppet/provider/smb_setting/ruby.rb#L16
Keep in mind that on some systems, the configuration path is not /etc/samba/smb.conf (for example, FreeBSD where it's in /usr/locale/etc/samba/smb.conf), it could also be useful with custom made packages with configuration in /opt//etc for example.
It's not a very satisfying solution as it needs 2 iterations of application to work properly, but it works in the end.

The /etc/samba/ directory doesn't necessarily exists or is created by the samba package of .
Typically FreeBSD has the configuration file at /usr/local/etc/smb4.conf and no ".*/etc/samba/" directory is created.
Also, the "/etc/samba/smb_path" is hard coded inside the provider (not very elegant, I know), so it's necessary to create the '/etc/samba/' dir and then the file '/etc/samba/smb_path'.
This file necessary to make the path to smb.conf configurable in the smb_setting provider.
And the provider needs to know the configuration file path for puppet resource smb_setting and  purge => true, (https://github.com/kakwa/puppet-samba/blob/master/manifests/classic.pp#L316) to work.
The provider is implemented here:
https://github.com/kakwa/puppet-samba/blob/master/lib/puppet/provider/smb_setting/ruby.rb
Also, this provider is not based on augeas, it's derived from the ini puppet module.


added more python packages

SocketCAN Python interface to SocketCAN
canmatrix Python module to work with CAN matrix files
canopen Python module to communicate with CANopen devices
cantools Python module to decode and encode CAN messages using a DBC file

Thank you so much! Merging!


Better dependency modelling on perf-android-large

@wolfs commented on Wed Sep 26 2018
The perf-android-large project uses quite some force statements to make sure some of the dependencies have the right version, see https://github.com/gradle/perf-android-large/blob/wolfs/update-project-for-agp-33/build.gradle#L40-L73.
According to @ljacomet, some of these things can be better modelled using belongsTo and enforcedPlatform. We should probably look into this when the documentation for those features is done: https://github.com/gradle/gradle/pull/6873

@gradle/dependency-management It would be great if you could look into this. This sounds like a good way to validate the new features we have now in dependency management.


possible bug reloading cs and losing slots

CS seems to be losing its slots after a restart and loading the persistence file

possibly related to upgrade and changes in the cluster class.


is this a bug?

I have a semicolon there I have new there because that is what is being asked..  and the other things listed.

What you have is:
var myCar = new function( "twin" ) {
  nickname.wheels = 4;
  nickname.engines = 1;
  nickname.seats = 1;
  myCar.nickname = "twin";
};

This has many many syntax errors.

Invalid new
You can't do : var myCar = new function ...
What you should do : var myCar = new Car()
You can instantiate an object while declaring it like this.

Invalid property nickname
Please read the instructions carefully.
You are supposed to do :

var myCar = new Car();
myCar.nickname = "Some Nick Name"

Please ask for help at Help Chat for other issues in your code.
Finally it does mention in the message in the screenshot that "Is new necessary"? So please check the instructions, thoroughly. :smiley:
Hope this helps! and Goodluck! :+1:

@raisedadead is correct. Happy coding!


Feature request

When you work with pure CoreBluetooth it means you need to use a chain or even a tree of delegate methods` asynchronous calls.
Could you wrap this code in your library's style?

Probably. I have no experience with Core Bluetooth, but I could probably whip something up.
Can you provide a list of the classes and methods you need?

#worksforme
~/tmp$ carthage update
*** Fetching PromiseKit
*** Fetching OMGHTTPURLRQ
*** Checking out OMGHTTPURLRQ at "3.0.0"
*** Checking out PromiseKit at "39495e0212792d3cc158b3bca92ddcc417679f55"
*** xcodebuild output can be found in /var/folders/9p/55y6r8hs3yz2qkhvf74gc0gh0000gn/T/carthage-xcodebuild.hikZiR.log
*** Building scheme "OMGiOS" in OMGHTTPURLRQ.xcodeproj
*** Building scheme "OMGOSX" in OMGHTTPURLRQ.xcodeproj
*** Building scheme "PMKiOS" in PromiseKit.xcodeproj
*** Building scheme "PMKOSX" in PromiseKit.xcodeproj
warning: All interface orientations must be supported unless the app requires full screen.
warning: A launch storyboard or xib must be provided unless the app requires full screen.
~/tmp$ ls Carthage/*/*/*.framework
Carthage/Build/iOS/PromiseKit.framework
Carthage/Build/Mac/PromiseKit.framework
~/tmp$ cat Cartfile
github "mxcl/PromiseKit" "swift-2.0-beta5"

Can you build anything else with Carthage?
Have you set your xcode-select to use Xcode-beta.app rather than Xcode.app?

I worked with bluetooth beacons. I meaned a code to find peripherals and get their characteristics. Here is an example of the tutorial:
https://www.invasivecode.com/weblog/core-bluetooth-for-ios-6-core-bluetooth-was/
Sorry but I don't have a code now and I also don't have any bluetooth device to rewrite it again. But the main idea is:
1)to look for a device
2)to try to connect to the discovered one
3)to "discover services" of the connected one
4)to "discover characteristics" for the discovered service
5)to read characteristic's values
And there is error handling somewhere here.
Each action from the listed above is a separate delegate method which is called asynchronously and may be called multiple times for the same device. I think it could be better to link all these methods into one "promise sequence".
But anyways you need at least a BLE device. I recommend you a beacon for 2 reasons:

it is enough cheap
specifically for beacons apple added iBeacon library which you can also use to check the result.

@gerchicov-bp you can also look bluetoothkit. doesn't take u all the way there, but might be helpful, if you only have 1 char on ur services

Merged


[FEATURE]: How do I train a model?

Is your feature request related to a problem? Please describe.
How do I train a model for the object detection or segmentation? The documentation seems to be quite vague. Adding a research folder as in tensorflow or any examples to train/test the models would of a great value

Hi @zumbalamambo,
I'm out of office this week but will respond next week if you still need help. The tutorials in the documentation - specifically the .yaml config tutorial and the training tutorial in the API section - may help. If not, if you can provide a specific set of questions related to training I can try to improve the clarity of the docs.
There currently isn't functionality implemented for object detection model training.


tidy and github actions updates [1.11]

backport #831

A few more deprecated GHA actions, can help with the save-state bit if needed, but otherwise LGTM!


Option to 'Show block nesting' for nested conditionals.

First off, thanks for making this VS extension. It's great to be able to get a good reading view on some RPG/LE/CL code without the need to download a IBM IDE.
I'm unsure if this is a feature request or potentially covered by another extension, but have you come across the ability to pair up rpg conditions. I'm often looking at code with a ton of nested 'if' statements:

IBM IDEs such as WebSphere have a handy feature for 'show block nesting':

@CraigMcloughlin Yeah I find myself getting lost in those nested blocks a lot and would love to work on that feature.
I think I'm going to try to experiment using the same method that other languages use by matching up brackets, except this time use IF as start and ENDIF as end. If that works I can extend it to loops, subroutines, and procedures. I'll mention you on this issue with what happens.
If that doesn't work, then there's some decent challenges. I need to do some more reading up on it, but I think it would require some knowledge on Language Server Protocol (LSP) that I don't quite have yet. I talked about it a bit in https://github.com/barrettotte/vscode-ibmi-languages/issues/51. The major pain point is implementing enough of an RPG/RPGLE parser in order to tell where you are in the parse tree and report it back to VS Code for display/interaction.
This part is definitely not impossible, but it would take a good amount of time to learn and implement. I just need to wake up one morning with the itch to dive into it. Thanks for reporting!

@CraigMcloughlin Hello, I haven't quite gotten around to trying to fix this issue yet. But, it may be taken care of in the future by another extension.
I just wanted to pass on that a new IBM i VS Code extension has been developed at https://github.com/halcyon-tech/code-for-ibmi. It works together with this syntax highlighter to allow actual source editing on IBM i.
This extension provides the ability to browse/edit source on the IFS or QSYS file systems, compile source, and more. Its still in development, but I feel that it is in a very good place right now.

Hi @barrettotte ,  Thanks for the info - I'll definitely check it out :-)

@CraigMcloughlin Released in v0.5.6

I should have added a screenshots so I didn't seem like I was crazy

These are pretty trivial examples, but feel free to open another issue if something seems wacky.
The only thing I couldn't get working was CASxx instructions, but I think its a small sacrifice


fix issue #17 Handle unsecaped > in attribute

We are using bpmn-moddle(https://github.com/bpmn-io/bpmn-moddle) and have encountered a similar problem to the one in the title.
I've written the modified code and would appreciate a review.
Specifically, the following rules were added when retrieving the end of a tag.
・If the next tag (including CDATA and Comment) exists -> get the tag closer ('>') just before the next tag.
・If the following tag does not exist -> get the last tag closer ('>')
We have also confirmed that the pull request from Mr. LukasHechenberger has been successfully retrieved and terminated. (We've also added our own test codes.)
https://github.com/nikku/saxen/pull/19

Could you explain why your solution works by running through an example.
I've added a couple of additional test cases and I see it working, however I do not understand it yet.

@Nikku
Thank you for your reply.
At first I thought of the simple example below.
<x some="・・・>・・・">・・・( A string that does not contain '<')・・・</x>

In the above example, the tag information I wanted was the following,
<x some="・・・>・・・">

but It seemed to me that what is actually being acquired is the following.
<x some="・・・>

So that was the first step in figuring out the logic to get the end of the tag below (a).
<x some="・・・>・・・">(a)・・・( A string that does not contain '<')・・・</x>

I have considered the following as conditions for obtaining the above.
Citation.

The ampersand character (&) and the left angle bracket (<) must not appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
https://www.w3.org/TR/xml/#syntax

From the above, I came up with the following
・If it is a valid XML string, the last '>' that appears before the next tag start ('<') (CDATA and COMMENT also start with a '<') will be the end of the tag containing the current cursor.
・If the next tag start ('<') does not exist, then simply the last '>' in the document will be the end of the tag containing the current cursor.
the next tag start character (b)
<x some="・・・>・・・">・・・(A string that does not contain '<')・・・<(b)/x>

the end of the tag (c) that appears last before the next tag start character
<x some="・・・>・・・">(c)・・・(A string that does not contain '<')・・・<(b)/x>

I hope I've answered your question above, but please let me know if I've missed anything or am unclear.

Thanks. Your explaination helped me to understand it.
I've updated the code comment and added a couple of additional tests to ensure we are resilient to > in other places of the XML document.
Everything works :clap:

Released as v8.1.1.


Can we display Metadata Information Instead of Keying in Query

Hello,
Can we use druid metadata information like Datasource name, metric name and dimension name as drop down for forming the query instead of keying in all these information through UI. There are many chances user may have many numer of datasources/metrics or dimension which needs to be selected while generating dashboard.
Thanks,
Akhilesh

Hello @Murthy7587
Yes we can! :)
I've actually started to work on it at my spare time, but I don't have much right now (my progress on this is maybe 20 - 30%).
If you feel like you could contribute that, you're welcome! otherwise, it'll come "soon" :)  (at least it's my next contribution on this project)


imports property not working in figma connect file

👋 Hi team, I just installed the latest code-connect version and noticed all our imports erroring as shown in attached image.
We were previously on 1.0.6 and it worked.
Thanks! --sid

Please provide:

Code Connect CLI version: 1.1.12
Operating system: MacOS
Code Connect file, Figma design and/or relevant code snippet that could help us get more context

If you prefer not to share those publicly please reach out via the Figma support

Hey @siddharthkul, apologies for the issue here.
Our latest update had a bug in the Typescript typings. We've released v1.1.3 to fix this, and also put tests in place to hopefully prevent it happening again.
Please let us know if you continue to experience any issues!


Enable golint tests

Enable golint testing for style fixes.

Add exceptions to a couple places, mostly proc stat names.
Fix up various issues.
Update Makefile.common from upstream Prometheus.
Remove default-enabled modules from golangci-lint config.

Signed-off-by: Ben Kochie<EMAIL_ADDRESS>

Sorry, looks like I caused the new test failures by merging #258.  I think you just have to remove the trailing else block in proc_fdinfo.go.

Yup, all fixed up!


Introduce builder-pattern API

@JMMackenzie Let me know what you think of this type of API. I tried to do it as simple as possible from the user's perspective + make it easy to add stuff later without breaking backwards compatibility.

Bumped the version. I actually want to add tests for the old functions. Just realized that by switching in tests, we're not testing the old one anymore.


RPC responses lags every 10 minutes

Describe the bug
I have monitoring service which query latest block from rpc every 1 second. Timeout for this query is 1 second. I notice that reth node cannot response to requests within 1s timeout sometimes and it occurs every 10 minutes. This lags last for ~3 seconds for reth archive ethereum node. Is there some blocking interval task in Reth? Any ideas how to fix this?
Monitoring image. Peaks are timeouts. (Initially it's chart to monitoring lag between last block time and current time so don't pay attention to 60000 ms, I mark any timeout requests as 60000 lag)
Also I noticed that this lags are visible on Max transaction open time chart
UTC time in both logs and screenshots
Node is fully synced
Freelist ~30,000
BSC reth archive node have same problem but lags ~6 seconds instead of ~3 seconds with same 10 minute interval
It launched in Docker version 27.3.1, build ce12230
Linux, Ubuntu, Self-hosted
Specs of SSD: https://www.adata.com/en/consumer/category/ssds/solid-state-drives-legend-960/?tab=specification
(other SSDs are used too, but problem is same)
Steps to reproduce
just run reth archive node
      node
      --chain mainnet
      --metrics <IP_ADDRESS>:9001
      --log.file.directory /root/logs
      --authrpc.addr <IP_ADDRESS>
      --authrpc.port 8551
      --authrpc.jwtsecret /root/jwt/jwt.hex
      --http --http.addr <IP_ADDRESS> --http.port 8545
      --http.api "eth,net,web3,debug"
      --http.corsdomain "*"
      --rpc-max-logs-per-response 1000000

Node logs
reth-debug-logs-2024-11-29T06to07.txt
Platform(s)
Linux (x86)
What version/commit are you on?
reth Version: 1.1.0-dev
Commit SHA: 1ba631ba9581973e7c6cadeea92cfe1802aceb4a
Build Timestamp: 2024-11-18T05:56:49.513902613Z
Build Features: jemalloc
Build Profile: release
What database version are you on?
Current database version: 2
Local database version: 2
Which chain / network are you on?
mainnet
What type of node are you running?
Archive (default)
What prune config do you use, if any?
No response
If you've built Reth from source, provide the full command you used
No response
Code of Conduct

[x] I agree to follow the Code of Conduct

query latest block from rpc every 1 second

query how? eth_getBlock?

query latest block from rpc every 1 second

query how? eth_getBlock? latest or by hash/number?

{"jsonrpc":"2.0","method": "eth_getBlockByNumber", "params": ["latest", false],"id":74}

hmm, interesting that this appears to be the same 6s delay
could you perhaps check your rpc panel, ref:
https://reth.paradigm.xyz/d/2k8BXz24x/reth?orgId=1&refresh=30s&viewPanel=120&from=now-24h&to=now
and check if you can spot the same 6s spikes there?

ty,
could you please also post get_last_block_or_return_error_after_1s_timeout

ah okay, so this would actually return an error if the response returns an error?

ah I think you're encountering a reorg bug

BSC reth archive node have same problem but lags ~6 seconds instead of ~3 seconds with same 10 minute interval

can you elaborate on where you got those numbers from?
you're also not tracking rpc duration it seems

BSC reth archive node have same problem but lags ~6 seconds instead of ~3 seconds with same 10 minute interval

can you elaborate on where you got those numbers from?
you're also not tracking rpc duration it seems: (now() - result.blocktime_in_ms)

for example on this screenshot 1 point is 1 request. service make 1 request each second using js setInterval. 4 requests (1 second between each) to BSC Reth Archive RPC didn't receive response in 1 second (timeout)

Should I test other rpc methods is same way to give you more details / insights on problem?


GEOMESA-1446 Remove duplicate artifact declaration

Signed-off-by: Tom Kunicki<EMAIL_ADDRESS>

@tkunicki do you still need a cache cleared? looks like I have permissions for that.

@elahrvivaz cache issue was for #1096, i think that's been taken care of...


Ftbfs stage3

zipl/boot/Makefile: fix failure to build, do not specify .lds twice.
Whilst stage3.lds is a dependency, it is specified via SFLAGS and must not be repeated again along all the .o files. Filter anything but .o files.
Fixes failure to build from source on Ubuntu 19.10.
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/s390-tools/+bug/1833238

Thanks for the patches. They look good to me and will be added asap.


pull request for e2e test at 12/18/2016 09:45:18

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


WIP: Replace content files by React code

Closes #79.

Move lesson content directly in lesson react files
Removed some boilerplate code
Renamed genesis-pt2 to genesis-2
Move chapter listing to react files instead of contentlayer
Remove [slug] path and hardcode each chapter path (only chapter-1 for now)
Move chapter and lessons metadata to chapters.json

Some chapters are still stored in mdx files but they can be moved in later followups.
Its gets difficult to add interactivity with content, such as adding tooltips and CopyButton (see https://github.com/saving-satoshi/saving-satoshi/pull/87/commits/f7c0636219a7b46d357f8f515235948a0e81928a# where I have to move content out of the mdx file to add the CopyButton).

If this is too hard to review I can split the PR in smaller commits.

I think based on the discussion on #79 that we are going to go a different route. Converted this to draft in the meantime.

I think this can be closed.


Rephrase copy: make fewer skill level assumptions

Close #340
Fix #340

@rachelnabors Can you sign the CLA? Thanks!


Permisionless way to create HRMP channels between system parachains and other parachains

Almost all parachains will want to connect to one or more system parachains for various reasons and system parachains are created to offer functionalities to relaychain and other parachains.
However, a HRMP channel is required before a non-system parachain to be able to communicate with system parachain and it requires a governance proposal for that to happen. This is slow, high overhead, and unnecessary.
We should develop a pallet for system parachains to allow other parachains to permisionlessly create bidirectional HRMP channels with it. There maybe some deposit requirements etc to ensure security.

Why do we need a whole new pallet for this? Couldn't we add one new call, similar to establish_system_channel, that a parachain would call?
So:
pub fn establish_channel_with_system(
	origin: OriginFor<T>,
	interlocutor: ParaId,
) -> DispatchResult {
	let origin = ensure_parachain(<T as Config>::RuntimeOrigin::from(origin))?;
	ensure!(interlocutor.is_system(), Error::<T>::ChannelCreationNotAuthorized);
	// ...
	// establish bidirectional channel
	// ...
}

so it can be reused by non system parachains and I want to fix https://github.com/paritytech/polkadot-sdk/issues/922 at the same time

But like you said in that issue, that just requires implementation of the Hrmp* instructions.

yeah but the implementation have to be lived somewhere? also for security reasons we may want to config things like max channel count or deposit requirements etc. what is your suggestion?

yeah but the implementation have to be lived somewhere?

The same place that implements the other instructions... It's just an implementation of the ExecuteXcm trait.

also for security reasons we may want to config things like max channel count or deposit requirements

We already have a Configuration pallet that contains these.

I don’t really get what are you suggesting. Yeah maybe not a new pallet but where do you suggest to put those code?
And maybe it doesn’t need to be a new pallet but why it can’t be a new pallet?

Where it already is.

maybe we need to touch this but I still think we need a new pallet. eg to allow configure the parameters via governance proposal
and forcing more non optional parameters to already super complicated xcm configurations just sounds bad

We should develop a pallet for system parachains to allow other parachains to permisionlessly create bidirectional HRMP channels with it

With on-demand parachains this isn't such a great idea. I mean with the current implementation of XCMP it isn't a problem. However, if we ever go to offchain-xcmp, this will lead to problems.

that’s exactly the reason why I am asking do we need to have some limits and what are the limits for the system parachains?
permisionless does not mean no requirement at all. we can still ask for deposit, time delay, etc.
I think we absolutely need the system parachain to be able to communicate with every long live parachain / whatever coretime software that wants to purchase coretime directly via xcm. Otherwise we have a problem to fix and in that case we identified a problem and we need to then find out a solution to it.

We had to fork the executor to have an implementation of the HRMP instructions at Polimec.
All we did is create a config type on the executor so we can pass whatever logic we want to handle the HRMP instructions in the construct_runtime.
@joepetrowski, why can't the original xcm executor have something like this instead of returning an error? This way we don't have to keep an up-to-date fork of the executor for only two lines of code. It's generic enough to not cause any complications, and if any parachain wants to avoid using those instructions, they can simply pass an empty implementation.

We had to fork the executor to have an implementation of the HRMP instructions at Polimec.
All we did is create a config type on the executor so we can pass whatever logic we want to handle the HRMP instructions in the construct_runtime.
@joepetrowski, why can't the original xcm executor have something like this instead of returning an error? This way we don't have to keep an up-to-date fork of the executor for only two lines of code. It's generic enough to not cause any complications, and if any parachain wants to avoid using those instructions, they can simply pass an empty implementation.

Why not try to upstream it then?
I believe it was always the plan to have an implementation for that instruction, but there's always more things to do than time to do them. I would welcome a PR that gets it done 🚀

After writing this comment, I thought more about this. Actually my comment isn't that correct. As long as the system chains are building every 24 hours a block, it should be quite easy for them to get hold of the messages from someone else. So, we can probably ignore what I said.
This brings me back to some other thought I had, based on this comment from you:

are created to offer functionalities to relaychain and other parachains.

Maybe we should open these channels automatically between all chains and the system chains. Maybe at the beginning using some low capacity, which could be increased by providing some deposit.

Maybe we should open these channels automatically between all chains and the system chains. Maybe at the beginning using some low capacity, which could be increased by providing some deposit.

Yeah, so we could make a call like this that would let any para open a channel with any system chain, but with a default low-capacity configuration. Then if a chain wants a higher capacity channel, they can use the force_open_hrmp_channel call that goes through governance.

ok. that will work.
next question: do we need rfc for this?  I should have everything I needed to start implement this.

We had to fork the executor to have an implementation of the HRMP instructions at Polimec.
All we did is create a config type on the executor so we can pass whatever logic we want to handle the HRMP instructions in the construct_runtime.
@joepetrowski, why can't the original xcm executor have something like this instead of returning an error? This way we don't have to keep an up-to-date fork of the executor for only two lines of code. It's generic enough to not cause any complications, and if any parachain wants to avoid using those instructions, they can simply pass an empty implementation.

I initiated this issue https://github.com/paritytech/polkadot-sdk/issues/3692 for different reasons just a few hours ago, and @acatangiu directed me to this RFC issue. Now, I also see @xlc's comment https://github.com/paritytech/polkadot-sdk/issues/922#issuecomment-1691891582. It seems like everything revolves around the same issue - adding a callback handler for HrmpNewChannelOpenRequest / HrmpChannelAccepted / HrmpChannelClosing XCM instructions to the XcmExecutor.
@JuaniRios, as Adrian mentioned, you could open a PR to the polkadot-sdk repo, and I could assist with its completion. This way, you can eliminate your fork. I checked your use-case, and it appears to be different from mine and @xlc's regarding the VersionDiscoveryQueue. However, with tuple implementation for HrmpHandler, we can support both and more use cases.

https://github.com/paritytech/polkadot-sdk/pull/3721 allow any parachain to have HRMP channel with a system parachain


Fix incorrect usage of MemoryLayout.size for MemoryLayout.stride

Fixes
Fix incorrect usage of MemoryLayout.size for MemoryLayout.stride.
MemoryLayout:

Always use a multiple of a type’s stride instead of its size when allocating memory or accounting for the distance between instances in memory.

Changes proposed in this PR
Fix incorrect usage of MemoryLayout.size for MemoryLayout.stride.
Tests performed
Further info for the reviewer
Open Issues

Fix incorrect usage of MemoryLayout.size for MemoryLayout.stride.

Not sure if the usage of size is correct or incorrect here (IMO it's fine since no padding/alignment won't happen for basic types), but when reviewing this, I wondered about the purpose of the whole line altogether.
Any result != 1 (for both, .size or .stride) for UInt8 would be a real surprise here 🙃.
I suggest we simply use self.count instead. I did a bit of research how that bufferSize calculation came to be - couldn't find any reason. Was that way from the beginning 🤷♂.

Fix incorrect usage of MemoryLayout.size for MemoryLayout.stride.

Not sure if the usage of size is correct or incorrect here (IMO it's fine since no padding/alignment won't happen for basic types), but when reviewing this, I wondered about the purpose of the whole line altogether.

I am sure usage is incorrect, but has no effect on code.

Any result != 1 (for both, .size or .stride) for UInt8 would be a real surprise here 🙃.

As said, there's no effect on code.

I suggest we simply use self.count instead. I did a bit of research how that bufferSize calculation came to be - couldn't find any reason. Was that way from the beginning 🤷♂.

Ok.


[Feature]: Typescript 5 support

🚀 Feature Proposal
It would be great if ts-jest to supports recently released Typescript 5.0
Currently it warns that it doesn't support even Typescript 4.0, so I'm not reporting this as a bug, but rather a feature request:
ts-jest[versions] (WARN) Version 5.0.2 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0).

and than my tests fail with
● Test suite failed to run

    TypeError: ts.getMutableClone is not a function

      at visitor (node_modules/@vue/cli-plugin-unit-jest/node_modules/ts-jest/dist/transformers/hoist-jest.js:63:34)
      at Object.visitNode (node_modules/typescript/lib/typescript.js:85353:21)
      at transformSourceFileOrBundle (node_modules/typescript/lib/typescript.js:87236:51)
      at transformation (node_modules/typescript/lib/typescript.js:108858:16)
      at transformRoot (node_modules/typescript/lib/typescript.js:108881:73)
      at transformNodes (node_modules/typescript/lib/typescript.js:108866:72)
      at emitJsFileOrBundle (node_modules/typescript/lib/typescript.js:109453:[26](https://git.kryptops.io/telltale/frontend/runs/104026?check_suite_focus=true#step:6:27))
      at emitSourceFileOrBundle (node_modules/typescript/lib/typescript.js:109388:7)
      at forEachEmittedFile (node_modules/typescript/lib/typescript.js:109142:26)

Motivation
It would allow allow people to use latest typescript features with ts-jest.
Example
No response

@slaweet are you using the latest release of ts-jest? I have 29.0.5 installed and it reports '>=4.3 <5' as the expected TypeScript version. Not that that helps with support of v5, but it should report that it supports TypeScript v4.

@slaweet are you using the latest release of ts-jest? I have 29.0.5 installed and it reports '>=4.3 <5' as the expected TypeScript version. Not that that helps with support of v5, but it should report that it supports TypeScript v4.

Fair point, I thought I'm using 29.0.5 as it was in package.json, but looking into yarn.lock showed that there's also 24.3.0 as a transitive dependency.

I'm getting the version warning message and then errors like this:
error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions'

current warning with TS 5.0.2 ts-jest 29.0.5 is
ts-jest[versions] (WARN) Version 5.0.2 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
So support for Typescript 5 is desired please.

Thanks for the PR @marcalexiei! And thanks for the review and merge @ahnpnl!


[URGENT] Wait for tasks to be released, scrape new tasks, update tasks.json

We are waiting for the remainder of the tasks to be released. (Likely just a few short hours before servers come up)
We will need to scrape these new tasks from the wiki (see scraping/tasks.py), then we will need to assemble them into a new public/tasks.json file.

I will be around at 4:30 AM EST (launch is 7:00 AM EST) to take care of this. If anyone would like to join me, let me know. I should be able to handle it on my own, assuming Jagex doesn't take too long to release the lists of tasks.

https://github.com/KennethLuczko/myroutebuddy/pull/77


modals: Fix inconsistent modal hiding behaviors.

First commit
Fixes the inconsistency in the change email & default language modals that used different methods to show/hide them. Both were normalized to use the .modal() method and change aria-hidden attribute on change in state.
Second commit
Merged! Previous content:
Fixes the inconsistent and broken behavior in closing modals with the Esc hotkey. Following two GIFs show behavior of the change email & default language modals (respectively) before changes made in the commit:

[![](https://i.gyazo.com/163544eed7f94c00b908f2a92b32517e.gif)](https://gyazo.com/163544eed7f94c00b908f2a92b32517e)

[![](https://i.gyazo.com/07a7f8848b08c359534b66742bc9ef34.gif)](https://gyazo.com/07a7f8848b08c359534b66742bc9ef34)

Results
Current behavior of closing modals with Esc hotkey for change email & default language modals (respectively)

Fixes #4811 Fixed!
Possibly fixes #3791 and should close its accompanying PR #3794

This also may close #3791 and its accompanying PR #3794. Should I amend my commits to close them as well?

This is great, thanks for working on this @synicalsyntax!
The hotkeys commit looks great, so I went ahead and merged it.  I think #3791 was about what happens if you're in this state and click somewhere not in the modal:

Clicking in other parts of the #settings overlay not inside the modal doesn't do anything (it probably should close the modal).
Clicking in the dark borders of the screen from this place still leaks a backdrop.

The other commit is purely a code cleanup, right?  @vaidap can you take a look at it?

I think I'll be closing this PR. I plan on creating several methods for hiding/showing Bootstrap modals in a seperate PR. Is that alright with you @timabbott ?

Yep, sounds good!  You may want to check out @jackrzhang's work in #5345 in case it's helpful.


Script hangs on .gather_for_metrics()

System Info
- `Accelerate` version: 0.28.0
- Platform: Linux-6.5.0-28-generic-x86_64-with-glibc2.35
- Python version: 3.12.2
- Numpy version: 1.26.4
- PyTorch version (GPU?): 2.2.1 (True)
- PyTorch XPU available: False
- PyTorch NPU available: False
- System RAM: 125.27 GB
- GPU type: NVIDIA RTX A6000
- `Accelerate` default config:
	- compute_environment: LOCAL_MACHINE
	- distributed_type: MULTI_GPU
	- mixed_precision: bf16
	- use_cpu: False
	- debug: False
	- num_processes: 2
	- machine_rank: 0
	- num_machines: 1
	- gpu_ids: 0,1
	- rdzv_backend: static
	- same_network: True
	- main_training_function: main
	- downcast_bf16: no
	- tpu_use_cluster: False
	- tpu_use_sudo: False
	- tpu_env: []

Information

[ ] The official example scripts
[X] My own modified scripts

Tasks

[ ] One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
[X] My own task or dataset (give details below)

Reproduction
import torch
import torch.nn as nn
from torch import optim
from torch.utils.data import DataLoader
from torchvision import transforms
from torchvision import datasets
from torchvision.models import resnet18
from accelerate import Accelerator
from transformers import get_cosine_schedule_with_warmup

EPOCHS = 50
GRADIENT_ACCUM_STEPS = 2
BATCH_SIZE = 128
LEARNING_RATE = 0.001

### Init Accelerator ###
accelerator = Accelerator(gradient_accumulation_steps=GRADIENT_ACCUM_STEPS)

### Load Model ###
model = resnet18()
model = model.to(accelerator.device)

### Load Dataset ###
transform = transforms.Compose(
    [transforms.Resize((64,64)),
    transforms.ToTensor()]
)

mini_batchsize = BATCH_SIZE // GRADIENT_ACCUM_STEPS
trainset = datasets.CIFAR10(root=".", train=True, transform=transform, download=True)
testset = datasets.CIFAR10(root=".", train=False, transform=transform, download=True)
trainloader = DataLoader(trainset, batch_size=mini_batchsize, shuffle=True, num_workers=8, pin_memory=True)
testloader = DataLoader(testset, batch_size=mini_batchsize, shuffle=True, num_workers=8, pin_memory=True)

### Define Loss Function ###
loss_fn = nn.CrossEntropyLoss()

### Define Optimizer ###
optimizer = optim.AdamW(model.parameters(), lr=LEARNING_RATE)

### Define Scheduler ###
total_training_steps = len(trainloader) * EPOCHS
scheduler = get_cosine_schedule_with_warmup(optimizer,
                                            num_warmup_steps=500,
                                            num_training_steps=total_training_steps)

### Prepare Everything ###
model, optimizer, trainloader, testloader, scheduler = accelerator.prepare(
    model, optimizer, trainloader, testloader, scheduler
)

losses = []
accs = []

for epoch in range(EPOCHS):

        model.train()

        accumulated_loss = 0
        accumulated_accuracy = 0
        for images, targets in trainloader:

            ### Move Data to Correct GPU ###
            images, targets = images.to(accelerator.device), targets.to(accelerator.device)

            with accelerator.accumulate(model):

                ### Pass Through Model ###
                pred = model(images)

                ### Compute and Store Loss ##
                loss = loss_fn(pred, targets)
                accumulated_loss += loss / GRADIENT_ACCUM_STEPS

                ### Compute and Store Accuracy ###
                predicted = pred.argmax(axis=1)
                accuracy = (predicted == targets).sum() / len(predicted)

                ### Update Model ###
                accelerator.backward(loss)
                optimizer.step()
                scheduler.step()
                optimizer.zero_grad()

            ### Gather Training Loss Metrics ###
            if accelerator.sync_gradients and accelerator.is_main_process:
                print("gathering")
                gathered_loss = accelerator.gather_for_metrics(accumulated_loss)
                print(gathered_loss)
                gathered_acc = accelerator.gather_for_metrics(accuracy)
                print(gathered_acc)
                accumulated_loss = 0

Expected behavior
This is a very quick script that replicates a problem I have been having on gather() or gather_for_metrics(). When I run this on my machine, the forward pass through the model works just fine, then once we are about to sync gradients, then we can gather our metrics. I print out "gathering" before we do this, and the entire code hangs at "gathering" and nothing seems to happen. I could totally be doing this wrong, im just not sure what it could be?
What I want to be able to do is on my own custom models, to use Accelerate along with its gradient accumulation, and grab the training loss across the GPUs and average them to plot it.

As a baseline, I also ran the example script given for Gradient Accumulation and the gather_for_metrics() runs just fine, but its being done inside the evaluation loop not the training one

import torch
import torch.nn as nn
from torch import optim
from torch.utils.data import DataLoader
from torchvision import transforms
from torchvision import datasets
from torchvision.models import resnet18
from accelerate import Accelerator
from transformers import get_cosine_schedule_with_warmup

EPOCHS = 50
GRADIENT_ACCUM_STEPS = 2
BATCH_SIZE = 128
LEARNING_RATE = 0.001

### Init Accelerator ###
accelerator = Accelerator(gradient_accumulation_steps=GRADIENT_ACCUM_STEPS)

### Load Model ###
model = resnet18()
model = model.to(accelerator.device)

### Load Dataset ###
transform = transforms.Compose(
    [transforms.Resize((64,64)),
    transforms.ToTensor()]
)

mini_batchsize = BATCH_SIZE // GRADIENT_ACCUM_STEPS
trainset = datasets.CIFAR10(root=".", train=True, transform=transform, download=True)
testset = datasets.CIFAR10(root=".", train=False, transform=transform, download=True)
trainloader = DataLoader(trainset, batch_size=mini_batchsize, shuffle=True, num_workers=8, pin_memory=True)
testloader = DataLoader(testset, batch_size=mini_batchsize, shuffle=True, num_workers=8, pin_memory=True)

### Define Loss Function ###
loss_fn = nn.CrossEntropyLoss()

### Define Optimizer ###
optimizer = optim.AdamW(model.parameters(), lr=LEARNING_RATE)

### Define Scheduler ###
total_training_steps = len(trainloader) * EPOCHS
scheduler = get_cosine_schedule_with_warmup(optimizer,
                                            num_warmup_steps=500,
                                            num_training_steps=total_training_steps)

### Prepare Everything ###
model, optimizer, trainloader, testloader, scheduler = accelerator.prepare(
    model, optimizer, trainloader, testloader, scheduler
)

losses = []
accs = []

for epoch in range(EPOCHS):

        model.train()

        accumulated_loss = 0
        accumulated_accuracy = 0
        for images, targets in trainloader:

            ### Move Data to Correct GPU ###
            images, targets = images.to(accelerator.device), targets.to(accelerator.device)

            with accelerator.accumulate(model):

                ### Pass Through Model ###
                pred = model(images)

                ### Compute and Store Loss ##
                loss = loss_fn(pred, targets)
                accumulated_loss += loss / GRADIENT_ACCUM_STEPS

                ### Compute and Store Accuracy ###
                predicted = pred.argmax(axis=1)
                accuracy = (predicted == targets).sum() / len(predicted)

                ### Update Model ###
                accelerator.backward(loss)
                optimizer.step()
                scheduler.step()
                optimizer.zero_grad()

        model.eval()

        for images, targets in testloader:
            images, targets = images.to(accelerator.device), targets.to(accelerator.device)
            with torch.no_grad():
                pred = model(images)

                #### Compute Loss ###
                loss = loss_fn(pred, targets)

                ### Computed Accuracy ###
                predicted = pred.argmax(axis=1)
                accuracy = (predicted == targets).sum() / len(predicted)

                ### Gather across GPUs ###
                loss_gathered = accelerator.gather_for_metrics(loss)
                accuracy_gathered = accelerator.gather_for_metrics(accuracy)

As a test, I just threw in a validation loop that also gathers the loss and accuracy of the eval data and it works like a charm, I am probably just doing the gather in the training loop wrong due to the accumulate context manager, any advice would be really helpful!

I think I answered my own question... It looks like the problem was gather_for_metrics() isn't happy to be under accelerator.is_main_process(). So this script then works as far as I can tell:
import torch
import torch.nn as nn
from torch import optim
from torch.utils.data import DataLoader
from torchvision import transforms
from torchvision import datasets
from torchvision.models import resnet18
from accelerate import Accelerator
from transformers import get_cosine_schedule_with_warmup

EPOCHS = 50
GRADIENT_ACCUM_STEPS = 2
BATCH_SIZE = 128
LEARNING_RATE = 0.001

### Init Accelerator ###
accelerator = Accelerator(gradient_accumulation_steps=GRADIENT_ACCUM_STEPS)

### Load Model ###
model = resnet18()
model = model.to(accelerator.device)

### Load Dataset ###
transform = transforms.Compose(
    [transforms.Resize((64,64)),
    transforms.ToTensor()]
)

mini_batchsize = BATCH_SIZE // GRADIENT_ACCUM_STEPS
trainset = datasets.CIFAR10(root=".", train=True, transform=transform, download=True)
testset = datasets.CIFAR10(root=".", train=False, transform=transform, download=True)
trainloader = DataLoader(trainset, batch_size=mini_batchsize, shuffle=True, num_workers=8, pin_memory=True)
testloader = DataLoader(testset, batch_size=mini_batchsize, shuffle=True, num_workers=8, pin_memory=True)

### Define Loss Function ###
loss_fn = nn.CrossEntropyLoss()

### Define Optimizer ###
optimizer = optim.AdamW(model.parameters(), lr=LEARNING_RATE)

### Define Scheduler ###
total_training_steps = len(trainloader) * EPOCHS
scheduler = get_cosine_schedule_with_warmup(optimizer,
                                            num_warmup_steps=500,
                                            num_training_steps=total_training_steps)

### Prepare Everything ###
model, optimizer, trainloader, testloader, scheduler = accelerator.prepare(
    model, optimizer, trainloader, testloader, scheduler
)

losses = []
accs = []

for epoch in range(EPOCHS):

        model.train()

        accumulated_loss = 0
        accumulated_accuracy = 0
        for images, targets in trainloader:

            ### Move Data to Correct GPU ###
            images, targets = images.to(accelerator.device), targets.to(accelerator.device)

            with accelerator.accumulate(model):

                ### Pass Through Model ###
                pred = model(images)

                ### Compute and Store Loss ##
                loss = loss_fn(pred, targets)
                accumulated_loss += loss / GRADIENT_ACCUM_STEPS

                ### Compute and Store Accuracy ###
                predicted = pred.argmax(axis=1)
                accuracy = (predicted == targets).sum() / len(predicted)
                accumulated_accuracy += accuracy / GRADIENT_ACCUM_STEPS

                ### Update Model ###
                accelerator.backward(loss)
                optimizer.step()
                scheduler.step()
                optimizer.zero_grad()

            # if accelerator.sync_gradients and accelerator.is_main_process:
            if accelerator.sync_gradients:
                loss_gathered = accelerator.gather_for_metrics(accumulated_loss)
                accuracy_gathered = accelerator.gather_for_metrics(accumulated_accuracy)

                accumulated_loss, accumulated_accuracy = 0, 0

        model.eval()

        for images, targets in testloader:
            images, targets = images.to(accelerator.device), targets.to(accelerator.device)
            with torch.no_grad():
                pred = model(images)

                #### Compute Loss ###
                loss = loss_fn(pred, targets)

                ### Computed Accuracy ###
                predicted = pred.argmax(axis=1)
                accuracy = (predicted == targets).sum() / len(predicted)

                ### Gather across GPUs ###
                loss_gathered = accelerator.gather_for_metrics(loss)
                accuracy_gathered = accelerator.gather_for_metrics(accuracy)

If this can be verified that this is the correct way to do this, that would be really helpful!

Yes indeed, it calls gather (hence the name) so it was waiting to hear from the other professes :)


Deprecate system/check-smart.rb in favor of smart/check-smart.rb

I think plugins/smart/check-smart.rb works better than plugins/system/check-smart.rb (and also plugins/system/check-disk-health.sh). As an author of plugins/system/check-smart.rb, I'd like to deprecate it in favor of plugins/smart/check-smart.rb because having multiple plugins which do the same thing may be confusing.

@maoe  I am going to close this issue but we are working on various solutions to this and in the very near future this should no longer be an issue.


Rename AudioStreamRandomPitch to AudioStreamRandomizer and add additional randomization options

Implements https://github.com/godotengine/godot-proposals/issues/3281
This kind of logic is necessary for most polished games so it would be nice to have it in core.
https://user-images.githubusercontent.com/1936763/132998298-869634b7-5438-44d1-89b6-21763f4b45e5.mp4

cc @reduz :)

Fantastic work! Apologies for my delay in reviewing it, as it went under my radar.

Needs a rebase and it can be merged.

Thanks!


Refactor pending changes with live mgiration

📝 Description
Fixing 2 bugs with that:

vms created through IT do not show pending changes
adding hotplug network triggers also the pending changes on the 'default' network. If vms do not have networks, vmi will have one default network. But no pending change should be triggered in this case.

🎥 Demo
Before
No pending changes
After

/retest

/lgtm


How to set a pin in middle?

I have a dual seek bar with values ranging from 1 to 100. If my left value is 30 and right value is 70.
How do I make the left and right pins appear at 30 and 70 respectively. By default these value start at 0 and 100 respectively.
Below is an example of what I want to achieve. How to achieve this programatically?
    30                70
----O-----------------O--------

Hi there. I dont know if you already figured it out, if not I suggest to use method setRangePinsByValue(float leftPinValue, float rightPinValue) which comes from RangeBar class.


Expose provider for signature file in extension

This adds outputSignatureFileProvider: Provider<RegularFile> to the plugin's extension. This provider can be used for wiring up other tasks that use the API signature file as an input.

Added in 77bb6f7


Update needed to MatCha and DePlot model card on HF.  Specifically the finetuning section please

From the DePlot README we are directed to the finetuning section on the MatCha model card found at HF.  From there we are directed to the image_captioning_pix2struct notebook.
The challenge is that we're using a different processor from the example, initialized with:
processor = Pix2StructProcessor.from_pretrained("google/deplot")
It's therefore not clear the further changes required to fine tune the models based on the example notebook.  On the model card we are shown the example, inputs = processor(images=images, text="Generate underlying data table of the figure below:", return_tensors="pt").
Users would do well if the model card page  can describe the additional changes required to run the notebook without errors.
The code below is from the original notebook which needs updating:
from torch.utils.data import Dataset, DataLoader

MAX_PATCHES = 1024

class ImageCaptioningDataset(Dataset):
    def __init__(self, dataset, processor):
        self.dataset = dataset
        self.processor = processor

    def __len__(self):
        return len(self.dataset)

    def __getitem__(self, idx):
        item = self.dataset[idx]
        encoding = self.processor(images=item["image"], return_tensors="pt", add_special_tokens=True, max_patches=MAX_PATCHES)

        encoding = {k:v.squeeze() for k,v in encoding.items()}
        encoding["text"] = item["text"]
        return encoding

def collator(batch):
  new_batch = {"flattened_patches":[], "attention_mask":[]}
  texts = [item["text"] for item in batch]

  text_inputs = processor(text=texts, padding="max_length", return_tensors="pt", add_special_tokens=True, max_length=20)

  new_batch["labels"] = text_inputs.input_ids

  for item in batch:
    new_batch["flattened_patches"].append(item["flattened_patches"])
    new_batch["attention_mask"].append(item["attention_mask"])

  new_batch["flattened_patches"] = torch.stack(new_batch["flattened_patches"])
  new_batch["attention_mask"] = torch.stack(new_batch["attention_mask"])

  return new_batch

Hi,
Not sure if you are referring to something else. If you are talking about using AutoProcessor and Pix2Struct processor.
I checked AutoProcessor and Pix2StructImageProcessor. Turns out they output the same values. Understandable because Matcha uses Pix2Struct architecture.

Hi,
Not sure if you are referring to something else. If you are talking about using AutoProcessor and Pix2Struct processor.
I checked AutoProcessor and Pix2StructImageProcessor. Turns out they output the same values. Understandable because Matcha uses Pix2Struct architecture.


Update version numbers to 3 segments

Use semver-friendly version numbers. For instance, 5.0.1

Fixed in https://github.com/AzureAD/devex-build/pull/84

Fixed in Jenkins build.


Response Code 200

I wrote last week this issue #741. But this Issue is not resolved just yet. The PullRequest that has been made is also not working.
Why is this just happening on the prod environment and not on local development? Both instances of php and packages are exactly the same.
Help would be appreciated! 👍

Can you try use "getAccountInfo"? Are you getting the same error?

Yes, I've tried it the way they suggested in the #741 with the getAccountInfo . The PR that was made duplicated sort of that functionality but also tried using that. Both solutions work locally but the moment it goes live or what so, it breaks.

No, it's not duplicate, becouse of method uses different endpoint
Are you use login? And can you give me response html (tag head)?

I'm not logging in. The profile I want to get is public. I'll see if I can get the HTML for you later today! I'll respond then again on this ticket.

Same issue here

@lefuturiste @igorconde  try with login and getAccountInfo
Instagram blocked suspicious non-auth requests,  i thinking  in production your application uses famous subnet (aws or similar)

And for production you should use different accounts(for production, for test etc), becouse of instagram check location by ips.
For more reliability use two factor auth (check account email for two factor code parsing, or include something for mobile confirmation, if you use confirmation by phone)

I really don't understand because I created a simple and ugly scrapper with file_get_contents().
And it's totally working on both development and production environment.
Code here:
https://gist.github.com/lefuturiste/a8442b36510ad4ae2b3495a1de23b9ca
API: https://api.werobot.fr/photos

@lefuturiste and now try get profile_picture_url with graphql/query/ :) Look how this scrammer works and what endpoits it use, but I agree, for media maybe graphql/query/ is better solution

Thanks @lefuturiste . Gonna test that simple class tomorrow. I really only need the media 👍

@zavodnoyapl1992 Will try the login also. But I find it rather sketchy to use a login on a "scraper". If you know what I mean 🤔

Thanks @lefuturiste . Gonna test that simple class tomorrow. I really only need the media
Tho I've got a question about that query hash. What is it? How is it generated?

I don't known I think I just copy/paste it from a code somewhere (or my browser network tab). I don't think this is too important

@lefuturiste Tried your solution. This works fine. Feels weird to use it this way. The real scraper vibe haha.
Query hash is needed so the graph server knows it comes from a save address. Tried my own hash but that didnt work.
Yet this doesnt mean that this package problem is solved yet.


Could anyBroker()  be made more relient?

Versions

Sarama
Kafka
Go

v1.38.1
2.3.0
1.18

Configuration
What configuration values are you using for Sarama and Kafka?
config := sarama.NewConfig()
config.Version = version
config.Consumer.Offsets.Initial = sarama.OffsetOldest
ConsumerGrpClient, err =  sarama.NewConsumerGroup(core.KafkaInitialBrokers, consumerGrpId, config)

Logs
[sarama] 2023/06/18 18:12:34 tryRefreshMetadata(): client/metadata fetching metadata for [__consumer_offsets] from broker <IP_ADDRESS>:9092
[sarama] 2023/06/18 18:12:34 tryRefreshMetadata(): successfully fetched metadata for topics.
[sarama] 2023/06/18 18:12:34 Unexpected topic-level metadata error: kafka server: Replication-factor is invalid.
[sarama] 2023/06/18 18:12:34 ERROR:  tryRefreshMetadata(): successfully fetched metadata but failed on updateMetadata, err: kafka server: Replication-factor is invalid.
[sarama] 2023/06/18 18:12:34 ERROR:  client/coordinator the __consumer_offsets topic is not initialized completely yet. Waiting 2 seconds...
[sarama] 2023/06/18 18:12:34 tryRefreshMetadata(): successfully fetched metadata for topics.
[sarama] 2023/06/18 18:12:34 Unexpected topic-level metadata error: kafka server: Replication-factor is invalid.
[sarama] 2023/06/18 18:12:34 ERROR:  tryRefreshMetadata(): successfully fetched metadata but failed on updateMetadata, err: kafka server: Replication-factor is invalid.
[sarama] 2023/06/18 18:12:34 ERROR:  client/coordinator the __consumer_offsets topic is not initialized completely yet. Waiting 2 seconds...

Problem Description
Within client.go::findCoordinator() and tryRefreshMetadata(), it asks anyBroker() for the endpoint of the request.  anyBroker() will return the same endpoint (first one of the client.seedBrokers list).  This is an issue if the chosen endpoint is misconfigured (it will return a error response).  In this use case, the broker is not evicted from the client.seedBrokers list.
Could anyBroker() be more resilient with the following enhancement?

What is the downside of anyBroker() returning a random endpoint from client.seedBrokers()?
Base on Sarama's wiki page (https://github.com/Shopify/sarama/wiki/Cluster-metadata), a suggestion was made to use client.brokers list and ignore client.seedBrokers once initialization is completed.

Although the code gives the appearance of always choosing the first seed broker, there are a few code paths that randomise the seed brokers slice via client.randomizeSeedBrokers such that this should be a different order at various points in time

I believe that the changes made under https://github.com/IBM/sarama/pull/2645 have improved this area so I'm going to go ahead and close this issue as fixed by that. Feel free to re-open if you have further concerns


Implement OpenJDK 9 Image

This PR adds an openjdk:9 image, which can be built alongside the existing openjdk:8 image.
Other notable changes:

Created two new maven modules, openjdk-common and openjdk-test-common to store common resources and tests between the two images.
Modified the build.sh script to require a module (openjdk8 or openjdk9)to be specified, as we will be building/releasing only one image at a time
Moved structure_test.sh and local_integration_test.sh into the integration-test phase of the maven build. This simplifies both the maven and the cloudbuild.yaml configuration

Still TODO:

In order to run local_integration_test.sh, docker client must be installed on the builder image:

[x] bug fix in javac/docker base image https://github.com/GoogleCloudPlatform/cloud-builders/pull/108
[x] set javac/docker image as the maven builder's base image https://github.com/GoogleCloudPlatform/cloud-builders/pull/111

@meltsufin @cassand @balopat I've addressed all remaining TODOs and I believe I've addressed all PR comments. Mind giving this another review?

:+1: Thanks @balopat ! The out directory was committed by mistake - good catch.

if we add new JVM options which are specific for the openjdk-9 runtime (see for example https://github.com/GoogleCloudPlatform/openjdk-runtime/issues/137) - where would they fit in this multi-module design?

I'd think they should live in the src/main/docker dir within the module that they're specific to. Then the dockerfile would have access to them during the docker build. If we wanted to set additional JVM flags, we could add a script to the setup-env.d directory that modifies the args accordingly.

Great, all in my opinion, this is all solid work, great job! LGTM

@meltsufin Do you mind giving this another review so it can be merged? Thanks!


Preload HSTS

Support preloading HSTS.  That way, many browsers will know ahead-of-time that they should use HTTPS, and not even try to use HTTP.   This is broken out from #482.
I have already made some changes to support HSTS preload.  However, coreinfrastructure.org also has to have configuration change before it can be submitted to the list managed by Chrome.
For what's left to do, see:
https://hstspreload.appspot.com/?domain=coreinfrastructure.org

I've sent an email to the Linux Foundation asking them to reconfigure "coreinfrastructure.org" to support HSTS preload.

All done!
The "coreinfrastructure.org" site has been reconfigured to support HTTPS throughout, and it is now included in Chrome's HTTP Strict Transport Security (HSTS) preload list (so it's hardcoded to be HTTPS only).  Note that most major browsers (Chrome, Firefox, Opera, Safari, IE 11 and Edge) also have HSTS preload lists based on the Chrome list.


[BUG] Relogging on a space ship causes planets to spin wildly in the skybox

[Please fill out the form below and delete the sections in square brackets after reading them]
Version of Advanced Rocketry
AdvancedRocketry-1.12.2-1.7.0-232-universal
Have you verified this is an issue in the latest unstable build

[ ] Y
[x] N
[ ] N/A

Version of LibVulpes
LibVulpes-1.12.2-0.4.2-75-universal
Version of Minecraft
1.12.2
Does this occur without other mods installed

[ ] Y
[ ] N
[x] N/A

Crash report or log or visualVM (if applicable)
debug.log
latest.log
Both are too large for pastebin, sorry
Description of the problem
If you relog while on a space ship in orbit, the planet will spin wildly. Tested by doing nothing but relogging. It doesn't get fixed by warping, or by leaving the station and coming back.
Video

Yes

Yes it is. Stalebot I will stab you in the face.

Yes it is. Stalebot I will stab you in the face.

Don't do that. It is doing its job and since due to lack of activity of the
devs, the issues will not be fixed.
On Thu, Jan 7, 2021, 7:51 AM Aaron Howser<EMAIL_ADDRESS>wrote:

Yes it is. Stalebot I will stab you in the face.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/zmaster587/AdvancedRocketry/issues/1911#issuecomment-756128348,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGVDBJAXMFJH3Z2YYWUTZ3DSYW353ANCNFSM4Q6K2QWQ
.

Don't do that. It is doing its job and since due to lack of activity of the
devs, the issues will not be fixed.
On Thu, Jan 7, 2021, 7:51 AM Aaron Howser<EMAIL_ADDRESS>wrote:

Yes it is. Stalebot I will stab you in the face.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/zmaster587/AdvancedRocketry/issues/1911#issuecomment-756128348,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGVDBJAXMFJH3Z2YYWUTZ3DSYW353ANCNFSM4Q6K2QWQ
.

AdvancedRocketry-1.12.2-1.7.0-universal.zip
Here's a build with a possible fix - it's likely to reset some things to default on update but they can be interacted with to reset. Does the issue still happen wit this build?

AdvancedRocketry-1.12.2-1.7.0-universal.zip
Here's a build with a possible fix - it's likely to reset some things to default on update but they can be interacted with to reset. Does the issue still happen wit this build?

Nope, it works perfectly fine using that

Nope, it works perfectly fine using that

Great! I fixed some other major issues in the process too, which is nice - it turns out this was appearing as a SP bug too but in a much more.... mundane form. SP, same as MP, didn't persist states, so it just went down to min but never spun like crazy as it did for server.

Great! I fixed some other major issues in the process too, which is nice - it turns out this was appearing as a SP bug too but in a much more.... mundane form. SP, same as MP, didn't persist states, so it just went down to min but never spun like crazy as it did for server.

I never tried in multiplayer, all of this was in singleplayer. Glad you figured it out though!

I never tried in multiplayer, all of this was in singleplayer. Glad you figured it out though!

For some reason I thought it was MP then. :P Either way, the problem's fixed now and the area has extra sanity checking so it shouldn't be able to come up again in any form. Plus the station's now the one storing the targets and not the controller (controller still increases, though), so settings persist across controllers being broken by mistake, which is a nice bonus.

For some reason I thought it was MP then. :P Either way, the problem's fixed now and the area has extra sanity checking so it shouldn't be able to come up again in any form. Plus the station's now the one storing the targets and not the controller (controller still increases, though), so settings persist across controllers being broken by mistake, which is a nice bonus.

Fixed in 2.0.0


testing build issues with specific SRE branch

One-line summary

SRE-4227

Description
A few sentences describing the overall goals of the pull request's
commits.
Review

[ ] Tests
[ ] Documentation

Deployment Notes
These should highlight any db migrations, feature toggles, etc.

:tada: This PR is included in version 1.2.7 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


[Bug]: Server load time

Description
When I start the server, it takes up a really long time to get a response which is odd.
To Reproduce
Start the server locally
Anything else?
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Nuke!


Build failing on CentOS 7

Build fails on run or download after updating system, new dotnet upgraded, dotnet-host-2.1.0_rc1-1.x86_64
Output from running the download option when running the script to run/update Nadeko
Build FAILED.
CSC : warning CS8032: An instance of analyzer Microsoft.EntityFrameworkCore.RawSqlStringInjectionDiagnosticAnalyzer cannot be created from /home/nadeko/.nuget/packages/microsoft.entityframeworkcore.analyzers/2.1.1/analyzers/dotnet/cs/Microsoft.EntityFrameworkCore.Analyzers.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.. [/home/nadeko/NadekoInstall_Temp/NadekoBot/NadekoBot.Core/NadekoBot.Core.csproj]
Modules/Music/Common/PoopyBufferReborn.cs(74,16): error CS0619: 'ReadOnlySpan' is obsolete: 'Types with embedded references are not supported in this version of your compiler.' [/home/nadeko/NadekoInstall_Temp/NadekoBot/NadekoBot.Core/NadekoBot.Core.csproj]
1 Warning(s)
1 Error(s)

I restored a snapshot from before I updated CentOS where NadekoBot is working. Updating only NadekoBot resulted in the same build failure.

Run the script from the Linux guide and do options 4 and 1. Then try running the bot again.

Yes, you didn't update your prerequisites, as kaoticz said.


Added fediverse Author attribution attribute

Yesterday Mastodon 4.3.0 was released And, among other features, added the ability to attribute yourself to links from your site.
It adds a small tag (by / more from) - profile link - under all links from allowed domains that the other or you share on Mastodon. For better illustration it looks like:

It can be done by adding new meta tag ediverse:creator to head of your website.
I updated the Head Partial and added new parameters under Verification. (As in Mastodon, this option is under Profile -> Verification -> Author attribution)

@MayMeow can you also add documentation as to how this works? (i.e. what values to edit, how to format the fediverse handle)

In the docs, instead of Mastodon handle put Fediverse handle and the supported fedi software (if applicable).

Like this one:  "The fediverse handle to include in the site metadata. Include the server domain in the username, e.g<EMAIL_ADDRESS>This is currently supported on Mastodon." ?
To display this verification, you need to configure your account. From my latest knowledge, this is possible on Mastodon.

To add to it, this verification is then displayed on the web and the official Mastodon application under shared links to your site.
Other apps like Ivory (iOS), Ice Cubes (iOS), or Mona (iOS) also support this.

In the docs, instead of Mastodon handle put Fediverse handle and the supported fedi software (if applicable).

Like this one: "The fediverse handle to include in the site metadata. Include the server domain in the username, e.g<EMAIL_ADDRESS>This is currently supported on Mastodon." ?
To display this verification, you need to configure your account. From my latest knowledge, this is possible on Mastodon.

just replace Mastodon with fediverse, you can link to a profile on any fediverse software even if the link will only show up if your page is shared on Mastodon.

Thanks @MayMeow and @Ast3risk-ops


ci: Stop alerting in ##jwf on Freenode IRC

Pretty sure I forgot to delete this line when I copied the Travis config
from another one of my repos. Doesn't make sense to have
FOSSRIT/infrastructure notifications echo in my IRC support channel.

Thanks @kennedy! Merging it in. :clapper:


Is Fetch can do Bandwidth throttling

You can implement your own custom downloader to do this but Fetch does not support throttling by default.


[BUG] Bitfinex new derivatives accounts break

I've enabled derivatives in my account (but not looking to trade them) and lean live algorithm will not work anymore for BTC (I'm not using or adding USTF0USD or USDUSTF0 in Lean)
During the algorithm initialization, the following exception has occurred: System.ArgumentException: In order to maintain cash in USTF0 you are required to add a subscription for Forex pair USTF0USD or USDUSTF0
  at QuantConnect.Securities.Cash.EnsureCurrencyDataFeed (QuantConnect.Securities.SecurityManager securities, QuantConnect.Data.SubscriptionManager subscriptions, System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] marketMap, QuantConnect.Data.UniverseSelection.SecurityChanges changes, QuantConnect.Interfaces.ISecurityService securityService, System.String accountCurrency) [0x003fc] in <11e294a956824f4482fa77611740f972>:0
  at QuantConnect.Securities.CashBook.EnsureCurrencyDataFeeds (QuantConnect.Securities.SecurityManager securities, QuantConnect.Data.SubscriptionManager subscriptions, System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] marketMap, QuantConnect.Data.UniverseSelection.SecurityChanges changes, QuantConnect.Interfaces.ISecurityService securityService) [0x0002f] in <11e294a956824f4482fa77611740f972>:0
  at QuantConnect.Lean.Engine.DataFeeds.CurrencySubscriptionDataConfigManager.EnsureCurrencySubscriptionDataConfigs (QuantConnect.Data.UniverseSelection.SecurityChanges securityChanges) [0x00049] in <9bfcb9ab77a9473faabc3e11023be0c6>:0
  at QuantConnect.Lean.Engine.DataFeeds.UniverseSelection.EnsureCurrencyDataFeeds (QuantConnect.Data.UniverseSelection.SecurityChanges securityChanges) [0x00000] in <9bfcb9ab77a9473faabc3e11023be0c6>:0
  at QuantConnect.Lean.Engine.Setup.BaseSetupHandler.SetupCurrencyConversions (QuantConnect.Interfaces.IAlgorithm algorithm, QuantConnect.Lean.Engine.DataFeeds.UniverseSelection universeSelection) [0x00006] in <9bfcb9ab77a9473faabc3e11023be0c6>:0
  at QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler.Setup (QuantConnect.Lean.Engine.Setup.SetupHandlerParameters parameters) [0x00540] in <9bfcb9ab77a9473faabc3e11023be0c6>:0 In order to maintain cash in USTF0 you are required to add a subscription for Forex pair USTF0USD or USDUSTF0

@jaredbroad any chance anyone can take a look on fixing new Bitfinex accounts?

Closed by https://github.com/QuantConnect/Lean/pull/5786


Error detected while processing lightline#enable

Hello,
first of all thank you for this great plugin.
Since https://github.com/itchyny/lightline.vim/commit/2d482e82f2e13c6d7bad3a0aabfc44f8aba945ed I'm getting the following error whenever I start neovim:
Error detected while processing function lightline#enable:
line   13:
E216: No such group or event: lightline-disable

After wrapping the autocmd! lightline-disable and augroup! ligthline-disable lines of the lightline#enable function in a try-catch block this does not occur anymore:
  try
      autocmd! lightline-disable
      augroup! lightline-disable
  catch
  endtry

However, I'm not sure if this really fixes the issue or just hides the symptom.
I'm using the version v0.5.0-828-g0a95549d6 of Neovim. Neovim v0.5.0 is not yet released, so there is a possibility that my issue is related to something in Neovim.

Thanks for reporting, I reverted the commit.


Error Running CAMP Report in PS

Error:10/02/2023 10:54:14 There was an issue in running the tool. Please try running the tool again after some time.
Please refer to the documentation and FAQs available at https://github.com/OfficeDev/CAMP/blob/main/README.md to get guidance for resolving common issues. If the issue pe
rsists, please write to us at<EMAIL_ADDRESS>along with log file at
Warning:10/02/2023 10:54:14 The report generated may have reduced information due to errors in running the tool. These errors may occur due to multiple reasons. Please re
fer documentation for more details.

I am getting the same error

I managed to run the script on a different device than my work device and it worked I was able to generate the report. Could have been policies on my work device blocking the script...


Implement using_encoded to use stack for Compact primitive types

Right now it will allocate a Vec, which is unnecessary.

(I'm not sure about the policy about closing issue)

It should be closed when it's solved :)
You can also write e.g. "Closes #29" in a PR description and it will be automatically closed


API: Removing value (link to an external resource) not possible

DELETE /api/entities/{id}/values/{prefixedKey}
Removing the link to https://serlo.org/1535 is not possible:
<Test_Entity> sdo:isPartOf <https://serlo.org/1535> .

Fixed, please test again

For the prefixedKeys "sdo.isPartOf" and "skos:prefLabel" I receive:
"status": 400,
"error": "Bad Request",
"message": "value parameter should be a URI, BNode or Literal",

Please test again

Tested removing values with the entitygraph python client for sdo.isPartOf, schema.isPartOf and skos.prefLabel.
Everything worked fine. Thanks!


Accessing sources from npm package

Hello!
I have a project in which I use typedi through npm. The npm-package includes source-map files for all .js files. However, those source maps reference original files like this: ../../src/Container.ts, so this path leads outside of node_modules directory and points to non-existent source files.
I'm using source-map-support module to make stack traces more readable, but the source maps of typedi make reported paths weird. It tries to resolve them to files in my project. This complicates debugging.
Actually, I would love those stack traces to be resolved back to original TypeScript files, but sadly the npm-package doesn't contain source files at all. If source files were present it would allow to much easier trace and resolve errors in projects and even to use debugger to dive into internals of typedi when used with the real project (this really helps with integration).
So, I think there could be two courses of action:
1). Add source .ts files to the npm-package.
2). Remove source maps from npm package because they point to inexistent files.
Does it makes sense?
Thank you.

Shipping Typescript files instead of plain js files would make this project consumable by Typescript projects only, while now it can be used with plain JS as well.
Also shipping TS files is considered as a bad practice. (I don't know the why. :( )

no, we cant ship ts files with package, it should not be done at all. If source maps point to wrong location then they simply need to be fixed. Try to debug and figure out why paths aren't valid.

Why don't you want to treat TypeScript files as a first class citizens? We are developing a TypeScript modules are we not? The generated .js files should be actually treated like secondary ones and only for the sake of users who don't want to compile them themselves.

Shipping Typescript files instead of plain js files would make this project consumable by Typescript projects only...

I totally agree with you, but I've never proposed to ship them instead of .js, I'm proposing to ship them as a main code and ship generated .js additionally to .ts for better compatibility with native (vanilla) JavaScript projects. So the package = TS [+ JS].
It's really nice to have source files inside node_modules, because when error happens, or when you debugging things interactively with IDE you can just click on a stack trace and navigate around the call stack. This is invaluable when integrating project with third-party dependencies. And I truly believe that this must be an integral part of great developer experience. For example reflect-metadata module contains source files and it makes working with this module very convenient.
It's very helpful to see method or class implementation when you navigate around classes, but instead you have to see blunt typings. So in order to study internals of the typedi or typeorm I have to open them in a separate window as a separate IDE project and to copy-paste class names or paths to files. This makes no sense at all.

no, we cant ship ts files with package, it should not be done at all

Could you elaborate on this please? What are the actual drawbacks?

If source maps point to wrong location then they simply need to be fixed. Try to debug and figure out why paths aren't valid.

How do you propose to fix them? The source maps only contain a reference to the original source file, which allows to resolve the actual place in it. If there is no source files in the package, then there is no sense for keeping the source maps, because it breaks the IDE (source-maps just point nowhere). It would be even better without source maps at all — at least you will be able to see the error in generated .js files instead of broken references.

Could you elaborate on this please? What are the actual drawbacks?

I can't remember at the moment. Last time I did it was few years ago and I faced lot of unresolvable problems. Don't remember what were the problems. Probably this needs research to refresh the memory

The source maps only contain a reference to the original source file, which allows to resolve the actual place in it.

Im not sure but I think code can be embed into source maps, probably need some research there...

@pleerock So, your reaction was superstitious. I will strongly suggest to review this matter and I would really love to see these libraries published as TypeScript files. If you want, I can create a sample package in order to test if it works correctly and is not raising any problems. Probably a lot have changed since you've tried this the last time.
@NoNameProvided do you have any thoughts on this?

I am no source-map expert, I only have examples. Both Angular and Ionic team stopped shipping their TS files for various problems. The only one I remember now is having duplicated typings which cause errors with VS Code and other IDEs which are aware of TS.

I see. However, why do we need typings when source files are available? I always though that typings are for legacy JavaScript code to make it usable with TypeScript. I'm I wrong?

Typings are for TS users, to get the benefits of types even after the project is compiled down to JS.
Anyway I think @pleerock is right about this:

Im not sure but I think code can be embed into source maps, probably need some research there...

So instead of not compiling to JS we should research how generate proper map files.

@slavafomin I suggest you to deeply research this question and understand why other libraries do not ship ts files instead of typings. Understand why others not packaging ts sources with package (its not only about angular, ionic). Understand how debugging is done in lets say angular. Btw there is one article I found that does not recommend to publish ts in packages.

routing-controllers (at least 0.6.11) has ts source files inside package alongside js and map files. I've never had any issues with importing and duplicated types thanks to correctly set "main": "index.js", "typings": "index.d.ts" and debugging show the source file instead of transpiled garbage which is great 😉

no, it does not. It has only js files, source maps and .d.ts files in the package

Btw there is one article I found that does not recommend to publish ts in packages.

It treat about TS 1.6 so it's a bit out of date. My experiments prove that VSCode handle ts source in package very well. There is no compile error or sth, tsc and VSCode treat this *.ts file like it doesn't exist, they doesn't parse it so no error is raised even if I delete a half of the source code 😆
However ts source file takes precedence over *.d.ts file when "typings" or "types" is not defined in package.json.

I remember when I did it last time I had problems, but it was a few years ago, maybe things changed from those times. For now I don't see a reason why we shall include ts files in the package. If someone disagree we need to discuss it in details and maybe implement in all packages, not just typedi.


Fix #17593 adding $screen-*-min/max

Fix twbs/bootstrap#17593 Uses static variable assignment since SASS doesn't support dynamic variable assignment yet.

Given that our new grid is fully customizable (including the names and the number of breakpoints),  adding these variables does not seem like a good idea.

Agreed.


OCPBUGS-29773: set Konnectivity cipher suites

What this PR does / why we need it:
This PR sets the cipher suite parameter for Konnectivity server
Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes # https://issues.redhat.com/browse/OCPBUGS-29773
Checklist

[x] Subject and description added to both, commit and PR.
[x] Relevant issues have been referenced.
[ ] This change includes docs.
[ ] This change includes unit tests.

/ok-to-test

/retest

/retest

/retest

/jira refresh

/cherry-pick release-4.15
/cherry-pick release-4.14

/cherry-pick release-4.14

/cherry-pick release-4.13