How to do inference after train llama2

i trained model using this command
autotrain llm --train --project_name 'llama2-indo-testing' \
    --model meta-llama/Llama-2-7b-hf \
    --data_path data/ \
    --text_column text \
    --use_peft \
    --use_int4 \
    --learning_rate 2e-4 \
    --train_batch_size 2 \
    --num_train_epochs 3 \
    --trainer sft \
    --model_max_length 2048 \
    --push_to_hub \
    --repo_id fhadli/llama2-7b-hf-id \
    --block_size 2048 \
    > training.log

after that, i tried to load the model using this script
from transformers import AutoTokenizer
import transformers
import torch

model = "/home/muhammad.fhadli/explorasi/llama2-indo/llama2-indo-testing"

tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    torch_dtype=torch.float16,
    device_map="auto",
)

but it gave me this error, can someone please explain why i got this error, or what is the rigth way to do inference?
Traceback (most recent call last):
  File "play.py", line 8, in <module>
    pipeline = transformers.pipeline(
  File "/home/muhammad.fhadli/.pyenv/versions/3.8.10/envs/llama/lib/python3.8/site-packages/transformers/pipelines/__init__.py", line 705, in pipeline
    config = AutoConfig.from_pretrained(model, _from_pipeline=task, **hub_kwargs, **model_kwargs)
  File "/home/muhammad.fhadli/.pyenv/versions/3.8.10/envs/llama/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 983, in from_pretrained
    config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/muhammad.fhadli/.pyenv/versions/3.8.10/envs/llama/lib/python3.8/site-packages/transformers/configuration_utils.py", line 617, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/muhammad.fhadli/.pyenv/versions/3.8.10/envs/llama/lib/python3.8/site-packages/transformers/configuration_utils.py", line 672, in _get_config_dict
    resolved_config_file = cached_file(
  File "/home/muhammad.fhadli/.pyenv/versions/3.8.10/envs/llama/lib/python3.8/site-packages/transformers/utils/hub.py", line 388, in cached_file
    raise EnvironmentError(
OSError: /home/muhammad.fhadli/explorasi/llama2-indo/llama2-indo-testing/ does not appear to have a file named config.json. Checkout 'https://huggingface.co//home/muhammad.fhadli/explorasi/llama2-indo/llama2-indo-testing//None' for available files.

here is the content inside my folder
$ls /home/muhammad.fhadli/explorasi/llama2-indo/llama2-indo-testing/
adapter_config.json  optimizer.pt  rng_state_0.pth  scheduler.pt             tokenizer_config.json  tokenizer.model     training_args.bin
adapter_model.bin    README.md     rng_state_1.pth  special_tokens_map.json  tokenizer.json         trainer_state.json

I am having the same issue and I can't seem to figure out a way around it right now.

This should really be in the ReadMe ^^^

it seems:
after autotrain-advanced you need to merge finetuned with base-model: for this i found here
base_model_name = "abhishek/llama-2-7b-hf-small-shards" # change for your basemodel
new_model_name = "my-llm"
model_path = "my-llm/merged"
device_map = {"": 0} # single gpu?
base_model = AutoModelForCausalLM.from_pretrained(
base_model_name,
low_cpu_mem_usage=True,
return_dict=True,
torch_dtype=torch.float16,
device_map=device_map,
)
model = PeftModel.from_pretrained(base_model, new_model_name)
merged_model = model.merge_and_unload()
Reload tokenizer to save it
tokenizer = AutoTokenizer.from_pretrained(base_model_name, trust_remote_code=True)
tokenizer.pad_token = tokenizer.eos_token
tokenizer.padding_side = "right"
Save the merged model
merged_model.save_pretrained(model_path)
tokenizer.save_pretrained(model_path)
and than this can be used for inference (but not working for me out of the box);
################ Inference something like this
from transformers import AutoModelForCausalLM, AutoTokenizer
model_path = "my-llm/merged"
model = AutoModelForCausalLM.from_pretrained(model_path)
tokenizer = AutoTokenizer.from_pretrained(model_path)
from transformers import pipeline
prompt = "your promt here"
gen = pipeline('text-generation', model=model, tokenizer=tokenizer)
result = gen(prompt)
print(result[0]['generated_text'])
But unfortunately for me it just reprints my own promt ..

after autotrain-advanced you need to merge finetuned with base-model
or you can use --merge-adapters parameter

But unfortunately for me it just reprints my own promt ..

@msobo Did you try increasing max_new_tokens ? Limit is set at 20 by default.

This is one way to load the model as:
tokenizer = AutoTokenizer.from_pretrained('your_finetune_model/checkpoint-51/') model = AutoModelForCausalLM.from_pretrained('Base_Model', torch_dtype = torch.float16, device_map="auto") #Base_Model for example :meta-llama/Llama-2-13b-chat-hf model = PeftModel.from_pretrained(model, 'your_finetune_model', device_map="auto")
or you would need to merge the adapter weights into the base model. So you have single model dir and then you can load it the HF way
from peft import AutoPeftModelForCausalLM
model = AutoPeftModelForCausalLM.from_pretrained( args.output_dir, #lora model dir low_cpu_mem_usage=True, )
#Merge LoRA and base model merged_model = model.merge_and_unload()
#Save the merged model merged_model.save_pretrained("merged_model",safe_serialization=True) tokenizer.save_pretrained("merged_model")
#push merged model to the hub #merged_model.push_to_hub("user/repo") #tokenizer.push_to_hub("user/repo")

This gives me a RAM error on Kaggle. My LLAMA v2 Finetune hyperparameters in below. could it be related to batch size?
Hyperparameters
learning_rate = 2e-4 # @param {type:"number"}
num_epochs = 1 #@param {type:"number"}
batch_size = 4 # @param {type:"slider", min:1, max:32, step:1}
block_size = 1024 # @param {type:"number"}
trainer = "sft" # @param ["default", "sft"] {type:"raw"}
warmup_ratio = 0.1 # @param {type:"number"}
weight_decay = 0.01 # @param {type:"number"}
gradient_accumulation = 4 # @param {type:"number"}
use_fp16 = True # @param ["False", "True"] {type:"raw"}
use_peft = True # @param ["False", "True"] {type:"raw"}
use_int4 = True # @param ["False", "True"] {type:"raw"}
lora_r = 16 #@param {type:"number"}
lora_alpha = 32 #@param {type:"number"}
lora_dropout = 0.05 #@param {type:"number"}


Add user-configurable active class to element and button

In the new version you have two more options: slideActiveClass and buttonActiveClass.


Fixed BUILD_DIR bug introduced in #868

Fixes bug introduced in #868 by changing BUILD_DIR INTO $BUILD_DIR

Revert was done in #874, and the whole change needs more evaluating anyway.


Support lint typescript file

Can  eslint-loader support lint ts file and follow eslintrc.json while on webpack dev mode.
I wish we can lint ts file while use webpack to build, and we can check the lint error or warning while on dev mode, like ForkTsCheckerWebpackPlugin

@hawx1993
I do not know if I understand...
Could you give me more details?

@ricardogobbosouza thanks for comment.
but it's occasional appearance, while I remove node_modules, and reinstall, sometimes it works, someTimes it doesn't work

@ricardogobbosouza not only in my computer, many of my colleagues have this problem.


Clean up and merge pull request #7

Hi Arun,
Any update regarding this?

Hi,
Sorry, nothing yet. I won't have a chance to look at this again until October 9.


Document usage of continue-on-error for pipeline usage

A pipeline might derive value from the result of passed (e.g: checking if a dist directory exists in order to allow a tag to be created). The continue-on-error option enables this use-case.
- id: is-built
  continue-on-error: true
  uses: pr-mpt/actions-assert@v2
  with:
    assertion: "npm://@assertions/directory-exists"
    actual: "dist"

#56 should be the focus rather than continue-on-error which should be avoided because it ignores multiple types of error.


Change wording in enterprise team synchronization documentation from "organization" to "enterprise".

Code of Conduct

[X] I have read and agree to the GitHub Docs project's Code of Conduct

What article on docs.github.com is affected?
https://docs.github.com/en/enterprise-cloud@latest/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise
What part(s) of the article would you like to see updated?
Step 5 says:

Confirm that SAML SSO is enabled for your organization. For more information, see "Managing SAML single sign-on for your organization."

It should read:
"Confirm that SAML SSO is enabled for your enterprise"...
and then link to enterprise SSO documentation like this page:
https://docs.github.com/en/enterprise-cloud@latest/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise
instead of linking to org level SAML docs.
Additional information
No response

👋  @adamrr724 Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:

Thanks @adamrr724! I actually don't think we need a link in that step at all, since we already link to that article in the prerequisites:

You must enforce SAML single sign-on for organizations in your enterprise account with your supported IdP. For more information, see "Configuring SAML single sign-on for your enterprise."

Let's just replace that reusable with "Confirm that SAML SSO is enabled for your enterprise." You or anyone else is welcome to open a PR doing so! ⚡


encode image failed

Description
I wanted to upscale a test image (a map) once to my Mac. The error "encode image failed" always appears. It seems to be processing the image, but at the end it aborts. I have also tried this with other images and formats, always the same effect. Does this have something to do with the Mac?

Expected Behavior
Actually, the test-upscale.png should come out at the end. I only got irritated when I couldn't find a file, because it even says [ SUCCESS ] at the end, which is not correct.
Current Behavior
No file is created, although [ SUCCESS ] is at the end
Steps to Reproduce [COMPULSORY]
Attached is my test file to check
Associated Data Files

Same behaviour using Ubuntu with NVIDIA-4080.
Command used:
./start.cmd --model upscayl-ultrasharp-v2 --scale 4 --format png --input img99.png --output imgscaled.png
Output:
`Upscale Model    : upscayl-ultrasharp-v2
Upscale Scale    : 4
Model Max Scale  : unspecified
Upscale Format   : png
Input File       : img99.png
Is Video Input   : No
Output Directory : img99.png
Output Filename  : img99
Output Suffix    : upscaled
Output Extension : png
[0 NVIDIA GeForce RTX 4080]  queueC=2[8]  queueG=0[16]  queueT=1[2]
[0 NVIDIA GeForce RTX 4080]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 NVIDIA GeForce RTX 4080]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 NVIDIA GeForce RTX 4080]  subgroup=32  basic=1  vote=1  ballot=1  shuffle=1
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  subgroup=8  basic=1  vote=1  ballot=1  shuffle=1
...
98.21%
encode image img99.jpg.png/img99-upscaled.png failed
[ SUCCESS ]
`


Detekt -fix

Detekt -fix
PreviewAnnotationNaming
formatting

#240
#239
#238  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ksharma-xyz and the rest of your teammates on  Graphite


Compilation is broken on Xcode 12

When building with Xcode 12 with parallel build optimisations, Optimizely does not build. I am highlighting an example below

To reproduce simply pod install Optimizely to any project (Xcode 12) with parallelisation on and attempt to build.
It fails because the spec definitions for most of the frameworks are missing the proper dependencies. See the user profile service for example: https://github.com/optimizely/objective-c-sdk/blob/master/OptimizelySDKUserProfileService.podspec#L19
Notice how it does not include Core but it definitely relies on Core. This can be fixed by adding the relevant dependencies. In our project we manually linked all Optimizely frameworks against their missing counterparts as you can see below where the new framework has a higher prominence and alpha than the ones automatically linked by pods.

@danielgalasko Thanks for reporting. We're looking into it and get you updated.

Awesome @jaeopt much appreciated 😄

Any news @jaeopt ?

3.1.4 is out, but it has same issues for me.

@danielgalasko Can you try with the legacy build system that @mattiacantalu suggested?

@danielgalasko @mattiacantalu We just released a patch (3.1.5) with a fix for this Xcode-12 build issue. Please give it a try and let us know if it works for you. Tx!

Thank you @jaeopt ! Anyway we just moved to the swift version of the sdk 😜

Great to hear that! It's a smart move.

Thanks folks 🙏
Since this was a critical blocker for us we moved to the Swift SDK, we also linked it all manually just so we could submit.
Thank you ❤


Tempering and Hardening User Experience

What's New

Added versioning to the memory structure. A similar change was made to the APWORLD.

These changes link the mod and the client in such a way that they must agree on the structure and version number of the memory struct.
The client will fail to function and throw up a user message if the two do not agree.
This will hopefully catch situations where the user updates the APWORLD but fails to update the mod.

Added dynamic text to the game's title screen to alert the user after they connect to an AP server.

The message will say "AP Connected!" if connection was successful, and "Connection failure!" if not.

Reorganized the Options menu for Archipelago by burying the Seed Options in a submenu (most players do not modify them anyway).
Moved the location of the item messages to the bottom of the screen, and make them visible at all times so that players do not miss important item messages.

This is toggleable with a setting in the Options menu.

Patched out the Citadel skips.


Add URL availability monitoring

Context
This change introduces URL availability monitoring to the web applications associated with Apply.
This change contains only the monitoring aspect, alerting will follow in a subsequent PR.
Changes proposed in this pull request

Adds monitoring of /check path on azurewebsites.net address and gov.uk address where used automatically.
Added customAvailabilityMonitors pipeline variable to add custom availability monitors on a per environment basis if required.
Added documentation in README.md

Guidance to review
Availability monitoring results can be seen here on the DevOps Azure environment<EMAIL_ADDRESS>The additional URL monitoring can be added by populating the customAvailabilityMonitors pipeline array variable in the following format:
["TEST-NAME1:URL1", "TEST-NAME2:URL2"]
The test name cannot contain any spaces.
Link to Trello card
1289 - Set up application uptime monitoring in code
Env vars

[ ] If this PR introduces new environment variables, they have been added to all necessary parts of the Azure config based on the documentation in the README

I have removed the deployOnly feature from this PR because it appears to have stopped working and isn't required for the availability task.

:+1: this looks good. Where do we set the alertRecipientEmails?

👍 this looks good. Where do we set the alertRecipientEmails?

That's a new variable for the next phase of this PR, which is to automate the alerting. They won't do any harm being present at this stage though. The variables are defined in the pipeline variable groups so no errors will be raised.


Add ChatGPT for automated code reviews

Brief feature description
Explore if the bot from the article: https://www.cncf.io/blog/2023/06/06/a-chatgpt-powered-code-reviewer-bot-for-open-source-projects/ can be applied to iceoryx2

I think a first step in this direction would be to add an automatic audit using https://crates.io/crates/cargo-audit
Extending the CI file wouldn't be that hard either:
iox2_cargo_fmt_and_clippy_template: &IOX2_CARGO_FMT_AND_CLIPPY
  cargo_fmt_and_clippy_script:
    - cargo fmt --all -- --check
    - cargo clippy -- -D warnings
    - cargo audit

@hydroid7 indeed. I'll create a separate issue for cargo-audit


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:14: http_url: http://sourceforge.net/projects/sox/files/sox/14.4.2/sox-14.4.2.tar.gz is not https
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:14: missing_hash: The recipe is missing a sha256 checksum for a source file
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:29: patch_must_be_in_build: patch must be in build when source/patches is set.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:34: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:35: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:36: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:37: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:38: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:38: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:39: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:40: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:42: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:42: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:67: missing_documentation: The recipe is missing a doc_url or doc_source_url
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:67: http_url: http://sox.sourceforge.net/ is not https
WARNING: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:67: missing_description: The recipe is missing a description
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:67: missing_license_family: The recipe is missing the about/license_family key.
ERROR: /tmp/abs_dfqcv54vn2/clone/recipe/meta.yaml:67: missing_dev_url: The recipe is missing a dev_url
Errors were found


Database panic: java.nio.file.NoSuchFileException...write.lock

debug.txt
After trying to create a new record in neo4j, using the Rails neo4j gem, the database started to return a 500 error for all subsequent requests. The error in the log file (shown below) indicates that a file is missing from the database as detailed below. The full log is attached.
This is the first time I've ever tried to use neo4j on a project, so I'm not really able to provide a lot of additional info, though I'm happy to supply anything anyone requests.
2016-10-13 09:18:52.522+0000 ERROR [o.n.k.i.DatabaseHealth] Database panic: Database has encountered some problem, please perform necessary action (tx recovery/restart) java.nio.file.NoSuchFileException: /Users/jameshamilton/sites/fresson_website/db/neo4j/development/data/databases/graph.db/schema/label/lucene/labelStore/1/write.lock org.neo4j.kernel.impl.store.UnderlyingStorageException: java.nio.file.NoSuchFileException: /Users/jameshamilton/sites/fresson_website/db/neo4j/development/data/databases/graph.db/schema/label/lucene/labelStore/1/write.lock     at org.neo4j.kernel.impl.transaction.command.LabelUpdateWork.apply(LabelUpdateWork.java:62)     at org.neo4j.kernel.impl.transaction.command.LabelUpdateWork.apply(LabelUpdateWork.java:33)     at org.neo4j.concurrent.WorkSync.doSynchronizedWork(WorkSync.java:121)
The db is now unusable, it will not start.
I would like to recover the database, and more importantly stop this from happening in the future. Any help would be appreciated!
Runtime information:
Mac OS Sierra 10.12
Neo4j database version: community-3.0.6
neo4j gem version: 7.2.3
neo4j-core gem version: 6.1.5

Sorry for not responding sooner.  Were you able to figure out the issue?  Is this using jRuby embedded or server mode?
I'm not sure that I have a good answer since this seems to be something happening in Neo4j, but you might ask on Neo Technology's public Slack channel:
https://neo4j.com/blog/public-neo4j-users-slack-group/
Or alternatively on StackOverflow (I know there are at least a few Neo4j experts who watch for questions there)

Sorry! I somehow missed your response above. I never did get to the bottom of this, but deleting the database and starting again at least allowed me to progress and it hasn't happened since!


Fix crash and improve public API

This PR adds a convenience init to instantiate Tabby with a set of tuple controllers.
It also fixes a crash that occurs if you init without any controllers, the reason for the crash was that it tried to access an index that clearly didn’t exist.

Fixes #2


add astro package

tested with stack --resolver nightly exec stackage-curator check and stack --resolver nightly build

wrong format


Backport passive touch gestures #4829

Edge seems to be broken with 1.x: https://travis-ci.org/Polymer/polymer/builds/274385504#L3219

Looks like an unrelated styling change. Might be related to https://github.com/webcomponents/shadycss/issues/111

Yeah is unrelated to this PR, but just something that seems to be broken. Anyways LGTM


runtime: API for unstable metrics

Proposal: API for unstable runtime metrics
Background & Motivation
Today runtime metrics are exposed in two ways.
The first way is via the struct-based sampling APIs runtime.ReadMemStats and runtime/debug.GCStats. These functions accept a pointer to a struct and then populate the struct with data from the runtime.
The problems with this type of API are:

Removing/renaming old metrics from the structs is impossible.

For example, MemStats.BySize is hard-coded to 61 size classes when there are currently 83. We cannot ever change BySize.

Adding implementation-specific metrics to the structs is discouraged, because it pollutes the API when inevitably they'll be deprecated.
runtime.ReadMemStats has a global effect on the application because it forces a STW. This has a direct effect on latency. Being able to tease apart which metrics actually need gives users more control over performance.

The good things about this type of API are:

Protected by the Go 1 compatibility promise.
Easy for applications to ingest, use for their own purposes, or push to a metrics collection service or log.

The second is via GODEBUG flags which emit strings containing metrics to standard error (e.g. gctrace, gcpacertrace, scavtrace).
The problems with this type of API are:

Difficult for an application to ingest because it must be parsed.
Format of the output is not protected by the Go 1 backwards compatibility promise.

The good things about this type of API are:

We can freely change it and add implementation-specific metrics.
We never have to live with bad decisions.

I would like to propose a new API which takes the best of both approaches.
Requirements

The API should be easily extendable with new metrics.
The API should be easily retractable, to deprecate old metrics.

Removing a metric should not break any Go applications as per the Go 1 compatibility promise.

The API should be discoverable, to obtain a list of currently relevant metrics.
The API should be rich, allowing a variety of metrics (e.g. distributions).
The API implementation should minimize CPU/memory usage, such that it does not appreciably
affect any of the metrics being measured.
The API should include useful existing metrics already exposed by the runtime.

Goals
Given the requirements, I suggest we prioritize the following concerns when designing the API in the following order.

Extensibility.

Metrics are “unstable” and therefore it should always be compatible to add or remove metrics.
Since metrics will tend to be implementation-specific, this feature is critical.

Discoverability.

Because these metrics are “unstable,” there must be a way for the application, and for the human writing the application, to discover the set of usable metrics and be able to do something useful with that information (e.g. log the metric).
The API should enable collecting a subset of metrics programmatically. For example, one might want to “collect all memory-related metrics” or “collect all metrics which are efficient to collect”.

Performance.

Must have a minimized effect on the metrics it returns in the steady-state.
Should scale up to 100s of metrics, an amount that a human might consider “a lot.”

Note that picking the right types to expose can limit the amount of metrics we need to expose. For example, a distribution type would significantly reduce the number of metrics.

Ergonomics.

The API should be as easy to use as it can be, given the above.

Design
See full design document at https://golang.org/design/37112-unstable-runtime-metrics.
Highlights:

Expose a new sampling-based API in a new package, the runtime/metrics package.
Use string keys for each metric which include the unit of the metric in an easily-parseable format.
Expose a discovery API which provides metadata about each metric at runtime, such as whether it requires a STW and whether it's cumulative (counter as opposed to a gauge).
Add a Histogram interface to the package which represents a distribution.
Support for event-based metrics is discussed and left open, but considered outside the scope of this proposal.

Backwards Compatibility
Note that although the set of metrics the runtime exposes will not be stable across Go versions, the API to discover and access those metrics will be.
Therefore, this proposal strictly increases the API surface of the Go standard library without changing any existing functionality and is therefore Go 1 compatible.

@mknyszek, what's the status of this? Is the doc ready for review and discussion (if so please check it in)?

The doc is ready for review and discussion, I just don't have +2 or a review to land it yet. I'll try to ping more people to look at the CL.

A couple of high-level comments:

The Histogram interface seems too abstract. The user will need to know the space of possible concrete types anyway, and won't be able to use a given Histogram without knowing its concrete element type. Instead, I would be inclined to provide concrete Float64Histogram and TimeHistogram types — and then you don't need to worry about whether you can add methods to the interface in the future.

Should Metric type include type information about the metric values? That would allow the user to skip reading metrics that they won't be able to interpret anyway.

Actually, perhaps the Metric should include an allocation function..? That would make the allocation strategy a bit less implicit, and might reduce the risk of aliasing bugs in user code.

A couple of high-level comments:

The Histogram interface seems too abstract. The user will need to know the space of possible concrete types anyway, and won't be able to use a given Histogram without knowing its concrete element type. Instead, I would be inclined to provide concrete Float64Histogram and TimeHistogram types — and then you don't need to worry about whether you can add methods to the interface in the future.

Given that we probably need to copy data out of the runtime anyway, I think you're right that it makes sense to just have concrete types.

Should Metric type include type information about the metric values? That would allow the user to skip reading metrics that they won't be able to interpret anyway.

Actually, perhaps the Metric should include an allocation function..? That would make the allocation strategy a bit less implicit, and might reduce the risk of aliasing bugs in user code.

I considered including type information in the Metric in order to let users filter out metrics they don't understand, and I'm certainly not opposed. An allocation function is also a neat idea. One less potential footgun, but it is more work the user has to do to set this all up.

It may also be worthwhile to have Read report an explicit error if a requested metric does not exist.
(I could imagine that someone might try to call Read with a hard-coded list of metrics, and then the user code may produce an obscure panic when trying to read the unpopulated value.)

I know there are minor details still being worked out, like whether Read returns an error in some cases. Other than those, it seems like people are generally in favor of this proposal.
Am I reading this wrong? Does anyone object to accepting this proposal?

OK, then based on the discussion above this seems like a likely accept.

No change in consensus, so accepted.

It may also be worthwhile to have Read report an explicit error if a requested metric does not exist.
(I could imagine that someone might try to call Read with a hard-coded list of metrics, and then the user code may produce an obscure panic when trying to read the unpopulated value.)

Oops, I totally forgot about this. Luckily, the case you're worried about came up in the intervening months, and the way I addressed it is by making the resulting Value have Kind KindBad if a metric doesn't exist. It's not an explicit error value returned by Read, but it does signal the issue (and it does seem right to set this anyway, even if we do decide on returning an explicit error value, too). WDYT? @bcmills

KindBad seems reasonable to me.

Would it be possible to update the proposal and the documentation describing the relationship between expvar and runtime/metrics?
expvar already exposes runtime.Memstats in some predefined format. Projects use expvar as a vendor-neutral format for exposing their own metrics. And there are third-party tooling, that pulls the data from expvar into different metrics collectors.
Now it feels confusing why std has two ways of exposing its internal stats.

@narqo Yeah, I'm happy to update both the proposal and the documentation. I'll make sure it happens before the release.
The short answer to the relationship between the two is that runtime/metrics is low-level, and intended to be a replacement for ReadMemStats. ReadMemStats has problems for us in terms of exposing statistics that are useful to us for both debugging and evolving the runtime. Future evolution of runtime/metrics could also involve "push" metrics ("time series data") instead of just "pull" metrics ("sampled data") which doesn't quite fit with expvar's model, so I think having a separate, underlying package still makes sense.
Another point here is that despite its use of string keys, runtime/metrics is actually much lower-level API that puts a lot of focus on efficiency at the price of usability. AFAICT, isn't really the case with expvar (despite some performance improvements I see that were made a few years ago).
I filed another issue to try to figure out how runtime/metrics should be exported through expvar (#43555) because I am honestly not 100% sure. I think I'm personally slightly leaning toward re-exporting runtime/metrics up through expvar as one big blob, but I have some concerns with just doing that.
Thank you for your input here, and please feel free to start/continue the discussion on #43555.

@narqo Yeah, I'm happy to update both the proposal and the documentation. I'll make sure it happens before the release.
The short answer to the relationship between the two is that runtime/metrics is low-level, and intended to be a replacement for ReadMemStats. ReadMemStats has problems for us in terms of exposing statistics that are useful to us for both debugging and evolving the runtime. Future evolution of runtime/metrics could also involve "push" metrics ("time series data") instead of just "pull" metrics ("sampled data") which doesn't quite fit with expvar's model, so I think having a separate, underlying package still makes sense.
Another point here is that despite its use of string keys, runtime/metrics is actually much lower-level API that puts a lot of focus on efficiency at the price of usability. AFAICT, isn't really the case with expvar (despite some performance improvements I see that were made a few years ago).
I filed another issue to try to figure out how runtime/metrics should be exported through expvar (#43555) because I am honestly not 100% sure. I think I'm personally slightly leaning toward re-exporting runtime/metrics up through expvar as one big blob, but I have some concerns with just doing that.
Thank you for your input here, and please feel free to start/continue the discussion on #43555.


Fix setup of GDT so there isn't a fault touching the GS register.

I think there were some issues with setting up the GDT. I have a project that implemented something like this and all seems to work now. As a matter of fact, I tested this with a simple static i386 Linux binary and this now doesn't fault on access to the GS segment register. There is another error, still. We run into a access of un-mapped memory. I actually had this same error as well and the execution seems to diverge from a normal native execution and my issue was not setting up the program header field AT_PHDR correctly in the AUXV variables. I haven't looked into yet for Usercorn. Feel free to discard this pull request. I don't write much Go, so this may not be that great anyway.

I'm still getting a segfault in ctype_init
<< 0x807b020 (__ctype_init)
   0x807b020: mov eax, 0xffffffd8
   0x807b025: mov eax, dword ptr gs:[eax]                   eax 0xffffffd8
   0x807b028: mov eax, dword ptr [eax]                      eax 0x00000000
invalid read: @0x0, 0x4 = 0x0

Which indicates there's something wrong with gs, or the TLS wasn't setup right.

I think the way I'm setting up GS doesn't support negative gs index properly here.

It's possible. I just added this bit of code to get past the general protection fault. I can go back and double check what I have working in my project because I did get past this exact same error before.

There were multiple problems. The gdt branch is now fixed for static linking, but 32-bit dynamic linking seems broken. Thanks for this PR, it definitely helped.

The dynamic link segfault is fixed in gdt branch. Was a bug with mmap2 not multiplying offset by page size.


Include typings for mystrings/localization

Category

[x] Enhancement
[ ] Bug
[ ] Question

Version
3.2.0
Desired Behavior
In https://github.com/microsoft-search/pnp-modern-search/pull/1282 I found a need to use the localized required message from this library when doing custom validation. But the interface/typings/module in mystrings is not included in the bundle/output.
They are probably regarded as internal but I don’t see big impact on them being included for reuse.

Hi @ellinge - why do you need strings from the library, but not creating your own set of strings?

As described in the issue, instead of having to write a required message for all your already implemented languages I can only reuse it if exposing it as suggested. There's a dependent custom validation done in the pnp-modern-search issue which means a field is not required all the time.

Thank you for adding the PR for that enhancement!


RegEx Matching Always Case-Sensitive

RegEx matching seems to always be case sensitive, even when the "case sensitive" box isn't checked.

This is by design. You may have noticed that the case sensitive box is disabled. That's because for regular expression, you should use the "i" flag for case insensitivity. Example: /[a-z]/i

I didn't notice the box was disabled. It looks like you have the wrong ID specified.

  Case sensitive:
  <input id="case-sensitive" type="checkbox">
  <button type="submit">Add</button>


Refile doesn't work correctly from one file to another

Describe the bug
Refile doesn't work correctly from one org file to another. It works as expected within the same file, but not from capture or from another org file.
Within same file
before

after

From another org file
before

after

From capture
does the same thing as from another org file (which makes sense that the behavior would match)
Steps to reproduce

create an org file with outline like in images above
try refiling it to a new location (in my case main file was dynamics.org so I refiled it to dynamics.org/h1)
Do same for other case

Expected behavior
It should behave like the first instance where it refiles to sub heading of the new heading you chose to refile it to.
Also a feature request related to this :)
(As an aside, I think the refile menu should provide completion like a file path instead of having all headers within a file "flat" at same level of completion. This way you could tab it out file.org/h1/h1.2/h1.2.3 which is better if you have subheadings with the same name as another, and is more intuitive as an organizational mechanism as it makes it like a file heirarchy)
NOTE- I am not sure how this feature lines up with emacs version of refiling.
Emacs functionality
No response
Minimal init.lua
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]

local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'

local function load_plugins()
  require('packer').startup {
    {
      'wbthomason/packer.nvim',
      {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'},
      {'kristijanhusak/orgmode.nvim', branch = 'master' },
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. '/plugin/packer_compiled.lua',
    },
  }
end

_G.load_config = function()
  require('nvim-treesitter.configs').setup({})
  vim.cmd[[packadd nvim-treesitter]]
require('orgmode').setup_ts_grammar()
  vim.cmd[[TSUpdate]]

  require('orgmode').setup({

  org_agenda_files =  "~/notes/org/**/*",
  org_default_notes_file = "~/notes/org/refile.org",
    })
end

if vim.fn.isdirectory(install_path) == 0 then
  vim.fn.system { 'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path }
  load_plugins()
  require('packer').sync()
  vim.cmd [[autocmd User PackerComplete ++once lua load_config()]]
else
  load_plugins()
  require('packer').sync()
  _G.load_config()
end

Screenshots and recordings
No response
OS / Distro
Ubuntu 20.04
Neovim version/commit
v0.7.0-dev+1027-gf02a5a7bd
Additional context
No response

I think the offending line might be
https://github.com/aareman/orgmode.nvim/blob/17f770930be177f939f8e567f4590598cbcd8355/lua/orgmode/capture/init.lua#L88

The bug should be fixed now. Regarding the feature request, I implemented it how Emacs Orgmode works, even though emacs is much more restrictive about refile destination options (needs more configuration there). This would also drastically complicate autocompletion because of the nesting and figuring out the context.

This should be fixed now. Let me know if you find any other issues.


Initial port to blueprint

This PR does the following:

Port most .ui files to Blueprint.
Add Blueprint support for Flatpak (untested, but should work).
Enable gtk-rs Blueprint validation feature.
Manually port files that the porter couldn't port automatically.

The reason for this PR being marked as "draft" is that there are still two unresolved things:

src/app/components/login/login.ui couldn't be ported because it uses GTK attributes, which are not supported by Blueprint, and Blueprint docs says the following:

"Blueprint does not have syntax for attributes on Gtk.Label. Instead, you should use platform classes, CSS, Pango Markup or Gtk.Label.set_attributes."

The GtkAboutDialog in src/window.ui.in should probably be migrated to an AdwAboutWindow inside the code itself(?) instead of using templates, as they are not supported in Blueprint too.

looking good!!

src/app/components/login/login.ui couldn't be ported because it uses GTK attributes, which are not supported by Blueprint,

I see! The attributes on the title don't seem all that useful, we can ignore them; as for the error message, we can use pango markup (<b></b>) or add a css class.

The GtkAboutDialog in src/window.ui.in should probably be migrated to an AdwAboutWindow inside the code itself(?) instead of using @@ placeholders, as they are not supported in Blueprint too.

There is no special support needed, the @VAR@ things are preprocessed by meson:
window_ui = configure_file(
    input: 'window.ui.in',
    output: 'window.ui',
    configuration: conf
)

porting to AdwAboutWindow sounds like a good idea -- for another issue though :)
(Also, the POTFILES file should be updated)

I have now ported login.ui to Blueprint, using CSS instead of attributes.
About the window.ui.in file, it seems that what's being done with XML cannot be done with Blueprint, since it does not accept the format used in XML UI files for items (newlines).

About the window.ui.in file, it seems that what is being done with XML cannot be done with Blueprint, since it does not accept the format used in XML UI files for items (newlines).
Personally, I would just keep this file not ported for now, until someone upgrades that GtkAboutDialog with an AdwAboutWindow.

Switching to AdwAboutWindow won't automatically fix it, at the moment we still inject the list of contributors, the version, etc, at build time with meson. By the looks of it, blueprints supports newlines but we might have to alter a little bit the meson configuration :)

If you're willing to go through with this I can help of course! I'm hopeful we won't have much trouble with that.

EDIT: About translations, what gettext command should I run to update the translations? It's been a long time since I last used gettext.

First the POTFILES file should reference all blueprints and then you can run
ninja spot-pot -C target
If all goes well the changes to the .pot file should be minimal :) (just things moving around a bit at worst)

Hello, I apologize for not seeing the commands for updating the .po files, sometimes I think I'm blind :)
As for the about window, I did try to make it work with Blueprint, but it failed to compile. I was able to show a window with the translator-credits parameter, but not with authors (it only shows if I remove the authors entry):

Otherwise, this PR should be good to go.

No worries at all :)
Hmm ok interesting I'll have a look at this dialog issue!

Looks like it's a limitation in blueprint for now https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/38
What we can do is set those properties from rust code instead and start by leaving them empty in the blueprint, it should compile then. Let me think about it a little, I would really like to get rid of that big window.ui file if we're going the blueprint route :)

if you don't mind rebasing a little your work, I'll merge #617 which cleans up the meson.build files and moves the inclusions of authors/artists/translator credits on the rust side, so it should be easier to port the last file


Remove dependency on the fileutils gem

The FileUtils in use in this project is a part of Ruby. The fileutils
gem appears to be something separate that, in turn,  creates an
unnecessary dependency on ImageMagick.

Hi, please can you consider merging this?
It means we have to unnecessarily install ImageMagick for our Omnibus-style build for the Sensu plugin gems we use.

+1 - would be great to remove the dependency

Rebased on master to fix the merge conflict from a few days ago.

Thanks @RoboticCheese and @analytically
A new gem release would be great if possible :-)

@mattyjones

@bsnape  All set

Mind fixing https://github.com/sensu-plugins/sensu-plugins-logs/blob/master/bin/handler-logevent.rb#L11 too @bsnape?

That require is fine @analytically :smiley:
'fileutils' is a built-in library as well as a separate gem (confusingly).
The handler does use FileUtils legitimately and doesn't need the gem which is for ImageMagick.
Proof of fileutils usage:
2.1.4 :001 > FileUtils.pwd
NameError: uninitialized constant FileUtils
	from (irb):1
	from /Users/bensnape/.rvm/rubies/ruby-2.1.4/bin/irb:11:in `<main>'
2.1.4 :002 > require 'fileutils'
 => true
2.1.4 :003 > FileUtils.pwd
 => "/Users/bensnape"

Thanks for merging this!

Cool, thanks!


PyNNDescent release candidate

Hi,
I wanted to give you notice that I have a new release candidate out for version 0.5 of pynndescent. This involves some largeish changes, and a parameter (diversify_epsilon) got renamed (to diversify_prob) as its behaviour changed somewhat. I'm hoping to get things worked out and the new release out properly over the next ew weeks. If you want to verify that the new candidate release will work for you I would appreciate it.

Thanks for the heads up! I've been pretty swamped, but nobody's complained about this yet, so I guess it works :) I don't think we use that parameter, so I think it should be fine.


XOR Linked List - POTD | 7-Oct-2024

XOR Linked List

Difficulty: Medium
An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes. A memory-efficient version of the Doubly Linked List can be created using only one space for the address field with every node. This memory-efficient Doubly Linked List is called XOR Linked List or Memory Efficient as the list uses bit-wise XOR operation to save space for one address.
Given a stream of data of size N for the linked list, your task is to complete the function insert() and getList(). The insert() function pushes (or inserts at the beginning) the given data in the linked list and the getList()  function returns the linked list as a list.
Note:
A utility function XOR() takes two Node pointers to get the bit-wise XOR of the two Node pointers. Use this function to get the XOR of the two pointers.
The driver code prints the returned list twice, once forward and once backwards.
Examples:
Input:
LinkedList: 9<->5<->4<->7<->3<->10

Output:
10 3 7 4 5 9
9 5 4 7 3 10
Input:
LinkedList: 58<->96<->31

Output:
31 96 58
58 96 31

Expected Time Complexity: O(n)
Expected Auxiliary Space: O(1)
Constraints:

1 <= number of nodes, data of nodes <= 105

Solved
def insert(head, data):
    r=Node(data)
    r.npx=head
    return r
def getList(head):
    q=[]
    while head:
        q.append(head.data)
        head=head.npx
    return q


Update README.md

Q
A

Bug fix?
no

Hey, coming from the slack of @javiereguiluz of biomejs, seeing the recent map ux (which is 🔥 )
I've read the readme and I may propose some changes

1 swap webpackencore and assetmapper (as per symfony doc)
2 remove the autocomplete as its implemented
3 the word "We" feels weird after 4+years of the release of this repo

feel free to challenge :)
thx

Thanks Antoine.


Update Contributor Guide for setup-tools

I accidentally broke my M2 Macbook dev environment, but attempting to create a new one following the CONTRIBUTING.md instructions raises the following error:
ERROR: File "setup.py" or "setup.cfg" not found. Directory cannot be installed in editable mode: /Users/coltallen/Projects/pymc-marketing
(A "pyproject.toml" file was found, but editable mode currently requires a setuptools-based build.)

False alarm - I can confirm this now works with the latest version of conda and there is no need for any changes to the documentation.


Add NearestNDInterpolator to cupyx.scipy.interpolate

See #7186
Depends on #8208 for module ordering

/test mini

I can locally confirm that the tests are passing, maybe the displayed error is related to the version of SciPy?

Is this about  distance_upper_bound? This is indeed new in SciPy 1.12:  https://github.com/scipy/scipy/pull/19483

/test mini

Sorry for my late review. Thanks for your contribution. LGTM!

Thanks @asi1024!


I can not synchronize my Strat from Coinomi wallet to Stratis Core

Hi dear bros,
I have currently owned some STRAT coins in my Coinomi wallet which have not been swapped yet to STRAX for using (trading/holding).
I am using now Stratis Core 2.2.1 to synchronize those coins but there has been nothing happening when I am doing it (no balance updated).
Could you guys here please help how can I use those STRAT (in Coinomi Wallet)?
Thanks so much.

Hi, please join our Discord server and head over to the #support channel, they will gladly assist you with this issue.
https://discordapp.com/invite/9tDyfZs

Hi, please join our Discord server and head over to the #support channel, they will gladly assist you with this issue.
https://discordapp.com/invite/9tDyfZs


Load drawings as initial state

As a user, I want to save/reload my drawings
Impl: http://fabricjs.com/docs/fabric.Canvas.html#toJSON ?

Closed in v0.6.0 by #37

Closed in v0.6.0 by #37


Unicode escape sequences in CSS class names are broken during build

Version
3.0.0-rc.3
Reproduction link
https://github.com/adamwathan/vue-cli-3-css-escape-bug/blob/master/src/App.vue#L19
Steps to reproduce
Create a CSS class in a component's <style> block that includes an escaped digit anywhere but the first character, like:
.foo-\35 0 {
  width: 100px;
  height: 100px;
  background-color: red;
}

Note that \35(space) is the unicode code point for just 5: https://mathiasbynens.be/notes/css-escapes
What is expected?
The resulting CSS is unchanged from what was entered, and using the class foo-50 in your markup applies those styles.
This works fine in Vue CLI 2.* projects: https://codesandbox.io/s/y3koz7zr4z
As well as in regular HTML/CSS: https://jsfiddle.net/4pc1L95n/
What is actually happening?
Somewhere in the build process, the backslash in front of the 3 is being stripped, and you get this resulting CSS instead:
.foo-35 0 {
  width: 100px;
  height: 100px;
  background-color: red;
}

That means foo-50 as a class no longer works properly in the markup.

Of course digits in the middle of CSS classes don't need to be escaped, but we had an issue with Tailwind CSS where folks were escaping the user-supplied portion of classes generated by plugins, and those classes stopped working for people in Vue CLI 3 and Nuxt.js projects when we upgraded our CSS escape function to be spec-compliant:
https://github.com/tailwindcss/tailwindcss/issues/509

The Vue CLI 2 version does not work as I run it locally.
Seems like a webpack css-loader bug https://github.com/webpack-contrib/css-loader/issues/578

If this is a CSS Loader issue I'm afraid there's nothing we can do about it in Vue CLI...


[ERROR] CRITICAL:root:twint.get:User:Cannot connect to host twitter.com:80 ssl:False [Connect call failed ('<IP_ADDRESS>', 80)]

Hi,
I am trying to use Twint.
I am running Python 3.6 on a Windows 10 machine.
I am indeed connected to the Internet but, I do use a VPN.
COMMAND RAN
twint -u officialmcafee --since 2019-2-17
ERROR
`CRITICAL:root:twint.get:User:Cannot connect to host twitter.com:80 ssl:False [Connect call failed ('<IP_ADDRESS>', 80)]
Traceback (most recent call last):
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 924, in _wrap_create_connection
await self._loop.create_connection(*args, **kwargs))
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\asyncio\base_events.py", line 777, in create_connection
raise exceptions[0]
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\asyncio\base_events.py", line 764, in create_connection
yield from self.sock_connect(sock, address)
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\asyncio\selector_events.py", line 450, in sock_connect
return (yield from fut)
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\asyncio\selector_events.py", line 480, in _sock_connect_cb
raise OSError(err, 'Connect call failed %s' % (address,))
TimeoutError: [Errno 10060] Connect call failed ('<IP_ADDRESS>', 80)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Thibaut\AppData\Local\Programs\Python\Python36-32\Scripts\twint-script.py", line 11, in
load_entry_point('twint', 'console_scripts', 'twint')()
File "c:\users\thibaut\src\twint\twint\cli.py", line 270, in run_as_command
main()
File "c:\users\thibaut\src\twint\twint\cli.py", line 262, in main
run.Search(c)
File "c:\users\thibaut\src\twint\twint\run.py", line 279, in Search
run(config, callback)
File "c:\users\thibaut\src\twint\twint\run.py", line 200, in run
get_event_loop().run_until_complete(Twint(config).main(callback))
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\asyncio\base_events.py", line 467, in run_until_complete
return future.result()
File "c:\users\thibaut\src\twint\twint\run.py", line 141, in main
await task
File "c:\users\thibaut\src\twint\twint\run.py", line 185, in run
await self.tweets()
File "c:\users\thibaut\src\twint\twint\run.py", line 124, in tweets
await self.Feed()
File "c:\users\thibaut\src\twint\twint\run.py", line 50, in Feed
response = await get.RequestUrl(self.config, self.init, headers=[("User-Agent", self.user_agent)])
File "c:\users\thibaut\src\twint\twint\get.py", line 107, in RequestUrl
response = await Request(_url, params=params, connector=_connector, headers=headers)
File "c:\users\thibaut\src\twint\twint\get.py", line 157, in Request
return await Response(session, url, params)
File "c:\users\thibaut\src\twint\twint\get.py", line 162, in Response
async with session.get(url, ssl=False, params=params, proxy=httpproxy) as response:
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\client.py", line 1005, in aenter
self._resp = await self._coro
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\client.py", line 476, in _request
timeout=real_timeout
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 522, in connect
proto = await self._create_connection(req, traces, timeout)
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 854, in _create_connection
req, traces, timeout)
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 992, in _create_direct_connection
raise last_exc
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 974, in _create_direct_connection
req=req, client_error=client_error)
File "c:\users\thibaut\appdata\local\programs\python\python36-32\lib\site-packages\aiohttp\connector.py", line 931, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host twitter.com:80 ssl:False [Connect call failed ('<IP_ADDRESS>', 80)]`
Any suggestion?
Thank you

You're having connection issues with Twitter, as the log says
Twint is working fine, tested now
I suggest you to try later or use a VPN

Thank you!
Solved, it was a VPN issue (blocking port 80).

@epanmareza I think that you are using an old and deprecated version of resuming option, since Twitter encoded the resume ID
Anyway, it seems that Twitter is blocking your connections. This issue might be caused by your firewall or something else. Not related to Twint

which one resuming option that i should use ?

@epanmareza just specify a file and Twint will handle it. Like config.Resume = "my_resume_session_123.txt"

@pielco11
Hi,
I tried using a VPN, but still get the error:
CRITICAL:root:twint.get:User:Cannot connect to host twitter.com:443 ssl:True [Connect call failed ('<IP_ADDRESS>', 443)]

Any ideas to solve? Thanks in advance!

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi，may I know how did you solve this issue?

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi，may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi，may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi，may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

Thank you!
But the VPN I used now can help me reach Twitter's website ,and I don't know why just Twint can't work. So sad....

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi，may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

Thank you!
But the VPN I used now can help me reach Twitter's website ,and I don't know why just Twint can't work. So sad....

Hello~ Have you solved the problem？ I have encountered the same problem. The VPN I used now can reach Twitter's website ,but I don't know why just Twint can't work.  Thank you!

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi，may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

Thank you!
But the VPN I used now can help me reach Twitter's website ,and I don't know why just Twint can't work. So sad....

Hello~ Have you solved the problem？ I have encountered the same problem. The VPN I used now can reach Twitter's website ,but I don't know why just Twint can't work. Thank you!

Are you sure you are using VPN rather than a SSR app? I have the same problem when I'm using SSR, I can reach Twitter's website, but I can't use twint. You can try to ping www.twitter.com, if it doesn't work, it means you need to use a VPN app. Now I'm using expressvpn, you can also try Nord or some other VPN app. Hope my experience can help you!

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi，may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

Thank you!
But the VPN I used now can help me reach Twitter's website ,and I don't know why just Twint can't work. So sad....

Hello~ Have you solved the problem？ I have encountered the same problem. The VPN I used now can reach Twitter's website ,but I don't know why just Twint can't work. Thank you!

Are you sure you are using VPN rather than a SSR app? I have the same problem when I'm using SSR, I can reach Twitter's website, but I can't use twint. You can try to ping www.twitter.com, if it doesn't work, it means you need to use a VPN app. Now I'm using expressvpn, you can also try Nord or some other VPN app. Hope my experience can help you!

Yeah! That's the point! Thank you so much for your reply! It's really helpful! When I changed to another VPN app, it works~

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi，may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

I am living in China , use a lot of VPN .it is not connect to twitter ,twint can not work . Can you give some sugesst.
port 443 error

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi，may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

I am living in China , use a lot of VPN .it is not connect to twitter ,twint can not work . Can you give some sugesst.
port 443 error

Hi! I suppose you should just try to ping www.twitter.com with your VPN to see if it works or not.

Thank you!
Solved, it was a VPN issue (blocking port 80).

Hi，may I know how did you solve this issue?

Hi, have you sovled it? I‘m troubled by this problem,too.

Hi,
Back then I was living in China where Twitter isn't accessible without a VPN.
When I posted the message, it seemed that the VPN server I used wasn't able to reach Twitter's website. So I switched to another VPN server, ensured I had access to Twitter's website and then tried Twint. That time, it worked.
If Twitter isn't blocked where you are, the use of a VPN isn't mandatory to get Twint to work.

Thank you!
But the VPN I used now can help me reach Twitter's website ,and I don't know why just Twint can't work. So sad....

Hello~ Have you solved the problem？ I have encountered the same problem. The VPN I used now can reach Twitter's website ,but I don't know why just Twint can't work. Thank you!

me too.I have encountered the same problem.

I found many Q&A and conclude that we can use ExpressVpn or NodeVpn to solve this problem.Note that it should be a vpn application NOT SSR.


How to statistics epoch training accuracy?

Using such pieces of code will log out the training accuracy every specified number of batch.

eval_metrics = ['accuracy']
batch_end_callback.append(mx.callback.Speedometer(args.batch_size, 50))
model.fit(
        X                  = train,
        eval_data          = val,
        eval_metric        = eval_metrics,
        kvstore            = kv,
        batch_end_callback = batch_end_callback,
        epoch_end_callback = checkpoint)

logging info shows as below:

2016-08-12 20:15:43,819 Node[0] Epoch[5] Batch [50]    Speed: 444.47 samples/sec    Train-accuracy=0.844219
2016-08-12 20:15:43,819 Node[0] Epoch[5] Batch [50]    Speed: 444.47 samples/sec    Train-top_k_accuracy_5=0.994219
2016-08-12 20:15:43,820 Node[0] Epoch[5] Batch [50]    Speed: 444.47 samples/sec    Train-top_k_accuracy_10=1.000000
2016-08-12 20:15:43,820 Node[0] Epoch[5] Batch [50]    Speed: 444.47 samples/sec    Train-top_k_accuracy_20=1.000000
2016-08-12 20:15:58,518 Node[0] Epoch[5] Batch [100]    Speed: 435.42 samples/sec    Train-accuracy=0.846094
2016-08-12 20:15:58,519 Node[0] Epoch[5] Batch [100]    Speed: 435.42 samples/sec    Train-top_k_accuracy_5=0.995625
2016-08-12 20:15:58,519 Node[0] Epoch[5] Batch [100]    Speed: 435.42 samples/sec    Train-top_k_accuracy_10=1.000000
2016-08-12 20:15:58,519 Node[0] Epoch[5] Batch [100]    Speed: 435.42 samples/sec    Train-top_k_accuracy_20=1.000000
2016-08-12 20:16:13,001 Node[0] Epoch[5] Batch [150]    Speed: 441.95 samples/sec    Train-accuracy=0.860938
2016-08-12 20:16:13,001 Node[0] Epoch[5] Batch [150]    Speed: 441.95 samples/sec    Train-top_k_accuracy_5=0.995000
2016-08-12 20:16:13,001 Node[0] Epoch[5] Batch [150]    Speed: 441.95 samples/sec    Train-top_k_accuracy_10=1.000000
2016-08-12 20:16:13,001 Node[0] Epoch[5] Batch [150]    Speed: 441.95 samples/sec    Train-top_k_accuracy_20=1.000000
2016-08-12 20:16:26,907 Node[0] Epoch[5] Batch [200]    Speed: 460.24 samples/sec    Train-accuracy=0.852344
2016-08-12 20:16:26,908 Node[0] Epoch[5] Batch [200]    Speed: 460.24 samples/sec    Train-top_k_accuracy_5=0.993750
2016-08-12 20:16:26,908 Node[0] Epoch[5] Batch [200]    Speed: 460.24 samples/sec    Train-top_k_accuracy_10=1.000000
2016-08-12 20:16:26,908 Node[0] Epoch[5] Batch [200]    Speed: 460.24 samples/sec    Train-top_k_accuracy_20=1.000000
2016-08-12 20:16:41,463 Node[0] Epoch[5] Batch [250]    Speed: 439.71 samples/sec    Train-accuracy=0.853125
2016-08-12 20:16:41,463 Node[0] Epoch[5] Batch [250]    Speed: 439.71 samples/sec    Train-top_k_accuracy_5=0.994219
2016-08-12 20:16:41,464 Node[0] Epoch[5] Batch [250]    Speed: 439.71 samples/sec    Train-top_k_accuracy_10=1.000000
2016-08-12 20:16:41,464 Node[0] Epoch[5] Batch [250]    Speed: 439.71 samples/sec    Train-top_k_accuracy_20=1.000000
2016-08-12 20:16:56,109 Node[0] Epoch[5] Batch [300]    Speed: 437.00 samples/sec    Train-accuracy=0.859219
2016-08-12 20:16:56,110 Node[0] Epoch[5] Batch [300]    Speed: 437.00 samples/sec    Train-top_k_accuracy_5=0.994375
2016-08-12 20:16:56,110 Node[0] Epoch[5] Batch [300]    Speed: 437.00 samples/sec    Train-top_k_accuracy_10=1.000000
2016-08-12 20:16:56,110 Node[0] Epoch[5] Batch [300]    Speed: 437.00 samples/sec    Train-top_k_accuracy_20=1.000000
2016-08-12 20:17:10,784 Node[0] Epoch[5] Batch [350]    Speed: 436.15 samples/sec    Train-accuracy=0.855313
2016-08-12 20:17:10,784 Node[0] Epoch[5] Batch [350]    Speed: 436.15 samples/sec    Train-top_k_accuracy_5=0.995625
2016-08-12 20:17:10,785 Node[0] Epoch[5] Batch [350]    Speed: 436.15 samples/sec    Train-top_k_accuracy_10=1.000000
2016-08-12 20:17:10,785 Node[0] Epoch[5] Batch [350]    Speed: 436.15 samples/sec    Train-top_k_accuracy_20=1.000000
2016-08-12 20:17:22,049 Node[0] Epoch[5] Resetting Data Iterator

Can I statistic or estimate training accuracy per epoch by some means? thanks!

Write your own epoch_end_callback function

If you provide validation data, by default it also logs validation accuracy per epoch.
https://github.com/dmlc/mxnet/blob/master/python/mxnet/model.py#L306

Got it, I can write the epoch callback function to eval the acc, @VoVAllen, @eric-haibin-lin ,thanks for help!

@pinglforever hi,
Can you tell how do you did it ? I am trying to print the loss in each 20 epochs.

You can edit this line to check every 20 epoch  @salemmohammed
https://github.com/dmlc/mxnet/blob/master/python/mxnet/module/base_module.py#L488


Move hard-coded path in E2E benchmarks to config json

Description

Move hard-coded glob (inside MORPHEUS_ROOT) for CloudTrail AE training data to e2e_test_configs.json.
Fix CloudTrail AE training data glob to point to training data instead of validation/inference data. This will result in longer pipeline run times because training data used by pipeline will now be larger.

Fixes #1005
Checklist
[x] I am familiar with the Contributing Guidelines.
[x] New or existing tests cover these changes.
[x] The documentation is up to date with these changes.

/merge


Using redirection during prerendering should be supported

I'm implementing some client side-authentication logic in React while using the asp-prerender. Client side this this isn't a problem using react-router's onEnter hook, but when prerender it needs to return 302.
The react-router ServerRendering page shows how to determine if a redirect should occur before doing a complete render, but I don't see any way to actually initiate the redirect.
Is it possible to initiate a 302 from a TagHelper?
For now I can either see two workarounds

Disable pre-rendering, and allow the navigation to happen client side
Use asp.net routing to redirect before attempting to do the 302, but this seems fragile.

I suspect enabling this is a larger task, but the current error message in the React-Redux template is Exception: Call to Node module failed with error: Error: The location '/' doesn't match any route configured in react-router., which isn't accurate. A more descriptive message would have been very helpful.

Great suggestion - thanks for this!

Is it possible to initiate a 302 from a TagHelper?

Thankfully, yes it is, so I've just added support for redirections :)
To get this feature in your project, update to the latest aspnet-prerendering NPM module (1.0.6 or later). Also you'll need to update to a newer version of Microsoft.AspNetCore.SpaServices, but I haven't yet published a version that includes this. You can build your own from source if you need, or wait a little until we drop an update.
Then your boot script can return a redirectUrl and the server will perform it. You can see this at work in the updated boot-server.ts file for the ReactRedux template: https://github.com/aspnet/JavaScriptServices/commit/28550784edb6c9c453a8983285dc0d6a9aaa12a9

Awesome! I'll be keeping an eye out for the next update.

It's published now


There's "code smell" with the init() method in Exchange

Something seems unclean to me with this. I'm currently trying to understand how to make it better.

Could you be more specific?

As a user, it's confusing. Do I need it? When? What does it do?
As a maintainer, can I clean this up?

@rafalkrupinski Not yet, still looking into it. It just feels "not right" to me at this point.

As a user, it's confusing. Do I need it? When? What does it do?

A javadoc problem?

As a maintainer, can I clean this up?
?

So, by asking I may help you realize the exact problem :)
Is it one (or more) of the implementations, or the concept of init() itself?


parseDate function of formula  is not working properly

In fact, timestamp information can be obtained normally through prop('File')['metadata']['file ']['ctime'], but parseDate function cannot convert information correctly.

I have checked the source code and it is possible that formatDate(prop('File')['metadata']['file']['ctime']) should be the correct default value.

Formatdate gets automatically applied with the default date format so it’s not required. What are you trying to parse? The default created time value doesn’t need to be parsed because it’s already a date time object and just needs to be formatted
Get Outlook for iOShttps://aka.ms/o0ukef

From: JohanRain @.>
Sent: Tuesday, April 23, 2024 10:09:03 AM
To: Make-md/makemd @.>
Cc: Subscribed @.***>
Subject: Re: [Make-md/makemd] parseDate function of formula is not working properly (Issue #307)
I have checked the source code and it is possible that formatDate(prop('File')['metadata']['file']['ctime']) should be the correct default value.
—
Reply to this email directly, view it on GitHubhttps://github.com/Make-md/makemd/issues/307#issuecomment-2072416522, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFHKNVMCC6MT7T3GTWV6NDY6ZTP7AVCNFSM6AAAAABGU622RCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZSGQYTMNJSGI.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

When creating a folder, the default Created property is as follows:

This date cannot be displayed correctly
I thought it was a problem with the parseDate function,But I found a formatDate function, so I think the default value should be using the wrong function, like the one below:

The value of prop('File')['metadata']['file']['ctime'] is as follows:

Thanks. Will look into it today. The formatDate chains a parse date in front of it if the data is a timestamp or string and parse date applies a format date if the final value is not formatted
Get Outlook for iOShttps://aka.ms/o0ukef

From: JohanRain @.>
Sent: Tuesday, April 23, 2024 10:39:13 AM
To: Make-md/makemd @.>
Cc: JPC @.>; Comment @.>
Subject: Re: [Make-md/makemd] parseDate function of formula is not working properly (Issue #307)
When creating a folder, the default Created property is as follows:
image.png (view on web)https://github.com/Make-md/makemd/assets/87157569/8a1048fb-7b3f-4fd7-a0fa-43f16b01e370
This date cannot be displayed correctly
I thought it was a problem with the parseDate function,But I found a formatDate function, so I think the default value should be using the wrong function, like the one below:
image.png (view on web)https://github.com/Make-md/makemd/assets/87157569/c0d7bcbd-8034-460e-8ff0-5a8ab2fd920b
The value of prop('File')['metadata']['file']['ctime'] is as follows:
image.png (view on web)https://github.com/Make-md/makemd/assets/87157569/c8acd591-1d16-4fcf-ba7e-73f70fdfecce
—
Reply to this email directly, view it on GitHubhttps://github.com/Make-md/makemd/issues/307#issuecomment-2072510502, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFHKNRNZVLOMHXQNUNT7Q3Y6ZXBDAVCNFSM6AAAAABGU622RCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZSGUYTANJQGI.
You are receiving this because you commented.Message ID: @.***>

Thanks for reporting this, this is confirmed to be an issue and will be patched next version.

Patched in 0.9.17


Error: While resolving module, the Haste package was found. the module could not be found within the package

Description
I am trying the new arch of react native. I have enabled it in my gradle.properties file. This error is for android only and I have not tried iOS yet.
I am following the exact sample of Calculator mentioned over here.
I get an error saying
error: Error: While resolving module `rtn-calculator/js/NativeCalculator.js`, the Haste package `rtn-calculator` was found. However the module `js/NativeCalculator.js` could not be found within the package. Indeed, none of these files exist:

  * `/Users/transformhub/Desktop/rnapp/RTNCalculator/js/NativeCalculator.js(.native|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)`
  * `/Users/transformhub/Desktop/rnapp/RTNCalculator/js/NativeCalculator.js/index(.native|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)`
    at resolveHasteName (/Users/transformhub/Desktop/rnapp/node_modules/metro-resolver/src/resolve.js:173:9)
    at Object.resolve (/Users/transformhub/Desktop/rnapp/node_modules/metro-resolver/src/resolve.js:63:20)
    at ModuleResolver.resolveDependency (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:111:31)
    at DependencyGraph.resolveDependency (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/node-haste/DependencyGraph.js:260:43)
    at Object.resolve (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/lib/transformHelpers.js:177:21)
    at Graph._resolveDependencies (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/DeltaBundler/Graph.js:432:35)
    at Graph._processModule (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/DeltaBundler/Graph.js:218:38)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Graph._addDependency (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/DeltaBundler/Graph.js:314:20)
    at async Promise.all (index 2)

The complete repo is here
Version
0.71.0
Output of npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.1
CPU: (8) x64 Apple M1
Memory: 41.52 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.19.2 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9477386
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: javac 16 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.0 => 0.71.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce

Download the repo from here
Do npm install
Run yarn react-native run-android --active-arch-only

Snack, code example, screenshot, or link to a repository
Repo

Can you try to wipe Metro cache with yarn start --reset-cache?

Same error
error: Error: While resolving module `rtn-calculator/js/NativeCalculator.js`, the Haste package `rtn-calculator` was found. However the module `js/NativeCalculator.js` could not be found within the package. Indeed, none of these files exist:

  * `/Users/transformhub/Desktop/rnapp/RTNCalculator/js/NativeCalculator.js(.native|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)`
  * `/Users/transformhub/Desktop/rnapp/RTNCalculator/js/NativeCalculator.js/index(.native|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)`
    at resolveHasteName (/Users/transformhub/Desktop/rnapp/node_modules/metro-resolver/src/resolve.js:173:9)
    at Object.resolve (/Users/transformhub/Desktop/rnapp/node_modules/metro-resolver/src/resolve.js:63:20)
    at ModuleResolver.resolveDependency (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:111:31)
    at DependencyGraph.resolveDependency (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/node-haste/DependencyGraph.js:260:43)
    at Object.resolve (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/lib/transformHelpers.js:177:21)
    at Graph._resolveDependencies (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/DeltaBundler/Graph.js:432:35)
    at Graph._processModule (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/DeltaBundler/Graph.js:218:38)
    at async Graph._addDependency (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/DeltaBundler/Graph.js:314:20)
    at async Promise.all (index 2)
    at async Graph._processModule (/Users/transformhub/Desktop/rnapp/node_modules/metro/src/DeltaBundler/Graph.js:263:5)

Hi @PritishSawant! I believe this is because you have located the rtn-calculator package outside of a node_modules directory or npm/Yarn workspace. Therefore, for some internal reasons (Metro treats the directory as a legacy "Haste package") the import is handled slightly differently, and fails.
Specifically, this legacy package resolution substitutes all import subpaths based on sourceExts, and does not try the explicitly given file extension.
The fix in this case is to omit the source extension:
- import RTNCalculator from 'rtn-calculator/js/NativeCalculator.js';
+ import RTNCalculator from 'rtn-calculator/js/NativeCalculator';

I've tested this workaround locally against your repro using yarn react-native bundle, and it should be good to go.

After doing the required changes I am getting RTNCalculator as null. I changed my import to
import RTNCalculator from 'rtn-calculator/js/NativeCalculator';
I can see the rtn-calculator in my node-modules

Can you confirm you've run the TurboModule codegen for Android? Particularly these parts:

This is because I don't observe the rtn-calculator/android/build/generated/ directory in your test repo: https://github.com/PritishSawant/RnMyAppNewArch/tree/34521ea/RTNCalculator/android

I ran `./gradlew generateCodegenArtifactsFromSchema` again and it was successful but I don't see the build folder as well. The only change which I did was change the location `RTNCalculator`. It is part of my project so every time I use `yarn add ./RTNCalculator`

again and it was successful but I don't see the build folder as well. The only change which I did was change the location RTNCalculator.

Please note that once you run generateCodegenArtifactsFromSchema the build folder you'll be looking for is: node_modules/RTNCalculator/android/build/generated/source/codegen and not the one inside your top level ../RTNCalculator folder.
If the issue persists, could you share a reproducer?

Yup I am looking in the node_modules folder. I don't see build folder in android. Below is the screenshot

The repo is here

@cortinico Do you want me to open another issue?

Nope sorry. The issue you're facing now has already been addressed and is solved in React Native 0.71.1
If you bump the React Native version to 0.71.1 it will be solved.
Reference to the underlying issue is:
https://github.com/react-native-community/cli/pull/1800

Hi @PritishSawant! I believe this is because you have located the rtn-calculator package outside of a node_modules directory or npm/Yarn workspace. Therefore, for some internal reasons (Metro treats the directory as a legacy "Haste package") the import is handled slightly differently, and fails.
Specifically, this legacy package resolution suffixes all import subpaths based on sourceExts, and does not try the explicitly given file extension.
The fix in this case is to omit the source extension:
- import RTNCalculator from 'rtn-calculator/js/NativeCalculator.js';
+ import RTNCalculator from 'rtn-calculator/js/NativeCalculator';

I've tested this workaround locally against your repro using yarn react-native bundle, and it should be good to go.

it helped me, thankyou!


DOC: Adds transfer learning tutorial

This addresses https://github.com/dnouri/skorch/issues/261 and maybe https://github.com/dnouri/skorch/issues/278.
I covered finetuning and how to use a custom train/valid dataset. I think its pretty common for people coming from the pure PyTorch approach to want to provide their own train/validation datasets.
I approached the custom datasets by defining a custom train_valid function:
def train_valid_split(train, valid, **kwargs):
    return train, valid

net = NeuralNetClassifier(..., train_split=train_valid_split)
net.fit(train_ds, val_ds);

This is a pretty hacky approach to the problem. By defining train_valid_split  that just returns its inputs, I treated X as the training dataset, and y as the validation set.

The accuracy is on par with the original tutorial. It’s the benefit of using a pretrained model and only training the final layers.
I would want this tutorial to only have best practices. I think not having an official way to support custom training and validation datasets, is a high barrier of entry.

It’s the benefit of using a pretrained model and only training the final layers

It works really well.

I think not having an official way to support custom training and validation datasets, is a high barrier of entry.

Yes, that would be ideal. When we started out with skorch, we put a lot of thought into how to manage train/test splits and even though the current solution does not support this use case, we found it to be the best. At the same time, we thought about implementing a "predefined split" that would support this exact use case, but we left it open. Maybe now is the time to implement it.
I guess that it could look something like this:
class PredefinedSplit:
    def __init__(self, dataset_valid):
        self.dataset_valid = dataset_valid

    def __call__(self, dataset, y=None, groups=None):
        if self.dataset_valid is None:
            raise ValueErrror("some useful message")
        return dataset, self.dataset_valid

    def __getstate__(self):
        state = self.__dict__.copy()
        state['dataset_valid'] = None
        return state

But there are certainly some edge cases that still need covering.

Maybe now is the time to implement it.

:+1: from my side. I work mostly with datasets that have official train/test splits. So far I've resorted to using custom scoring functions that capture test dataset and ignore the data that EpochScoring passes to them. But this is again hacky and it would be great to have skorch support for predefined splits.

I created a new issue: #282
Regarding this PR: It could either be left as is until the new feature is included, or we wait for it first.

I will wait for #282 to be resolved.

Regarding examples vs notebooks, as long as I can keep all the logic in one notebook, I would prefer this tutorial to be in notebooks.

I added a datasets directory into notebooks that can be used by notebooks. The downloading logic is placed in the notebook itself. This allows the notebook to be able to run on all platforms.

This looks really good. I have only 2 minor points left:
The download function could be made a little more flexible by allowing to pass the folder. I made this and some minor adjustments with when/how to print things:
def download_and_extract_data(dataset_dir='datasets'):
    data_zip = os.path.join(dataset_dir, 'hymenoptera_data.zip')
    data_path = os.path.join(dataset_dir, 'hymenoptera_data')
    url = "https://download.pytorch.org/tutorial/hymenoptera_data.zip"

    if not os.path.exists(data_path):
        if not os.path.exists(data_zip):
            print("Starting to download data...")
            data = request.urlopen(url, timeout=15).read()
            with open(data_path, 'wb') as f:
                f.write(data)

        print("Starting to extract data...")
        with ZipFile(data_zip, 'r') as zip_f:
            zip_f.extractall(dataset_dir)

    print("Data has been downloaded and extracted to {}.".format(dataset_dir))

Also, on my machine, the final validation accuracy was a little lower than 0.9608, so maybe you could adjust the sentence in the last paragraph to something like ...with a validiation accuracy of roughly 0.96.

Looks good, fantastic work. I will merge on Monday.

I was just about to merge when I discovered a small error (see comment). After this, we should really be good.


Bump to v0.5.3

Pull Request Test Coverage Report for Build<PHONE_NUMBER>3
Details

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.3%) to 84.779%

Totals

Change from base Build<PHONE_NUMBER>6:
-0.3%

Covered Lines:
2434

Relevant Lines:
2871

💛  - Coveralls


[Request] Fleet Warrior Mythic Ability

After reloading a Lord of Nothing save I noticed the merc I had in Dawnflower Dervish seemed to lose 5 bab. It took me a minute to figure out that the was the new implementation of Rapid Attack, which makes sense and is close to raw. However there is a pnp mythic ability that matches the old implementation and would be cool to see in WotR.

the old implementation？

Before the last month or two, for me Rapid Attack just gave a character the ability to make a full attack or charge without reducing bab/dropping an attack at the highest bab. Could have been something changed on my end or from Owlcat tbh.


Service worker not working in firefox private mode

As per the findings, In Firefox, Service Worker APIs are hidden and cannot be used when the user is in private browsing mode, or when history is disabled, or if cookies are cleared when Firefox is closed. These APIs are disabled because of security reasons for avoiding Man in middle attack.
Links to findings for this issue:
https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
https://bugzilla.mozilla.org/show_bug.cgi?id=1320796
https://bugzilla.mozilla.org/show_bug.cgi?id=1601916

Will recreate when needed. Closing


Integrate release-please

remove standard-version
add release-please action
integrate and deploy typedoc ??
publish to npm when a new release created
add manifest config to remove v from tags ?

Yes to all, please!


Updating front-end code to accommodate Intel HLS and add library for …

…compiling HLS code to bitstream for Intel FPGA

Description
Updated front-end code to accommodate Intel HLS and add library for compiling HLS code to bitstream for Intel FPGA
Problems
The Intel HLS option was not available for the user
Proposed Solutions
updated the code to allow users to choose a mode to output Intel HLS code in the command line, output source HLS as a file, or compile the HLS code to an Intel FPGA emulator .exe file. added library under harness/intel_oneapi to support DPC++ compilation for FPGA.

As the LLVM version has changed, this PR is no longer available. #277 implements the latest Intel HLS support.


added healthz check to prefix provider

Issue #, if available:
Description of changes:

Added healthz check to prefix provider to implement the provider interface

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

lgtm, thanks.


Add Bootstrap Material Design

Please add Bootstrap Material Design to BootstrapCDN.

@theel0ja this looks interesting. I will talk it over with @jmervine and @XhmikosR
In the meantime I highly recommend JSDelivr (they use our network): http://www.jsdelivr.com/projects/bootstrap.material-design

I don't think it makes sense. I mean, then everyone would like to add another Bootstrap theme and so on.

So, what should we do with this?

@jdorfman I'll leave it to you, but thinking this might be better for JSDelivr, as you said. That said, I'm always down to expand our footprint where it makes sense., so I'll leave it up to you.

unpkg.com is hosting it which is better since the Bootstrap Material Design team doesn't have to wait for us to upload it.


⚠ AGEG website (redirect) has degraded performance

In 20f8807, AGEG website (redirect) (https://ageg.ca/) experienced degraded performance:

HTTP code: 200
Response time: 2698 ms

Resolved: AGEG website (redirect) performance has improved in edf7804 after 32 minutes.


lvm does not activate volume group on boot

When using LVM to manage attached storage, the volume group is not activated during boot. After the boot, volume groups can be activated manually.
Repro :

Boot Ubuntu 16.04
Run

DATA_DISK=/dev/nbd1

apt-get install -y \
    lvm2 \
    system-storage-manager

systemctl enable lvm2-lvmetad
systemctl start lvm2-lvmetad

pvcreate $DATA_DISK
vgcreate data $DATA_DISK

lvcreate -l 100%free -n data data
mkfs.xfs /dev/data/data
mkdir /data
mount /dev/data/data /data

echo '/dev/data/data   /data   xfs defaults,nofail    0 2' >> /etc/fstab

reboot server
check if device is available ls /dev/data/data (it's not available)
run vgchange -a y - this activates the volume group
volume group is available - ls /dev/data/data

Any news on this ?

I am experiencing this issue as well. 150GB image assigned to my server but not loading or mounted.

$lsblk
------ find disk. On mine it was vdb
$mkfs.ext4 /dev/vdb
$mkdir /mnt/volume_b
$mount /dev/vdb /mnt/volume_b
$df -h

This is my temporary fix for now. Incase someone isn't worried about the lvm aspect.

any news? .. I have to run vgchange -a y and mount -a to get the LVM volume to mount each time the box is rebooted, which is rather annoying :(

It is annoying indeed... The Debian image show no issues, though, so perhaps there's just something missing in this one, something that could be copied over from the Debian image ?

it seems the solution is to modify /etc/lvm/lvm.conf
and set use_lvmetad=0


mui.Tabs

Is it possible to create mui.Tabs? I noticed that the option is available, but TabPanel is missing…
Is there a way to create tabs with mui in streamlit?
Thank you very much for this great package!
Kind Regards,

Hello @Filhomn, yes it is possible to use mui.Tabs(). TabPanel is just a javascript function defined in mui's examples, it's not part of mui components. You can implement the same logic in Python.
I'll try to provide a minimal sample code for mui.Tabs next week. Meanwhile you can refer to my Streamlit Gallery demo which uses mui.Tabs for the editor card (source code here).


Up & Down don't pass this to onHit

Hi,
As the title says, the up and down methods don't pass the this/vue instance to the onHit function in the same way that the hit method does.
So if you set your own onHit property, as shown in the example ...
onHit: function (item, vue) {
        vue.query = item
      },

you get errors about Cannot set property 'query' of undefined

Thanks


Added AVIF

This adds the AV1 Still Image File Format (AVIF).
Jon Bauman sent an intent to ship AVIF lately, so I thought it should be listed as a platform status entry.
According to https://www.chromestatus.com/features/4905307790639104 Chrome already shipped this a while ago.
WebKit doesn't have an entry on its feature status page, though they are obviously also working on it right now according to https://bugs.webkit.org/show_bug.cgi?id=207750.
The Chrome Platform Status page also claims that Edge is positive on supporting it. But I assume with the switch to Chromium Edge should automatically have support for it now. I didn't test it, though, and therefore didn't add a hint for it.
Sebastian

Edge should automatically have support for it now

Edge uses its own media stack, and hasn't added support for AVIF yet :)


Is it possible to set a custom path where the cache could be stored persistently on disk.

The question basically, want to know if it is possible to set a custom path where the note contents would be cached on disk. Or would it be feasible to sync the simplenote files from another set of files in a custom folder? I ask this because then I can link the simplenote files/objects from within vimwiki, and with that if I have taskwiki, I would be able to update my task list just by syncing up with my simplenote.

Hi. Sorry for the delay in replying.
The cache simplenote.vim uses is a "lightweight" one and doesn't include the actual note content. It would be possible to support storing this in another location.
This issue covers caching actual note content: https://github.com/simplenote-vim/simplenote.vim/issues/18. I've erred on the side of not caching the full content of notes because I think that is better covered by other applications: https://github.com/insanum/sncli
My main issue at the moment is I'm somewhat computerless so I can't really develop anything, but I do still use this on and off.

Also see https://github.com/simplenote-vim/simplenote.vim/issues/115

Thanks! Will take a look at those.