No issues

Absolutely love this - congrats, would love it if we could work in radioactivity somehow :) e.g. https://en.wikipedia.org/wiki/Radionuclide

How did you get it to open?

Hi, the 3D periodic Table?
On Wed, Sep 6, 2023 at 4:09 PM Masa @.***> wrote:

How did you get it to open?
—
Reply to this email directly, view it on GitHub
https://github.com/suhdonghwi/3d-periodic-table/issues/6#issuecomment-1708447869,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABWVPHXK6PX67LA2YAHFKVLXZB7YHANCNFSM6AAAAAAWP7BMGY
.
You are receiving this because you authored the thread.Message ID:
@.***>

https://periodic.donghwi.dev/
On Fri, Sep 8, 2023 at 3:52 PM Josua Wilson @.***> wrote:

Hi, the 3D periodic Table?
On Wed, Sep 6, 2023 at 4:09 PM Masa @.***> wrote:

How did you get it to open?
—
Reply to this email directly, view it on GitHub
https://github.com/suhdonghwi/3d-periodic-table/issues/6#issuecomment-1708447869,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABWVPHXK6PX67LA2YAHFKVLXZB7YHANCNFSM6AAAAAAWP7BMGY
.
You are receiving this because you authored the thread.Message ID:
@.***>

I got it open, thanks!

On Fri, 08 Sept 2023, 20:05 Masa, @.***> wrote:

I got it open, thanks!
—
Reply to this email directly, view it on GitHub
https://github.com/suhdonghwi/3d-periodic-table/issues/6#issuecomment-1712045977,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABWVPHRHPAC6P7L64Y3EIPDXZNNABANCNFSM6AAAAAAWP7BMGY
.
You are receiving this because you authored the thread.Message ID:
@.***>


Add YAML Front Matter in CSS/SCSS support (Jekyll)

Description
When a frontmatter encounter, just don't try to oneline it.
Expected Results
The beautified code should have looked like:

---
# Only the main Sass file needs front matter (the dashes are enough)

---

Steps to Reproduce

Start a new jekyll project
Run command Atom Beautify: Beautify Editor in the main.scss in the css folder
This beautified code does not look right!

Debug
Here is a link to the debug.md Gist: https://gist.github.com/clawfire/ee7099183ef315b93c96
Checklist

[x] I have tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
[x] Searched for existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
so I know this is not a duplicate issue
[x] Generated debugging information and added link for debug.md Gist to this issue

I looked at the source indicated by the debug.md file.  It appears to beautify correctly except for the YAML part at the top:
---
# Only the main Sass file needs front matter (the dashes are enough)
---

Currently the beautifier, prettydiff/lib/csspretty.js, attempts to parse the entirety of the document as CSS with some minor syntax exceptions for other template languages.  I would need to research Front Matter syntax more before I could do anything.

Yep, you're right, the point is to be able to prevent rewriting of Front Matter in any type of file. Not just CSS/SCSS I think.

Looks like this was fixed in prettydiff 2.0.5 last year (now version 2.2.x). But I'm still seeing the old behavior in 0.30.4 so I'm assuming atom-beautifier includes an older version of prettydiff. What needs to be done to pull a more recent release of prettydiff in?

@benlachman Yeah, I have had trouble getting Pretty Diff 2 into Atom Beautify.  There is a pull request for this if somebody could help figure out why the unit tests are broken.
https://github.com/Glavin001/atom-beautify/pull/1750

Still an issue

Still an issue


Communicating between two different processes in Crystal

I'm trying to do this:
Process A -> Send
Process B <-Receive
Process B -> Send
Process A <-Receive
An example in Node.js from Stackoverflow can explain my question.
example2.js
var fork = require('child_process').fork;
var example1 = fork(__dirname + '/example1.js');

example1.on('message', function(response) {
  console.log(response);
});

example1.send({func: 'input'});

example1.js
function func(input) {
  process.send('Hello ' + input);
}

process.on('message', function(m) {
  func(m);
});

Thanks on advance!

This is a question for stackoverflow: using #crystal-lang, but you may use a pair of UNIX sockets:
left, right = UNIXSocket.pair

fork do
  who = right.gets
  right << "Hello #{who}"
end

left.puts "world"
puts left.gets # => "Hello world\n"

You may choose to serialize/unserialize to JSON and have a nicer API to hide the socket pair.

A little bit lower level, there's also the standard pipe with IO.pipe.

The example of the nodejs is async, but use pipe in Crystal is sync?

@jhass isn't IO.pipe unidirectional?
Any IO is asynchronous in Crystal even though it appears synchronous in code. There are no callbacks like in JS, but spawned fibers. Any IO operation will block the current fiber only, and let every others running.

@ysbaddaden The Stackoverflow isn't mine, is just a reference.
Ok, I look your code, and works, but how I can run from two different executables?:
Something like this?
# Process A
# right.cr
require "socket"

left, right = UNIXSocket.pair

fork do
  who = right.gets
  right << "Hello #{who}"
end

# Process B
# left.cr
require "socket"

left, right = UNIXSocket.pair

left.puts "world"
puts left.gets # => "Hello world\n"

Then I execute ./left and ./right in different terminals at the same time and nothing happens

@faustinoaq fork lanches a new process running the code inside the block. If you need it to be two executables, you can use Process.run and pass some IO to the stdin/stdout of the process. Alternatively you can use a UnixServer/UnixSocket to connect them, or even a TCPSocket. There are several alternatives, search for IPC, or "Inter-Process Communication". These techniques are valid on just about any language, Crystal included.

Ok I understand now @lbguilherme thanx for explain me, i have to research more about IPC,
@ysbaddaden sorry for my confusion and thanx for your response.


Issue rendering paragraph toolbar button (missing icon)

Seems like the icon for the paragraph button is missing in NormalButton.vue.

Hi there, could you please paste your Resource Class, or just the Tiptap fields inside that class? I'm not sure which button you mean. There is no "paragraph" button. Just pressing enter inside Tiptap adds a new paragraph, no button is needed. All other block elements can be turned back into a paragraph by by toggling the button again (like H1, H2, Unordered List etc.).

Hi @manogi ,
I often use the "paragraph" button to reset text pasted from elsewhere, maybe that is just me?
Tiptap::make('Content', 'content')
                ->buttons([
                    'heading',
                    'paragraph',
                    '|',
                    'italic',
                    'bold',
                    '|',
                    'link',
                    'strike',
                    'underline',
                    'highlight',
                    '|',
                    'bulletList',
                    'orderedList',
                    '|',
                    'table',
                ])
                ->headingLevels([1, 2, 3, 4])
                ->onlyOnForms(),

Maybe the following would work:
File: NormalButton.vue:
Line 58:

else if (this.button == 'paragraph') {
    return ['fas', 'paragraph'];
}

Line 109:

else if (this.button == 'paragraph') {
    command.setParagraph();
}

Hmm. I'm not sure I would like the Paragraph button to be a "first class citizen", because people might think they actually need to use it. But I might consider adding the button, but not adding it to the Readme. I will think about it.

Sure thing, let me know what you decide :) Thanks!

I decided to add the button (is added in version v2.7.2), but I don't mention it in the Readme. Using feels a little strange to me, as there is no way to "untoggle" a paragraph, as the paragraph is the default block node. I hope it fits your use case!

Thank you @manogi!


Fix CVE-2023-6237

Sync from OpenSSL.
Checklist

[ ] 在 https://yuque.com/tsdoc 增加或更新了必要的文档
[x] 增加或更新了必要的测试用例
[x] 对于重要修改，更新了CHANGES文件
[ ] 当前修改存在对已有API参数或返回值的改变
[ ] 当前修改存在对旧版本功能的兼容性改变（如网络协议或密码算法）

CI failure is very related

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: dongbeiouba:x: nhormanYou have signed the CLA already but the status is still pending? Let us recheck it.

CI failure is very related

Fixed.

ping @InfoHunter


Sonar compatibility

Is there any chance of adding sonar compatibility ?  I don't know much about it but I know the swift plugin for sonar costs $$$

Unfortunately it is not on the roadmap for the near future, but you might find this open source Swift plugin for Sonar useful: https://github.com/Backelite/sonar-swift


pagination drop down option become anchor(link)

Pagination drop down option become anchor(link)instead of a normal selection option.
I noticed also after i select 25,30 ,50(last)  (it's working) but after i select previous page size(30,25 or 10) my page redirect to home page.

@noeljoaquin30 pagination dropdown option is always an anchor in bootstrap3 and 4. In addition, the href attribute is always #, so is it any example can let me reproduce it,
https://codesandbox.io/s/k5750vzzvv this is an example you can take and give me a simple and minimal case for reproducing, thanks.  I will open this issue when I can reproduce this issue

@AllenFang  i tried to fork your example and i have added records to test the pagination. And the page size option is not href attribute. Please check example  https://codesandbox.io/s/nro84z60np thank you

hi @AllenFang  can you re-open the issue? since it is not cleared to me and not yet fixed. thanks

Your example work for me lol

yes that's right but in my real project the pagination size is an anchor link. how it happened ?

yes that's right but in my real project the pagination size is an anchor link. how it was happened ?

@noeljoaquin30 i have same issue, the drop down button it self navigating to "/step" page. Is this fixed in your case?


Furthrer analysis from database

Analysing simple keywords/sentences (if possible) from the datamodel without asking an LLM after the file has been analysed

Most likely not implemented in this project. But a good idea for future implementation.

Made new draft in ideas section for this


Update next-post.mdx

👷 Deploy Preview for tpm-blog processing.

Name
Link

🔨 Latest commit
11914a5c22a87c9dc558c159c12bcb9682886110

🔍 Latest deploy log
https://app.netlify.com/sites/tpm-blog/deploys/6444bf3967b5570008a835f3


The database is full.

Steps to Reproduce
When the database file size reaches ~2G<PHONE_NUMBER> bytes), the database is full
Unhandled exception:
IsarError: The database is full.

Code sample
import 'dart:io';
import 'package:isar/isar.dart';
part 'test_isar.g.dart';

@collection
class User {
  Id id = Isar.autoIncrement; // you can also use id = null to auto increment
  String? name1;
  String? name2;
  String? name3;
  String? name4;
}

const bigText = """
Features💙 Made for Flutter. Easy to use, no config, no boilerplate🚀 Highly scalable The sky is the limit (pun intended)🍭 Feature rich. Composite & multi-entry indexes, query modifiers, JSON support etc.⏱ Asynchronous. Parallel query operations & multi-isolate support by default🦄 Open source. Everything is open source and free forever!Isar database can do much more (and we are just getting started🕵 Full-text search. Make searching fast and fun📱 Multiplatform. iOS, Android, Desktop and FULL WEB SUPPORT!🧪 ACID semantics. Rely on database consistency💃 Static typing. Compile-time checked and autocompleted queries✨ Beautiful documentation. Readable, easy to understand and ever-improvingJoin the Telegram group for discussion and sneak peaks of new versions of the db.If you want to say thank you, star us on GitHub and like us on pub.dev 🙌💙
""";

void main() async {
  await Isar.initializeIsarCore(download: true);
  final isar = await Isar.open([UserSchema],
      inspector: true, directory: Directory.current.path, name: "full-test");

  while (true) {
    await isar.writeTxn(() async {
      isar.users.putAll(List.generate(
          100,
          (index) => User()
            ..name1 = bigText
            ..name2 = bigText
            ..name3 = bigText
            ..name4 = bigText));
    });
  }
}

Waiting for fill to 2.1G

Details

Platform: Windows 11
Dart SDK version: 2.19.0-255.0.dev
Isar version: 3.0.2

[x] I searched for similar issues already
[x] I filled the details section with the exact device model and version
[x] I am able to provide a reproducible example

How much memory have you allocated? I believe the database size is limited by the available virtual memory.

Thank you for your advice.
I don't know how to allocate memory.
I checked dart --help --verbose
old_gen_heap_size: 30720 MB
Dart VM appears to have plenty of memory.

2GB is the maximum supported size currently. I'll add an option to increase the allowed size

There is a new property to customise the max database size (maxSizeMib) a new version will be released soon

I seem to be getting instances where I get this message even though I am nowhere near past the limit, I've even increased my size to 10GB (the size of user data/cache is only around 1GB) and I set the above parameter to 10240.
I'm trying to import 700K objects in one single transaction and get "The database is full", while the message does not show if I import 1K objects 700K times instead.
I also have feedback from users on slower devices where importing too many objects crashes their device but if I do the alternative 1K per transaction limit, no crash occurs. I'll probably make a new issue for this with the proper information, I'm on the latest Isar version.


lnrpc: remove legacy onion payload as an option for SendToRoute

In this commit, we remove the option to allow the caller to use the
legacy onion payload. The new payload is much more flexible and
efficient, so there's really no reason to still use it, other than for
backwards compatibility tests. Our existing tests that exercise the
legacy feature uses a build tag, which forces nodes to not advertise the
new payload format, which then forces path finding to include the legacy
payload, so we can be confident that route is still being tested.
The existence of this option (which actually makes the TLV payload
opt-in for SendToRoute users) makes it harder to remove it from the
protocol all together. With this PR, we take a step forward to allowing
such a change which is being tracked on the spec level at:
https://github.com/lightning/bolts/pull/962.

This change may break compilation for statically compiled projects that check in or interact with the protos, so we may want to be a bit more soft handed by just ignoring that field. The main upside of this approach is that stuff will break once projects that care about this feature (hopefully!) update to test out the upcoming 0.15.0 release candidate.

@roasbeef, remember to re-request review from reviewers when ready

Modifying this PR to just stop reading the field, then we can remove it in 0.16 or earlier.

Minimal diff looks good to me.

Good idea, will add that!


git tag for swift-2.0 branch

Thank you for your great library.
I'd like you to tag like '2.0.0-beta.4'
Because I want to add dependency in *.podspec, but podspec doesn't allow symbols like :git, :branch.
can do this in Podfile.
pod 'KeychainAccess', :git => 'https://github.com/kishikawakatsumi/KeychainAccess.git', :branch => 'swift-2.0'

cannot do this in *.podspec
s.dependency 'KeychainAccess', :git => 'https://github.com/kishikawakatsumi/KeychainAccess.git', :branch => 'swift-2.0'

want
s.dependency 'KeychainAccess', '~> 2.0.0-beta.4'

Best :smile:

Thank you very much for using my lib as dependency and the suggestion. There is no reason for opposing. I'll do later. Thanks!

Done! If you find any troubles, please let me know. Thanks! @dataich

Oh I'm sorry I let you misunderstand :bow:
s.version in KeychainAccess.podspec should be same as git tag.
Pod::Spec.new do |s|
  s.name             = "KeychainAccess"
  s.version          = "2.0.0-beta.6"


how to release model data after work done?

Hi sh1r0!
I modified the demo to meet the needs of my own app. The Caffe model I used is about 400+MB, but the sum memory of android phone is just 1GB. So, I want to know how to release the loaded model data in memory.
Could you help me out ?  Thanks any way!
Best regards!

The destruction method (https://github.com/sh1r0/caffe/blob/cmake_android/android/caffe_mobile.cpp#L82) should be exposed to jni layer. I'll fix it later, thanks.

@sh1r0 Thanks for your reply. I'm looking for your enhancement. Best regards!


Authentication System

Hi,Please Create Authentication Library For A+ Framework!

Hello @tahaghafuri !
We plan to create an Auth Library soon, but we don't have the necessary use cases yet.
We plan to use token based, session and ACL.
It is currently possible to authenticate using methods of the Framework\HTTP\Request class.
In a controller you can do this:
$auth = $this->request->getBasicAuth(); // array with username and password keys

or
$auth = $this->request->getBearerAuth(); // array with token key

So just check if the authentication data are in, for example, the database.


Number of lessons completed reflects in classroom feed

Number of lessons completed / lessons still to do is shown in user classroom feed, inside a classroom's card

Branch issue-16-number-of-lessons-completed-reflects-in-classroom-feed created for issue #16.


Multiple Cameras and RTabmap?

I'm going to be using this plugin as a driver for my smartglasses, is there any way to allow multiple cameras to run for the same scene? Also can RTabmap be used?

is there any way to allow multiple cameras to run for the same scene?

CalculatorGraph receives images, not camera, so you can run multiple cameras.
Some graph may expect input images are from the same source — last detected landmarks are remembered sometimes ―, but in that case, you can run multiple CalculatorGraphs in a scene.
However, if you'd like to combine the results from multiple images (e.g. Triangulation), you need to do it by yourself because MediaPipe does not support it (AFAIK).

Also can RTabmap be used?

I'm sorry I don' know, though it depends on use cases.
Please ask it in mediapipe's community.


gen_pose_file.py: rewrote file [#4774]

Argument checking up is invalid and not user friendly
Don't use print to write file
Rename pcd_file to captical letter since it is iteral, myabe I would refactor a couple of files to    consolidate this kind of stuff to another generic file in the future.
Rename main() to meaningful method name.

Please fix the CI error and re-submit.


Decimal to Hexadecimal conversion in C

💥 Proposal
Given a number in Decimal form, convert it into its Hexadecimal form. I would write code in C.
Ex:
Input : 10
Output: A
Have you read the Contributing Guidelines on Pull Requests?
Yes

/assign


Failed to found *sdl.KeyUpEvent

Hello
I search *sdl.KeyUpEvent and *sdl.KeyDownEvent as your example but i'm failed to found it
Any idea ?

Hi @Chipsterjulien, I've updated the examples. Could you try again?

I go home and test it.
Thank you for help and the great responsiveness


Fix cropping CLI

As observed by @bertsky, the latest changes to the code disabled
the cropping functionality. Since DFKI cropping is the only
dedicated processor for this task in OCR-D, we need it asap. This
commit proposes the necessary changes to bring cropping back to
work. However, it is far from optimal. I.e. the heavy dependencies
introduced by the machine-learnign based tools in this repo should
be somehow circumvented for the relatively simple rule-based
cropping processor.
Fixes #11.

@khurramHashmi Why didn't you just merge my PR? Now we have a master branch which is still not working as expected (i.e. AlternativeImage) and my branch which cannot be merged anymore. This is very frustrating.

@wrznr I think this is my fault, as I told Khurram to fix cropping and he started working on the fix in parallel to your pull request. This made the pull request not compatible with our local version and we tried to incorporate all your changes manually BEFORE you updated your pull request (i.e. AlternativeImage functionality). We will adapt those changes quickly (today) as well to get the desired functionality working. I am sorry for the inconvenience.

@mjenckel So I can safely close this one, right?


[Feature] Implement COG-VLM2

Motivation
CogVLM2 is now the SOTA open source VLM for captioning tasks.
Related resources
No response
Additional context
No response

@isidentical hi, thanks for your information. We will include cogvlm2 after pr #1502 is merged.

any update?

any update?

hi, it's in progress.  Any update will sync to this issue.

@isidentical @Jayantverma2 hi, guys. CogVLM2 models are supported in PR #1502. If you have time, have a try. Welcome to leave any comments in the PR. THX.

@RunningLeon Is this the correct way to initialize the cogvlm2?
engine = pipeline(model_path, "cogvlm2",log_level="DEBUG")
I have made some changes to config.json
{
"architectures": [
"CogVLMForCausalLM"
],
"auto_map": {
"AutoConfig": "configuration_cogvlm.CogVLMConfig",
"AutoModelForCausalLM": "modeling_cogvlm.CogVLMForCausalLM"
},
"vision_config": {
"dropout_prob": 0.0,
"hidden_act": "gelu",
"in_channels": 3,
"num_hidden_layers": 63,
"hidden_size": 1792,
"patch_size": 14,
"num_heads": 16,
"intermediate_size": 15360,
"layer_norm_eps": 1e-06,
"num_positions": 9217,
"image_size": 1344
},
"hidden_size": 4096,
"intermediate_size": 14336,
"num_attention_heads": 32,
"max_position_embeddings": 8192,
"rms_norm_eps": 1e-05,
"template_version": "chat",
"initializer_range": 0.02,
"bos_token_id": 128000,
"eos_token_id": [128001, 128009],
"pad_token_id": 128002,
"vocab_size": 128256,
"num_hidden_layers": 32,
"hidden_act": "silu",
"use_cache": true,
"transformers_version": "4.41.0"
}
But when I am running this with this prompt
prompts = [                 {                     'role': 'user',                     'content': [                         {'type': 'text', 'text': prompt},                         {'type': 'image_url', 'image_url': {'url': f'data:image/jpeg;base64,{image}'}}                     ]                 }             ]
it is generating b''

@Tushar-ml hi, pls. follow examples in the document: https://lmdeploy.readthedocs.io/en/latest/inference/vl_pipeline.html#vlm-offline-inference-pipeline

I am getting OOM in A40 having GRAM 48 GB for cogvlm2-19b
@RunningLeon  What is the minimum requirement of the system

@RunningLeon  any docs how to run this CogVLM2 as in PR mentioned, Tokenizer need to be applied manually

awesome, look forward to it.  Really like lmdeploy because it's much more stable than sglang for these vision models.

@RunningLeon any docs how to run this CogVLM2 as in PR mentioned, Tokenizer need to be applied manually

@Tushar-ml hi,  no need to do so for cogvlm2, but should do for cogvlm(1).

awesome, look forward to it. Really like lmdeploy because it's much more stable than sglang for these vision models.

@pseudotensor hi, glad to hear that. If possible, please recommend lmdeploy to other people who are interested in deploying LLMs and VLMs. Thanks.

awesome, look forward to it. Really like lmdeploy because it's much more stable than sglang for these vision models.

@pseudotensor hi, glad to hear that. If possible, please recommend lmdeploy to other people who are interested in deploying LLMs and VLMs. Thanks.

Yes, will gladly do that.

@RunningLeon I am getting OOM in A40G, 48 GRAM. What is the recommended system for cogvlm2, as model is of size not more than 40gb

@RunningLeon I am getting OOM in A40G, 48 GRAM. What is the recommended system for cogvlm2, as model is of size not more than 40gb

@Tushar-ml hi, could you provide your sample code? Normally, you can reudce cache_max_entry_count to reduce kv mem size and reduce max_prefill_token_num from  PytorchEngineConfig
https://github.com/InternLM/lmdeploy/blob/5a2aaf1dc81e101c282456305546787558e509ff/lmdeploy/messages.py#L202-L230

Thanks @RunningLeon I will try this

Hi@RunningLeon ！
Due to server network limitations, I could not compile and install the latest lmdeploy on the server, so I downloaded an image of lmdeploy0.4.2 on docker hub and ran it, then ran cogvlm2 and reported an error:
root@gpu9:~/data/CogVLM2# python cogvlm_demo.py
2024-05-31 01:31:08,920 - lmdeploy - ERROR - TypeError: expected string or bytes-like object
2024-05-31 01:31:08,920 - lmdeploy - ERROR -  test failed!
model /root/data/cogvlm2-llama3-chinese-chat-19B/ requires transformers version None but transformers 4.40.2 is installed.
my code：
from lmdeploy import pipeline
from lmdeploy.vl import load_image
model_path = '/root/data/cogvlm2-llama3-chinese-chat-19B/'
pipe = pipeline(model_path)
image = load_image('/root/data/dataset/misumi_data/images/Misumi000006.jpg')
response = pipe(('图中出现的零件是什么？', image))
print(response)
I look forward to your reply. Thank you

@RunningLeon Hi！
Due to server network limitations, I could not compile and install the latest lmdeploy on the server, so I downloaded an image of lmdeploy0.4.2 on docker hub and ran it, then ran cogvlm2 and reported an error:
root@gpu9:~/data/CogVLM2# python cogvlm_demo.py
2024-05-31 01:31:08,920 - lmdeploy - ERROR - TypeError: expected string or bytes-like object
2024-05-31 01:31:08,920 - lmdeploy - ERROR - test failed!
model /root/data/cogvlm2-llama3-chinese-chat-19B/ requires transformers version None but transformers 4.40.2 is installed.
my code：
from lmdeploy import pipeline
from lmdeploy.vl import load_image
model_path = '/root/data/cogvlm2-llama3-chinese-chat-19B/'
pipe = pipeline(model_path)
image = load_image('/root/data/dataset/misumi_data/images/Misumi000006.jpg')
response = pipe(('图中出现的零件是什么？', image))
print(response)
I look forward to your reply. Thank you

@GuoXu-booo hi, because cogvlm is supported in pytorch engine and can you simply clone the code from pr and run pip install -e to install it. BTW,  you better use the latest code from PR #1502. The check env part fails in your case as there's no transformers_version in the config.json, which is fixed in here
git clone --recursive -b support-cogvlm-dev https://github.com/RunningLeon/lmdeploy.git
cd lmdeploy
pip install -e .

@RunningLeon is there any plans to use turbomind for CogVLM since it is faster for llama3?

@RunningLeon is there any plans to use turbomind for CogVLM since it is faster for llama3?

sorry. No plan yet.


Solving the assets path resolution maze

We have different layers of assets:

the ones relative to the template (JavaScript file)
the ones relative to the document (and/or its base-dir attribute)
the ones relative to the asciidoctor-pdf (embededd in the npm package)

The question is: what are the template assets relative to? The base-dir? The current working directory? The document?

@matklad I'm wondering how to you handle paths in your template ? Do you use relative path ? Absolute path ? Do you embed the content of the external ressources ?

In a pretty horrible way! For CSS, I use relative paths, and I copy-pasted asciidoctor.css alongside my own style. So I have this in html generated by template.js:
  <link href="../asciidoctor.css" rel="stylesheet">
  <link href="../slides.css" rel="stylesheet">

I also need a tiny bit of JS, and I embed it using this awful hack:
// template.js

module.exports = {
  document: (node) => {
    return `<!DOCTYPE html>
    ....
  <link href="../asciidoctor.css" rel="stylesheet">
  <link href="../slides.css" rel="stylesheet">
   ...
  <script>
  ${init.toString()} // 😨
  init()
  </script>
  ...
  `
  },
}

function init() {
  ...
}

Thanks for sharing, it confirmed ours concerns 😅
I think the asciidoctor.css should be "globally available" somehow.
In my opinion, the most logical solution is to use paths relative to the template.
For instance:
js/
  script.js
css/
  slides.css
template.js

<link href="./css/slides.css" rel="stylesheet">
<script src="./js/script.js"></script>

Since we are using Node.js, we could use __dirname to use absolute paths:
const html = `
<link href="${__dirname}/css/slides.css" rel="stylesheet">
<script src="${__dirname}/js/script.js"></script>
`

Another idea is to provide an helper function to resolve resources.
const html = `
<link href="${systemPath("./css/slides.css")}" rel="stylesheet">
<script src="${systemPath("./js/script.js")}"></script>
`

And if we combine this idea with the "globally available" asciidoctor.css:
const html = `
<link href="${primaryStylesheetPath()}" rel="stylesheet">
<link href="${systemPath("./css/slides.css")}" rel="stylesheet">
<script src="${systemPath("./js/script.js")}"></script>
`

By default systemPath could resolve path relative to the template (using __dirname) but we could also accept a second argument to configure the "base directory".
For instance, if you define an assetdir in your document and you want to resolve the assets relative to this directory:
const html = `
<link href="${primaryStylesheetPath()}" rel="stylesheet">
<link href="${systemPath('./css/slides.css', node.getAttribute('assetdir'))}" rel="stylesheet">
<script src="${systemPath('./js/script.js', node.getAttribute('assetdir'))}"></script>
`

We also thought about using a declarative approach where you must provide a list of stylesheets and a list of scripts but it might be too restrictive.
Another idea is to embed everything in the HTML page.
In my opinion, it has two advantages:

The HTML page becomes portable (ie. you can copy this page on another machine)
Chrome can be run in a sandboxed environment

To do that, we could declare assets like:
${primaryStylesheet()}
${stylesheet('./css/slides.css')}
${script('./js/script.js')}

<style>
  .content{}
  /* ... */
</style>
<style>
  .slides{}
  /* ... */
</style>
<script>
  console.log('hello')
  // ...
</script>

We could also provide function to read content:
const html = `
<style>
  ${primaryStylesheetData()}
</style>
<style>
  ${data('./css/slides.css')}
</style>
<script>
  ${data('./js/script.js')}
</script>
`

For images:
const html = `<img class="logo" src="${dataURI(systemPath('./img/logo.svg'))}"/>`

<img class="logo" src="data:image/svg+xml;utf8,<svg ... > ... </svg>"/>

Just throwing some ideas... what do you think ?

Don't have a strong opinion here, but I'd favor just embedding the stuff:

portable HTML page is nice: you don't need a server for assets
this simplifies live-reloading, as only HTML has to be watched by the browser, and the library will naturally know about all dependencies

The possible disadvantages are:

things like jpeg images are not embeddable
embedding big assets (lots of ccs, lots of js) in theory could make the stuff slower, especially if you have many documents that could share assets. In practice, I think the size should be small enough so that we don't need to worry about copy-pasting stuff several times

Aren't "things like jpeg images" embeddable using data-uris? Pngs seem to work OK with asciidoctor 2.

I think we now have a decent strategy.
I'm closing this issue but feel free to open a new one with a proposal on how to improve things further.


ENH: A method to return the numerical inverse of a function

Updated: 01/11/2016
EDIT: While decision is being taken I have uploaded the current implementation as a standalone PyPI package.
A method specialized on calculating the numerical inverse of any invertible continuous function.
DISCLAIMER: The problem of calculating the numerical inverse of an arbitrary function in unlimited or open intervals is still an open question in applied mathematics. The main purpose of this package is not to be fast, or as accurate as it could be if the inverse was calculated specifically for a known function, using more specialised techniques. It is essentially a very user-friendly wrapper that uses the existing tools in scipy to solve the particular problem of finding the inverse of a function meeting the continuity and monotonicity conditions, but while it performs really well it may fail under certain conditions. For example when inverting a log10 it is known to start giving inccacurate values when being asked to invert -10, which should correspond to 0.0000000001 (1e-10), but gives instead 0.0000000000978 (0.978e-10). This message from @josef-pkt decribes the decision that needs to be made very well.
Examples:
It can be used to calculate the inverse function at certain y_values points:
    >>> cube = (lambda x: x**3)
    >>> invcube = inversefunc(cube, y_values=3)
    array(3.0000000063797567)

Or to obtain a callable that will calculate the inverse values at any other points if y_values is not provided:
    >>> invcube = inversefunc(cube)
    >>> invcube(27)
    array(3.0000000063797567)

It requires the function to be continuous and strictly monotonic (i.e. purely decreasing or purely increasing) within the domain of the function. By default, the domain includes all real numbers, but it can be restricted to an inverval using the domain argument:
    >>> import numpy as np
    >>> inversefunc(np.cos, y_values=[1, 0, -1], # Should give [0, pi / 2, pi]
    ...             domain=[0, np.pi])
    array([ 0.        ,  1.57079632,  3.14159265])

Additionally, the argument open_domain can be used to specify the open/closed character of each of the ends of the domain interval:
    >>> inversefunc(np.log10, y_values=-2, # Should give 0.01
    ...             domain=0, open_domain=[True, False])
    array(0.0099999999882423)

Or on both ends simultaneously:
    >>> invtan = inversefunc(np.tan,
    ...                      domain=[-np.pi / 2, np.pi / 2],
    ...                      open_domain=True)
    >>> invtan([1, 0, -1]) # Should give [pi / 4, 0, -pi / 4]
    array([  7.85398163e-01,   1.29246971e-26,  -7.85398163e-01])

Additional parameters may be passed to the function for easier reusability of callables using the args argument:
    >>> invsquare = inversefunc(np.power, args=(2), domain=0)
    >>> invsquare([4, 16, 64])
    array([ 2.,  4.,  8.])

The image of the function in the interval may be also provided for cases where the function is non continuous right at the end of an open interval with the image argument:
    >>> invmod = inversefunc(np.mod, args=(1), domain=[5,6],
    ...                      open_domain=[False,True], image=[0,1])
    >>> invmod([0.,0.3,0.5])
    array([ 5. ,  5.3,  5.5])

Additionally an argument can be used to check for the number of digits of accuracy in the results, giving a warning in case this is not meet:
    >>> inversefunc(np.log10, y_values=-8, # Should give 0.01
    ...             domain=0, open_domain=True, accuracy=6)
    pynverse\inverse.py:195: RuntimeWarning: Results obtained with less than 6 decimal digits of accuracy
    array(9.999514710830838e-09)

Examples of using the callables with vectors to make plots, and compare to the analytical inverse:

Each of those calculated as simply as:
log = lambda x: np.log10(x)
invlog = scipy.misc.inversefunc(log, domain=0, open_domain=True)
x1=np.linspace(0.00001,10,100)
x2=np.linspace(-5,1,100)
ax1.plot(x1,log(y1),'b-')
ax2.plot(x2,invlog(x2),'b-')

invlog_a = lambda x: 10**x
ax2.plot(x2,invlog_a(x2),'r--')

The good thing about this is that checking the result of the inverse function is as easy as checking that f(finv(x))==x, so even if the user inputs a non valid function, they can always make sure that the output is consistent or good enough, in fact the function checks this internally automatically.
I see two type of users:

Users who need a quick way to get the inverse of a function, so they do not have to invest time on doing it themselves. They could use it, check if the results, and if it does not work, then decide to invest the time to do it manually with more sophisticated approaches. Nevertheless for many cases this will be good enough (See examples above).
Other functions that deal with monotonic functions, such as inverting cdf to ppf, or the normalization classes from matplotlib, which takes data intervals and map them linearly or non linearly to the 0-1 interval, using different non-linear functions. Essentially, any function that takes a callable of this characteristics, and may need at any point the inverse function, could very easily make use of this numerical approximation of the inverse.

The summarized internal strategy is the following:
0. Homogenize and normalize the input parameters.

Figure out if the function is increasing or decreasing. For this two reference points ref1 and ref2 are needed:

In case of a finite interval, the points ref points are 1/4 and 3/4 through the interval.
In an infinite interval any two values work really.
If f(ref1)<f(ref2), the function is increasing, otherwise is decreasing.

Figure out the image of the function in the interval.

If values are provided, then those are used.
In a closed interval just calculate f(a) and f(b), where a and b are the ends of the interval.
In an open interval try to calculate f(a) and f(b), if this works those are used, otherwise it will be assume to be (-Inf, Inf).

Built a bounded function with the following conditions:

bounded_f(x):

return -Inf if x below interval, and f is increasing.
return +Inf if x below interval, and f is decreasing.
return +Inf if x above interval, and f is increasing.
return -Inf if x above interval, and f is decreasing.
return f(x) otherwise

If the required number y0 for the inverse is outside the image, raise an exception.
Find roots for bounded_f(x)-y0, by minimizing (bounded_f(x)-y0)**2, using the Brent method, making sure that the algorithm for minimising starts in a point inside the original interval by setting ref1, ref2 as brackets. As soon as if goes outside the allowed intervals, bounded_f returns infinite, forcing the algorithm to go back to search inside the interval.
Check that the solutions are accurate and they meet f(x0)=y0 to some desired precision, raising a warning otherwise.

Summary of the discussion:
Arguments to include it:

The use case is important and it would be good that scipy included this.
The wrapper is very user friendly and easy to use.
The current implementation works well in most cases (see examples) and even for extreme numbers, e.g. inverting a log10 the provided function invlog = scipy.misc.inversefunc(lambda x: np.log10(x), domain=0, open_domain=True) it is as accurate as invlog(-10.)==9.786080337061437e-11.

Arguments to not include it:

The function adds more as a wrapper that uses other scipy tools to perform the calculations, so it really is not a new numerical technique.
There are a lots of caveats regarding achieving a desired precision, specially for open domains, or infinite domains, as this is still an open problem in maths.
It is impossible to check that the callable provided by the users meets the required input conditions of monotonicity and continuity, and this can lead to bad behavior.

Responses to the arguments against

I agree, this is why I included it in the misc folder.
The accuracy of the results can always be checked using the original functions by making sure that f(finv(x))==x, if the accuracy is not good enough, the user can always try to go to a fancier implementation specialized for each case.
In general any function taking a callable is exposed to this risk, as there are only so many checks that one can do for a callable.

Hi! I quickly looked through your code. Here is what I thought:

Please explain a motivation of adding such a function. Sure such an operation (i.e. function inverse) makes sense, but couldn't it be done by root-finding when necessary (and perhaps in a more careful and specific manner)?
vmin, etc., don't sound as good names. I think it would be better to operate in terms of x and y, i.e. given y find x satisfying f(x) = y. So vmin should be rather x_min as I figured.
I guess a function should compute f(x_min) and f(x_max) and store them as allowed limits for y. That is the returned callable raises an error if the argument (y) falls outside these limits.
Why use minimize_scalar when we clearly need root-finding?
Your implementation of limits seems a bit off, too ad-hocking and likely not reliable. I suggest to use brentq with limits given by x_min and x_max. Very straightforward and reliable.
As for vmaxopen and vminopen --- we have to remove them. Also the difference between closed and opened intervals is arguably non-existent in numerical methods.
We can't support infinite intervals, global root-finding is not well defined.

@nmayorov
Thank you for your quick feedback! Some replies below:

Well, the original idea of making this function was in the context of this pull request, but it can be applied to many similar cases. It essentially deals with normalizers (functions F that take data (Space !) an map it into the (0,1) interval (Space B) in a monotonic way. In cases like this is good to be able to go back an forth between space A and space B, for an arbitrary function F. This function may have a simple analytical form, or be a piecewise function, that the user specifies. Without something like this, it is always necessary to also ask the user for the inverse function, which may not be easy in many cases. In any case, I agree, this does not do anything that you could not do with the root-finding routines, the main contribution is the encapsulation of the process: at the end you get a callable, and for all the user know, that may be used as an analytical function, hiding all the complexity of what is happening inside.

I agree on the name change.

The main problem to this is with the open intervals (like in the case of a logarithm), where f(x_min) cannot be really calculated, but yes, in the other cases they can be userful.

You are completely right. I just happened to have used minimize_scalar, and this does the job as well. I will look into re-implementing it

Refer to 7.

I completely disagree with this. If I ask find a solution for log(x)=y, and, I want this to be able to work for any number, I have to set an interval (0->inf), however, if I do not indicate in any way that the interval is open at 0, then I am at risk that log(0) will be evaluated in the process, and get in trouble.

We actually can support infinite in this case. Remember that we are working only with functions that have an inverse in the interval. This means that the functions have to be monotonic and non divergent in the intervals. If a function is completely monotonic and non divergent in the real numbers, then it will only have one root, and it is easy to find by only following the gradients. Now, of course, if the interval is bounded, then I can use a more efficient method for finding the root, hence the difference between the different cases.

just as background info, I didn't go through all the details:
scipy.stats.distribution use a rootsolver with expanding bounds for something similar (inverting the cdf to get the ppf) (I'm using a similar expanding rootsolver to the one in scipy.stats in statsmodels for power calculation.)

Regarding motivation --- sounds reasonable, I surely don't mind it. Perhaps we can ask other people.

I completely disagree with this. If I ask find a solution for log(x)=y, and, I want this to be able to work for any number, I have to set an interval (0->inf), however, if I do not indicate in any way that the interval is open at 0, then I am at risk that log(0) will be evaluated in the process, and get in trouble.

I totally don't mind having open intervals support. But the interesting thing is that established methods (I'm aware of) work only with closed intervals, take root-finding methods or L-BFLGS-B.
I believe there is a good reason for it, seems like it is fundamentally difficult to implement a robust numerical method which works with open intervals. Another simpler thing is floating point precision, if you are interested in a specific real value it is not guaranteed you can express it as a double precision number. So often times you can't specify exactly the interval, which vanishes distinction between open and closed intervals.
As for the example with log --- you just have to define it in the interval [eps, A]. Is it that bad in practical terms?

We actually can support infinite in this case. Remember that we are working only with functions that have an inverse in the interval. This means that the functions have to be monotonic and non divergent in the intervals. If a function is completely monotonic and non divergent in the real numbers, then it will only have one root, and it is easy to find by only following the gradients. Now, of course, if the interval is bounded, then I can use a more efficient method for finding the root, hence the difference between the different cases.

Again I don't mind it. But what method do you want to use to achieve that? I would also consider practical benefits: defining a large enough interval is not worse in my opinion, and then you can use a very reliable root-finding method with a bracket.

@nmayorov

Again I don't mind it. But what method do you want to use to achieve that? I would also consider practical benefits: defining a large enough interval is not worse in my opinion, and then you can use a very reliable root-finding method with a bracket.

Well, I do not see the infinite interval as such a problem. Remember we are in a one dimensional case where our function f(x) by definition has to be monotonic. In this case, any gradient descent algorithm minimizing g(x)=(f(x) -a)**2 will be extremely reliable, as g(x) is continuous can only have one local minimum. The only thing needed is a random starting point, and follow the gradients until the minimum is eventually reached, and this will always happen.

I totally don't mind having open intervals support. But the interesting thing is that established methods (I'm aware of) work only with closed intervals, take root-finding methods or L-BFLGS-B.

Well the reason this methods only work with closed intervals, I guess is because their strategy is to surround the roots. But the reason this algorithms they do it like this is because they are intended to be useful for all kind of functions, with multiple roots, not only for monotonic non-divergent functions, which may only have one root.

As for the example with log --- you just have to define it in the interval [eps, A]. Is it that bad in practical terms?

The problem is deciding on a particular epsilon. Let say we pick eps=0.0000001, which seems quite small. Now, if we try to use this to find the root of log(x)=-20. You will never find it. I agree that if you chose eps to be equal to the numerical precision of the floating point numbers, then it is the same. However in that case:

The user has to be aware of this. Remember is the user of the function deciding of log, so he would have to be the one to realize that the equivalent to having at open interval starting at 0, is having a close interval starting at eps, where eps is the precision of floats.
I just do not see the downside of solving the equation for the open interval, the user just tells that the function is not defined at 0, and we just make sure that log(0) is never evaluated.

I believe there is a good reason for it, seems like it is fundamentally difficult to implement a robust numerical method which works with open intervals. Another simpler thing is floating point precision, if you are interested in a specific real value it is not guaranteed you can express it as a double precision number. So often times you can't specify exactly the interval, which vanishes distinction between open and closed intervals.

Again, this is true in the general case. But working with an open interval with this kind of functions is easy as starting at the middle of the interval, do gradient descent from there, making sure that f(x_min) and f(x_max) is never calculated in the process. But this is reasonable: f(x_min) or f(x_max) are not well defined, then the root cannot be at those points, so either it is somewhere in the interval, or there is no root. But the only option for the root not to exist is if f(x_min) or/and f(x_max) are defined, and in that case we could have checked before hand if the root was going to be in the interval or not by evaluating the values.

just as background info, I didn't go through all the details:
scipy.stats.distribution use a rootsolver with expanding bounds for something similar (inverting the cdf to get the ppf) (I'm using a similar expanding rootsolver to the one in scipy.stats in statsmodels for power calculation.)

@josef-pkt Thank you so much for pointing me to this. cdf's are a very good example of this, and the problem I am trying to solve here is very very similar to that! I will make sure I go through that code to pick up ideas.

Well, I do not see the infinite interval as such a problem. Remember we are in a one dimensional case where our function f(x) by definition has to be monotonic. In this case, any gradient descent algorithm minimizing g(x)=(f(x) -a)**2 will be extremely reliable, as g(x) is continuous can only have one local minimum. The only thing needed is a random starting point, and follow the gradients until the minimum is eventually reached, and this will always happen.

I didn't mention it before, but an optimization problem is not well posed in an open interval. I probably should have started with it. What is the minimum of sin(x) ** 2 over x in (0, 1)? At which point it is attained? The situation is similar of minimizing an unbounded function --- you never reach a minimum.
So what I'm saying is that you can't invent a method which minimizes a function over an open finite interval as it is not correctly formulated problem and no one ever solved it. The current implementation is certainly not satisfactory from both theoretical and practical points of view.

Well, I do not see the infinite interval as such a problem.

I agree that you can find a root over an infinite interval. But I would still consider working with a finite interval for three reasons:

I believe using brentq (or similar) is always the way to go for 1-d root finding. No reason to use anything else as this is such an established and robust method.
For floating point numbers, an infinite interval is again an illusion. One possible way is to replace infinities by min and max values for the data type used. But I don't like it very much, I think just asking for explicit limits from a user is a more natural and practical approach.
Not clear how to handle intervals bounded at one end.

If you still want to support an infinite interval, then I suggest to choose between brentq and newton solvers, depending on the case. Still don't know how to handle 3.

I didn't mention it before, but an optimization problem is not well posed in an open interval. I probably should have started with it. What is the minimum of sin(x) ** 2 over x in (0, 1)? At which point it is attained? The situation is similar of minimizing an unbounded function --- you never reach a minimum.

Ok, I think I now understand the confusion, and it was probably that I forgot to mention an important detail. The open intervals are there to mainly be used when the function diverges at the end of the interval. In this case sin(x) ** 2, there are two options:
1 - That the user defines boundaries to be [0, pi/2] (To pick a monotonic interval), the function is non divergent, in the whole interval, so there is no problem.
2 - That the user insists in defining the interval to be (0, pi/2). However, of course, the user in that case should not ask for the inverse of 0, because y in 0=sin(y) ** 2 it is not in the interval. So, I could easily check that f(0), and f(pi/2), not diverge, and that the values are 0 and 1 (as you suggested in your first post) And tell the user directly that that inverse is not in the interval. Now, if the user ask for the inverse of eps, I have to solve the minimization problem (sin(x) ** 2 - eps)**2=0, and this, I can solve without even approximating sin (0) **2, just approaching the minimum from the upper side, and making sure, in the gradient descent process I never overshoot too much to go past 0.
I think the main difference here, is that I am not exactly "finding" roots. Because of the functions that I accept, I know before hand if there is a root or not. And then for the cases when there is a root, I know that there is only one root. Furthermore my optimization problem is always convex, and for the valid cases it always reaches the minimum before hitting the edges, regardless, so in that sense it does not matter if the interval is closed or open.
The reason for asking whether it is open or not, is to make sure that the user can specify the interval in which the two conditions (being monotonic, and non-divergent) are satisfied. And this is necessary.
Imaging the following function:
y=mod(x,10)
That function meets the conditions in the interval [0,10), but not in the interval [0,10], so we need to have a way for the user to tell us about this.
But then the minimization function can be simple, we just need to make sure that the algorithm never converges to a point x>=10, or x<0. So we just need to optimize a cost function that diverges for any x meeting those conditions, and make sure our minimizer starts somewhere inside the interval. And this works!
I am not sure if you have tried running my code, I bet it still has a lot of bugs, and missing checks, but maybe you could help me find a function satisfying the conditions in any of the supported intervals that my function cannot inverse approximately. I think I need to see the problem to believe it hehehe.

Numerically inverting a given function can be a topic of a very nice blog post or a tutorial-type notebook (consider Scipy Cookbook?). As a library function though, I'm -1 on adding it.
For an arbitrary black-box callable, you simply cannot numerically define if it's monotonic or not. (This is different in scipy stats, what Josef mentioned, because in that application you can assume that a cdf is non-decreasing.)
Implementation-wise, root-finding is almost always suboptimal as well: if the function is simple and known analytically, it's best to try paper and pencil; otherwise consider tabulating it and doing inverse interpolation. Devil will be in the specific details of the function and different approaches would be needed depending on the balance accuracy and efficiency.
The cookbook type entry could discuss this, and also could mention using something like PPoly.solve method which was added specifically with this sort of use case in mind (cf some discussion in https://github.com/scipy/scipy/pull/3260)

I think you are going the wrong way. If you want to support open intervals by all costs, then I suggest going to a close interval by stepping to np.nextafter. But I consider this to be of a marginal value or even undesirable (finite precision of floats, overflows near mathematical infinity).
As for your optimization method. If we follow such logic that we can just define a new function which is infinite outside of a feasible region, then we presumably solved all inequality constrained problems in multi-dimensional space as well (using, say, BFGS). Because: the function is big where we don't want to be and that's job done then. Can it really be true though? It can work somehow in 1-d, but it was never considered in a theory behind any method I believe. What will happen if we have x in [a, b] and want to invert f(a), will it always converge to a quickly and accurately enough?

@ev-br

For an arbitrary black-box callable, you simply cannot numerically define if it's monotonic or not. (This is different in scipy stats, what Josef mentioned, because in that application you can assume that a cdf is non-decreasing.)

For sure, this is why this is a condition on the input, and whoever uses it should not that the input function must not meet this.

Implementation-wise, root-finding is almost always suboptimal as well: if the function is simple and known analytically, it's best to try paper and pencil; otherwise consider tabulating it and doing inverse interpolation.

Of course, I agree that nothing better than having the analytic inverse function, but this would be useful for cases where another function that takes a callable of thse characteristics needs to know the inverse. Examples of this are:

The cdf ppf mentioned above.
Colormap normalization as mentioned on my second post.
And this are only the examples that crossed my path in the past 4 days. In general, it can be very useful to have something that can calculate the inverse.

Devil will be in the specific details of the function and different approaches would be needed depending on the balance accuracy and efficiency.

I agree, but so far I have not found a function of the right characteristics that my current implementation cannot deal with, so I do not understand why there is so much scepticism. My implementation is there, for you to test! So for for a function as extreme as the log10, it can inverse up to invlog(-10.)=9.786080337061437e-11. Of course the precision is not great in this case, but this is only because of the tolerance (a small change in that -10, makes a huge change in the value).
We do not have to promise that it fast, we do not have to promise that is always accurate, we only have to promise that it will try! And as a general function, I think it does quite well. so please, give it a try, and convince me that it does not work :).

@nmayorov

I think you are going the wrong way. If you want to support open intervals by all costs, then I suggest going to a close interval by stepping to np.nextafter. But I consider this to be of a marginal value or even undesirable (finite precision of floats, overflows near mathematical infinity).

I will look into that.

As for your optimization method. If we follow such logic that we can just define a new function which is infinite outside of a feasible region, then we presumably solved all inequality constrained problems in multi-dimensional space as well (using, say, BFGS). Because: the function is big where we don't want to be and that's job done then. Can it really be true though? It can work somehow in 1-d, but it was never considered in a theory behind any method I believe.
Well, if it is a convex function in all dimensions, like in this case, then it will also work, of course.

What will happen if we have x in [a, b] and want to invert f(a), will it always converge to a quickly and accurately enough?
In that case, then you can just check that the limits are not the solution first manually, only in the close ends of the interval. Thank you for the idea!

In my current implementation, this is what happens:
>>> cos = (lambda x: np.cos(x))
>>> invcos = scipy.misc.inversefunc(cos, domain=[0, np.pi])
>>> invcos([1, 0, -1]) # Should give [0, pi / 2, pi]
array([  5.44203736e-09,   1.57079632e+00,   3.14159265e+00])

Essentially you get a really really small number, instead of 0, which for a numerical method is equal to 0 to 8 digits.

And as a general function, I think it does quite well. so please, give it a try, and convince me that it does not work :).

Sorry, no, this is not how it works :-).
It's trivial to construct a function which is not monotonic but your criterion, checking two points, fails to detect that. If you make a different criterion, fine, there will be a counterexample too. Therefore I believe that the whole approach is flawed to an extent where we should not add such a general purpose public function to scipy.
Of course, the decision is not mine alone. If you can convince other core devs, in this PR or the scipy-dev mailing list, great.

In general, it can be very useful to have something that can calculate the inverse.

My point is that this something is problem-dependent to a degree where the choice of algorithm should be up to a user.
On the other hand, I urge you to consider writing a blog post or a cookbook recipe. I can definitely use one (with proper attribution of course) in my numerical methods class :-).

It's trivial to construct a function which is not monotonic but your criterion, checking two points, fails to detect that. If you make a different criterion, fine, there will be a counterexample too. Therefore I believe that the whole approach is flawed to an extent where we should not add such a general purpose public function to scipy.

I am not trying to detect if the function is monotonic or not, because this is numerically impossible. I am assuming it is monotonic, and under that assumption, determining if it is increasingly or decreasingly monotonic. And this is the responsibility of the user, they do not set a callable that meets the requirements, then they cannot expect to get the right results. Using the same criteria, no functions taking callable, would exist, and in a callable, a user always can do something to cause an error.
Let me take it to the extreme:
>>>import scipy.optimize
>>>scipy.optimize.newton(lambda x:"This is a really nasty lambda function",5)
5.000299999999999

The function is clearly not doing what it is supposed to do, neither through an exception, or even failing. But of course, we are not surprised of that, if we did not provided a callable according to the documentation of the method...

I think the use case is important, and it would be good if scipy covered this in a relatively robust way.
e.g. power calculations where we invert a function of several argument for one of them given the others, for example calculate sample size float in (0. inf), or power in [0, 1] (or open interval (0, 1)) or effect size.
The problem as in cdf-ppf is that in many cases we stay in a nice range where rootfinding can work fast, but we cannot rule out, and often need it, that we have to go arbitrarily close to the open boundaries, e.g. inf or 0,1 when the function might not be well defined (or be inf) at the boundary.
my version was written around scipy 0.12
https://github.com/statsmodels/statsmodels/blob/master/statsmodels/tools/rootfinding.py#L20
I needed to add several layers, that only worked for some scipy versions, to get something that is reasonably robust. (I think there is still a unit test for scipy <=0.12, although our min scipy version will be higher :)
I wouldn't mind using just the rootfinders in optimize and write a simple wrapper function, but based on the ppf-cdf and my power case, scipy.optimize didn't handle this case by itself.
Assuming monotonicity is appropriate IMO, but strict monotonicity or differentiability might not always hold and it would be good to be robust to those if possible.
(I'm currently worrying about other things, so I'm not really interested in looking at algorithmic details again, but the demand is there from my perspective.)

@josef-pkt
Love to hear some optimism in the PR :)

The problem as in cdf-ppf is that in many cases we stay in a nice range where rootfinding can work fast, but we cannot rule out, and often need it, that we have to go arbitrarily close to the open boundaries, e.g. inf or 0,1 when the function might not be well defined (or be inf) at the boundary.

I just added some plots, with some trivial and not so trivial inverse calculations, all that generates essentially instantaneously. In even more extreme cases, I guess it may take longer, or not converge, but, I guess that is a risk we should take, worst case scenario the reliability of the solutions can be checked.

but strict monotonicity or differentiability might not always.

This has no problems dealing non differentiability, look at the piece wise example.
By strict monotonicity, I mean that it does not stays constant in a value, such as
f(x){ x+1 for x <1; 0 for -1<=x<=1; x-1 for x>1}
In cases like this the problem is not that I cannot calculate the inverse, the problem is that the inverse does not exist in the 0, 1 interval, so asking for strict monotonicity and continuity is not that far fetched really.

For considering whether it is appropriate to include it, I think it would be important that the algorithm is better than what you would code up ad-hoc for a given problem. As noted above, inverse interpolation can also be a good algorithm choice in many cases, and perhaps there is a method that combines both. I would recommend taking a look at the literature first --- of course this may be too "trivial" problem so that possibly not so much is explicitly written about it.

@pv

For considering whether it is appropriate to include it, I think it would be important that the algorithm is better than what you would code up ad-hoc for a given problem.
Actually, my idea was to include the method more as a very user-friendly wrapper that uses the existing tools in scipy to solve a particular problem, than a new numerical method, because it is not really a new method, it just uses the existing methods in the right way to find roots for monotonic functions in infinite or finite intervals. This is partly why I included it in misc, instead of optimize or other branch. Maybe misc is not the right place for this, would you have any other suggestion?

As noted above, inverse interpolation can also be a good algorithm choice in many cases, and perhaps there is a method that combines both.
Inverse interpolation works pretty well, yes, although, again the downside is how to set the initial and final values, if the function is defined in all real numbers, and a good step size, for functions that are nonlinear. So even a method like this would have to be implemented iteratively, and in the end the caveats are pretty much the same. But yes, I think maybe it can benefit from using both approaches in some hybrid way. But before I invest time exploring this, I need to see if people like the idea, because so far it is actually working pretty well, and still, I am struggling to get people to like it...

Can you point to some references on the algorithms / numerical approach that you are implementing?
It seems to me that it's not a problem that has a classic and well-accepted numerical solution in the applied maths literature. Hence, IMHO, it shouldn't be in scipy, which is a repository of universally accepted numerical tools.

@GaelVaroquaux
It uses the Brent algorithm for minimisation from scipy, using brackets, so it can start finding the solution in a given interval, but go outside the interval if necessary. As I said in the description, and in the summary of the discussion at the end of the description, I am not claiming to have implemented a new method, but to have made a wrapper for existing methods in scipy.

You're using a minimizer. This is an estimation problem. Estimation
problems are not trivial, nor are function approximation. There would be
many ways of doing this. Also, I suspect that there would be many ways
that the approach could fail. As someone whose job it is to think about
these problems (ie a applied math researcher), I wouldn't like to go down
a direction unless there is some literature on it. I wouldn't trust the
approach.

But I am not really asking anyone to trust my approach. All my function
does is to iteratively use the brent method to minimize the function
(f(x)-b)**2, where b is the value that should be inverted, and x may be
constraint to a given interval. Of course there may be ways that this
can go wrong, specially if f does not behave as it should, but the
limitations of the approach are exactly the limitations of the
minimize_scalar function with the brent method implementation. So the
literature that would apply is exactly the same literature as for the
brent method.
I think as long as the description of the function is clear about how in
particular is going to try to estimate the inverse (maybe I should have
been more explicit about this), trust should not be a problem.
On 27/10/2016 16:50, Gael Varoquaux wrote:

You're using a minimizer. This is an estimation problem. Estimation
problems are not trivial, nor are function approximation. There would be
many ways of doing this. Also, I suspect that there would be many ways
that the approach could fail. As someone whose job it is to think about
these problems (ie a applied math researcher), I wouldn't like to go down
a direction unless there is some literature on it. I wouldn't trust the
approach.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/scipy/scipy/pull/6725#issuecomment-256685230, or
mute the thread
https://github.com/notifications/unsubscribe-auth/AMEDJW5ZNC0RVn6qpbAbllejVPVYHDZTks5q4Mg9gaJpZM4KghI3.

--
Alvaro Sanchez-Gonzalez
+44 (0)<PHONE_NUMBER>
<EMAIL_ADDRESS>-<EMAIL_ADDRESS>Quantum Optics and Laser Science (QOLS) Group
606 Blackett Laboratory
Imperial College London
South Kensington Campus
London, SW7 2AZ

But I am not really asking anyone to trust my approach.

@alvarosg as SciPy developers we are - SciPy is not really the place for experimentation or even brand new published algorithms. Instead, we want functionality that has broad applicability and is based on existing literature.
I recommend you follow the suggestions given above and look at the literature for this problem. We really cannot include this as something that may work, and if it doesn't then the user should have read the disclaimers in the docstring.

To me this still sounds like something closer to curvefit, a convenient wrapper for a common usecase and not a new fancy rootfinding or optimization procedure. In simple cases with known bounds we can just use brentq, but as illustrated before I don't see any "obvious" solution within scipy for the open domain case.
IMO, the discussion should be more about whether and what kind of wrapper convenience functions scipy wants to provide, then a discussion about fundamental optimization or rootfinding algorithms.
As a user I wouldn't care much about what's inside, as long as it solves the usecase. The advantage of having a function in scipy (instead of special written code as in scipy.stats or statsmodels or matplotlib) is that we get general user feedback to catch difficult or corner cases that could point out further improvements.

@rgommers
I was drafting a response, but I was essentially writing what @josef-pkt just wrote. Everything is about whether people are interested on having a wrapper for this. I honestly think there is a usecase for this, but of course I do not have the experience any of you have to get a feeling on whether this should be a part of scipy or not. If the answer to that is no, then I am happy with it, I will just find another way to make it publicly available :)

EDIT: While decision is being taken I have uploaded the current implementation as a standalone PyPI package.

Good idea. I noticed that you left one mention of scipy.misc.inversefunc in the README, may want to fix that.

Maybe misc is not the right place for this, would you have any other suggestion?

scipy.misc isn't really the right place for anything; we would like to get rid of it in the future. The module that would be the closest fit is optimize.
Even considering this a "wrapper convenience function" instead of an algorithm/method, I'm not convinced this is good to have in scipy. What will we do with the corner cases that people will encounter? Some may be fixable, some not - and since there's no literature we're working off of here, it's going to require time investment from maintainers to investigate and make decisions on those cases.

I noticed that you left one mention of scipy.misc.inversefunc in the README, may want to fix that.

Oh, thank you for pointing it out :) It should be solved in the next release.

Even considering this a "wrapper convenience function" instead of an algorithm/method, I'm not convinced this is good to have in scipy. What will we do with the corner cases that people will encounter? Some may be fixable, some not - and since there's no literature we're working off of here, it's going to require time investment from maintainers to investigate and make decisions on those cases.

Yes, I guess some corner cases, like the already mentioned inverting the log10 below -10, may create conflicts non-trivial to solve. On the other hand we have to remember that this solves a problem for which there is not current robust implementation, so it really offers a brand new functionality, not available in any other library. We could make very clear in the description that it is not guaranteed to work in extreme cases, but that considering there are not other tools doing the same, it may still prove useful.
I guess it is kind of a vicious circle, because surely, there will be corner cases that may cause troubles, on the other hand, we will never find the corner cases to make it better, unless we get feedback from people using it. And honestly, my standalone package in pypi will have not even close as much exposure as this could have.
I understand your views though, I guess what we would need here is something like a submodule for new beta features, where people could access new functionality, but that is not guaranteed to be kept the same, or even kept at all in newer versions if it does not work out.

I understand your views though, I guess what we would need here is something like a submodule for new beta features, where people could access new functionality, but that is not guaranteed to be kept the same, or even kept at all in newer versions if it does not work out.

We used to have something like that (sandbox). statsmodels still has one. Such things tend to turn into ghettos.

Yes, I guess some corner cases, like the already mentioned inverting the log10 below -10, may create conflicts non-trivial to solve. On the other hand we have to remember that this solves a problem for which there is not current robust implementation, so it really offers a brand new functionality, not available in any other library. We could make very clear in the description that it is not guaranteed to work in extreme cases, but that considering there are not other tools doing the same, it may still prove useful.

There's something to say for this, but I'm very hesitant - I have this feeling it's going to require more work than is justified.
Other opinions?

There's something to say for this, but I'm very hesitant - I have this feeling
it's going to require more work than is justified.

Other opinions?

I have the same feeling.

The discussion seems to have converged to having this as a standalone library on PyPI. If someone has a strong opinion either way, please speak up. Otherwise, I'm going to close this as a wontfix in a couple of days.
@alvarosg if/when your PyPI package matures and proves widely used, we'll be able to reconsider this.

@ev-br I think that is a good plan :)

OK, a couple of days turned into three weeks. Closing. Thanks @alvarosg, thanks to all reviewers.


Constant variable substitution, loop unroll pass + dpor code cleanup

The somewhat messy code used for the TSE article is cleaned up and contributed in this pull request.

Also, feel free to merge the PR without waiting for all the tests - this PR does not target master, so we can merge it and fix it in #198.


Fix/coverage twice

trying out pr comments for testing

Codecov Report

Merging #7 (14b8216) into main (552fbc0) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
- Coverage   97.30%   97.27%   -0.03%
==========================================
  Files          58       56       -2
  Lines        1111     1099      -12
  Branches       11       19       +8
==========================================
- Hits         1081     1069      -12
  Misses         30       30

Flag
Coverage Δ

spark-2.4.x
93.43% <100.00%> (+0.01%)
:arrow_up:

spark-3.0.x
96.60% <100.00%> (+0.01%)
:arrow_up:

spark-3.1.x
97.41% <100.00%> (+<0.01%)
:arrow_up:

spark-3.2.x
?

spark-3.3.x
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...ore/src/main/scala/doric/syntax/ArrayColumns.scala
100.00% <100.00%> (ø)

..._3.2_3.3/scala/doric/syntax/NumericColumns32.scala

...k_3.2_3.3/scala/doric/syntax/BinaryColumns32.scala

Continue to review full report at Codecov.

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


support delayed scaling of weight in float8 all-gather

Stack from ghstack (oldest at bottom):

-> #312
#311
#310
#309

Summary:
Adds support for delayed scaling in FSDP2 float8 all-gather. In detail:

add WeightWithDelayedFloat8CastTensor, note that we don't reuse
code with the dynamic version because I'd rather not deal with
plumbing optional tensors through dynamo. We can try that in a
separate PR later.
wire Float8Linear to use (1)
add weight amax syncing back, since we need it for float8 all-gather
add test coverage for eager mode numerics

Next up (in separate PRs) will be training run validation for numerics, and
taking a look at performance.
Test Plan:
./test/test_everything.sh

Reviewers:
Subscribers:
Tasks:
Tags:

I'd rather not deal with
plumbing optional tensors through dynamo

what are the optional tensors ?

should we merge WeightWithDelayedFloat8CastTensor and WeightWithDynamicFloat8CastTensor into one class and add if-else to unify logic around torch_dispatch, fsdp_pre_all_gather/fsdp_post_all_gather. we unifed Float8Linear already

I'm open if someone is interested in doing that in a follow-up PR.  I'm not sure it will be better than what we have now though.  Note that Float8Linear was unified to allow for finer grained configuration of scaling (per-tensor instead of per-module), that benefit is not on the table here.

compare perfs between sync_float8_amax_and_scale_history and precompute_float8_dynamic_scale_for_fsdp. If they are similar, people would not need to worry about numeric problem from delayed scaling

yes, that would be great!  I think we can do this in follow-up PRs.  Note that delayed scaling is theoretically faster than dynamic scaling (less memory reads), but performance is not optimized across the stack yet.  I think it's good to have options and allow people to optimize different settings in parallel.  Eventually if there is clear data that only one of these is needed, we can delete the not-needed ones.

@vkuzo has imported this pull request.  If you are a Meta employee, you can view this diff on Phabricator.


Generic object API and type conversion problems

Here as scenario that we encountered in a real app:

Given: a model that has an entity with Float attribute
When the entity is updated via LinkRest, a value like 0.1234567 is parsed as Double.
Since LR (BaseCayenneUpdateStage) writes values to objects using DataObject.writeProperty(..), no type checking is performed. So the value is set, update is committed and the object (or rather its snapshot) ends up in a shared cache, with Double value
Some other ObjectContext fetches the object using Cayenne.objectForPK. The object is created, but when the property in question is accessed, a ClassCastException is thrown.

So looks like we need more strict type checking / conversion when loading updates.

Seems like we need a FloatConverter in com.nhl.link.rest.runtime.parser.converter.DefaultJsonValueConverterFactory

Ah cool. So we already got the needed extension point.

Committed the fix, please check it out


Update issue templates

Proposed Changes
Fixes issue template multiple-choice problems.
Pull Request Checklist
Please check if your PR fulfills the following requirements:

[x] I have read the CONTRIBUTING guidelines
[x] My commits follow the appropriate guidance
[x] I certify that I have the appropriate permissions to add these changes to the repository
[x] An issue is open for the changes proposed
[ ] I have added/updated tests for new code changes (if applicable)
[ ] Documentation has been added/updated (if applicable)
[x] I built (npm run build) locally and pushed all changes

Issues Addressed: #16
Other Information
None.

:tada: This PR is included in version 1.0.5 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Fix lvalue literals support

Precisely what the title says. Hopefully once and for all.

Type decay is always tricy.


Using Angularjs.

Is there any tutorial/way to build the same app using Angularjs?

https://github.com/googlearchive/appengine-angular-guestbook-java
On Fri, Jan 8, 2016 at 12:11 AM, vivek poddar<EMAIL_ADDRESS>wrote:

Is there any tutorial/way to build the same app using Angularjs?
—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/appengine-guestbook-java/issues/16
.

Thanks,
But the given link seems too old, also I think its some other framework. I was thinking if some simple solution exists for servlets on AppEngine.

The point of this sample it to show the same app code that worked in 2010 on java6 App Engine Beta still works with App Engine Java 8, Java 11 and Java 17... PAAS forever.


Panic when I press any key on the app

When the app is on the front, and I press any key on the keyboard, the app crash with the following message:
Exception 0xc0000005 0x0 0x0 0x7ffee8910377
PC=0x7ffee8910377
signal arrived during external code execution

github.com/go-flutter-desktop/go-flutter/embedder._Cfunc_FlutterEngineSendPlatformMessage(0x61f5860, 0xc00006c7e0, 0xc000000000)
        _cgo_gotypes.go:306 +0x54
github.com/go-flutter-desktop/go-flutter/embedder.(*FlutterEngine).SendPlatformMessage.func2(0xc0000a4380, 0xc00006c7e0, 0x2cc7ad0)
        C:/Users/htyle/.gopath/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.24.1/embedder/embedder.go:265 +0xe1
github.com/go-flutter-desktop/go-flutter/embedder.(*FlutterEngine).SendPlatformMessage(0xc0000a4380, 0xc00007d900, 0x598400)
        C:/Users/htyle/.gopath/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.24.1/embedder/embedder.go:265 +0xde
github.com/go-flutter-desktop/go-flutter.(*messenger).Send(0xc00006c420, 0x5abecc, 0x10, 0xc00003e4e0, 0x5d, 0x60, 0x0, 0x0, 0xc00007da88, 0xc000092230, ...)
        C:/Users/htyle/.gopath/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.24.1/messenger.go:41 +0x99
github.com/go-flutter-desktop/go-flutter/plugin.(*BasicMessageChannel).Send(0xc000050280, 0x598400, 0xc000092230, 0xc000092230, 0x61f5860, 0xc00007da48, 0x4e9b0d)
        C:/Users/htyle/.gopath/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.24.1/plugin/basic-message-channel.go:65 +0x8e
github.com/go-flutter-desktop/go-flutter.(*keyeventPlugin).sendKeyEvent(0x6ce0a0, 0xc00009c100, 0x41, 0x1e, 0x1, 0x0)
        C:/Users/htyle/.gopath/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.24.1/key-events.go:84 +0x180
github.com/go-flutter-desktop/go-flutter.(*Application).Run.func8(0xc00009c100, 0x41, 0x1e, 0x1, 0x0)
        C:/Users/htyle/.gopath/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.24.1/application.go:216 +0xac
github.com/go-gl/glfw/v3.2/glfw.goKeyCB(0x2ccea80, 0x1e00000041, 0x1)
        C:/Users/htyle/.gopath/pkg/mod/github.com/go-gl/glfw@v0.0.0-20190519095719-e6da0acd62b1/v3.2/glfw/input.go:289 +0x80
github.com/go-gl/glfw/v3.2/glfw._cgoexpwrap_173d98a40ae9_goKeyCB(0x2ccea80, 0x1e00000041, 0x1)
        _cgo_gotypes.go:2106 +0x52
github.com/go-gl/glfw/v3.2/glfw._Cfunc_glfwWaitEventsTimeout(0x3f90624dd2f1a9fc)
        _cgo_gotypes.go:1984 +0x48
github.com/go-gl/glfw/v3.2/glfw.WaitEventsTimeout(0x3f90624dd2f1a9fc)
        C:/Users/htyle/.gopath/pkg/mod/github.com/go-gl/glfw@v0.0.0-20190519095719-e6da0acd62b1/v3.2/glfw/window.go:823 +0x34
github.com/go-flutter-desktop/go-flutter.(*Application).Run(0xc00004c270, 0x0, 0x0)
        C:/Users/htyle/.gopath/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.24.1/application.go:229 +0xa21
github.com/go-flutter-desktop/go-flutter.Run(0xc00004a4a0, 0x4, 0x4, 0x2, 0xc00007df78)
        C:/Users/htyle/.gopath/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.24.1/application.go:23 +0x54
main.main()
        C:/Home/Code/caisilu/desktop/cmd/main.go:24 +0x190
rax     0x0
rbx     0xc00007d858
rcx     0x61f5860
rdi     0xc00007e000
rsi     0xc00006c7e0
rbp     0xc3f4b0
rsp     0xc3f460
r8      0xc000028000
r9      0x0
r10     0x2030000
r11     0x2
r12     0xc000040830
r13     0x573480
r14     0x5d2fef
r15     0x61f5860
rip     0x7ffee8910377
rflags  0x10246
cs      0x33
fs      0x53
gs      0x2b
Lost connection to device.

C:\Home\Code\caisilu>flutter doctor -v
[√] Flutter (Channel dev, v1.8.1, on Microsoft Windows [Version 10.0.18362.175], locale zh-CN)
    • Flutter version 1.8.1 at C:\Home\Software\develop\Android\flutter
    • Framework revision d3eee57c0b (4 days ago), 2019-07-08 11:04:24 -0700
    • Engine revision 3c51a7bfff
    • Dart version 2.5.0 (build 2.5.0-dev.0.0 b5aeaa6796)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at C:\Home\Software\develop\Android
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • ANDROID_HOME = C:\Home\Software\develop\Android
    • ANDROID_SDK_ROOT = C:\Home\Software\develop\Android\sdk
    • Java binary at: C:\Home\Software\develop\Android\openjdk\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

The app works fine, but today I create a new app with --androidx support, and copy files to the new app, the crash appears.

Flutter 1.8.2-pre.33 • channel master • http://github.com/flutter/flutter
Framework • revision e3ee5c6bbb (22 hours ago) • 2019-07-13 16:02:09 -0700
Engine • revision 919e353236
Tools • Dart 2.5.0 (build 2.5.0-dev.1.0 24725a8559)

I created a new app with flutter create -a kotlin -i swift --androidx my_awesome_app. Pressing any key  in the app didn't result in any crash. Could not replicate the issue.
Does this errors occurs AFTER you copied the files?
If so, can you please start a fresh new flutter project an run:
hover init github.com/my-organization/simpleApplication
hover run
and tell us if the errors is due to the copy or not?

go-flutter should stay compatible with the beta channel of flutter. From my testing, Flutter 1.8.2-pre.33 • channel master works.
That been said, does the errors occurs on the beta channel? (flutter channel beta), if not, it's a non bug!

This was a bug in the engine that was in Flutter for a few days; see https://github.com/flutter/engine/pull/9698. You'll need to use a slightly older or slightly newer version of Flutter.

Thanks @Drakirus @stuartmorgan , channel master works


Fix handling very large meshes & plots (allow maximum available gpu buffers)

What
We already did this for textures, was overdue to do it for buffers as well.

fixes #3928
fixes #5051

Checklist

[x] I have read and agree to Contributor Guide and the Code of Conduct
[x] I've included a screenshot or gif (if applicable)
[x] I have tested the web demo (if applicable):

Using newly built examples: app.rerun.io
Using examples from latest main build: app.rerun.io
Using full set of examples from nightly build: app.rerun.io

[x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

PR Build Summary
Docs preview
Examples preview
Recent benchmark results
Wasm size tracking

@nikolausWest confirmed as well


Require Cropper library in componentDidMount method

When build react-cropper for server bundle by webpack, I've got:
ReferenceError: window is not defined
    at Object.defineProperty.value (*/node_modules/cropperjs/dist/cropper.js:1219:18)

I propose this refactoring according sokra (creator of webpack) comment:
https://github.com/webpack/react-starter/issues/37#issuecomment-93943419

Sorry for the late reply.
I prefer this solution
https://github.com/webpack/react-starter/issues/37#issuecomment-104304128
Does this one works for you ?

Yes, it does. I write the following code:
const Cropper = __CLIENT__ ? require('react-cropper').default : undefined;


feat(linter) : add gosec and suprising the issues

Closes: #2222

For this one, shows that we should be suppressing the warnings. I am not sure if this one is or not valid. However, I think we should keep and let's see how it will behave.

Isn't this superseded by https://github.com/operator-framework/operator-sdk/pull/2254 ?

Hi @JAORMX

Isn't this superseded by #2254 ?

No. In the  #2254, we are adding a dev target which will call all checks and show all errors. This one is for we allow/enable this check in the lint called in the CI and fix its specific issues.

The initial commit message and the title of the PR has a typo: suprising should be suppressing

Is there a way to configure gosec from golangci-lint? Maybe a good compromise would be to either skip some checks or to change the severity of the checks that gosec does. Perhaps we could start with confidene: high and severity: high so this lint addition wouldn't be too intrusive? I personally think introducing security static analysis is a great addition.

Honestly I wouldn't merge this PR at all. I would not enable gosec as part of the linter. So far this hasn't found any real problem and just caused us to change code that didn't really needed to be changed. We had to add a comment to suppress the check. I would definitely make this optional instead.

Honestly I wouldn't merge this PR at all. I would not enable gosec as part of the linter. So far this hasn't found any real problem and just caused us to change code that didn't really needed to be changed. We had to add a comment to suppress the check. I would definitely make this optional instead.

The fact that it hasn't found any real problem is not necessarily a bad thing (props to you folks for not writing insecure go code :smile: ) . I would argue that this is still a valuable addition, but it would be better to do more "confident" checks and only check for high severity security issues. That way there would be less code pollution and more relevant feedback.

Honestly I wouldn't merge this PR at all. I would not enable gosec as part of the linter. So far this hasn't found any real problem and just caused us to change code that didn't really needed to be changed. We had to add a comment to suppress the check. I would definitely make this optional instead.

The fact that it hasn't found any real problem is not necessarily a bad thing (props to you folks for not writing insecure go code smile ) . I would argue that this is still a valuable addition, but it would be better to do more "confident" checks and only check for high severity security issues. That way there would be less code pollution and more relevant feedback.

That's why I was suggesting we make gosec optional for now or make it a separate target to run separately maybe every sprint and review to see if we have anything to fix.
Sounds like 2 options:

disable all together
make it an optional target to run every sprint
make it required but tune it for high confidence

Well, we could discuss this at the next community meeting.

/hold

I closing this one as decided not to move forward.
The suggestion to keep it optional to be checked in the dev env is  addressed here; https://github.com/operator-framework/operator-sdk/pull/2254/files#diff-b2eba01dfbe43c2ba55e3d7ac9f054d4R13


Proposal

I've put together a proposal to get the ball rolling on this one. Love some feedback on it.

@hassox at first glance this looks really fantastic! I'll be working through it today/tomorrow at some point. Great work!

This is really exciting stuff guys!
@hassox I saw some typos while reading through the docs, do you want them pointed out or is that annoying?

@doomspork I'd love feedback mate :) I'm sorry but typos happen to me all the time :(

Me too!  Sometimes it seems my fingers and brain experience some packet loss :stuck_out_tongue:

thanks @doomspork :) There sure were a lot of them

No worries @hassox, always glad to help.  Figure it's easy to point things out now than doing the while PR thing later :)
I'm really stoked to see this project :+1:

@hassox well done!


Add cards

Adding more cards

Common cards

Duskull
Goldeen
Hippopotas
Seviper

Uncommon cards

Abomasnow
Fletchinder
Klang

Rare Cards

Excadrill
Mantine

Epic Cards

Nothing added.

Legendary Cards

AZ

And yes, all these cards added are in alphabetical order.

Please have all card images be the size of 245 x 342. These cards were fixed in https://github.com/FakeSloth/Infinite/commit/2c3fc97242a8ec9f0c7b46ec3ee4263d2243ecac.


Release: v1.0.5

READY FOR REVIEW
Summary

Updates and bug fixes
ADAPT-3843: Package update
Upgrade Storyblok Client Package
ADAPT-4215: Port Vault variable management strategy.
ADAPT-4387: Table theming
ADAPT-4388: Update gatsby netlify plugin
ADAPT-4387: Code climate nesting fix
ADAPT-4330: Updated github actions config to use PR labels for automatic versioning.

Review By (Date)

Friday, March 11

Criticality

Medium

Review Tasks

Review code changes
Review preview site
Call out any Storyblok component changes

Front End Validation

[ ] Is the markup using the appropriate semantic tags and passes HTML validation?
[ ] Cross-browser testing has been performed?
[ ] Automated accessibility scans performed?
[ ] Manual accessibility tests performed?
[ ] Design is approved by @ user?

Backend / Functional Validation
Code

[ ] Are the naming conventions following our standards?
[ ] Does the code have sufficient inline comments?
[ ] Is there anything in this code that would be hidden or hard to discover through the UI?
[ ] Are there any code smells?
[ ] Are tests provided? eg (unit, behat, or codeception)

Code security

[ ] Are all forms properly sanitized?
[ ] Any obvious security flaws or new areas for attack?

General

[ ] Is there anything included in this PR that is not related to the problem it is trying to solve?
[ ] Is the approach to the problem appropriate?

Affected Projects or Products

Does this PR impact any particular projects, products, or modules?

Associated Issues and/or People

JIRA ticket(s)
Other PRs
Any other contextual information that might be helpful (e.g., description of a bug that this PR fixes, new functionality that it adds, etc.)
Anyone who should be notified? (@mention them here)

Resources

AMP Tool
Accessibility Manual Test Script
HTML Validator
Browserstack and link to Browserstack Credentials

@yvonnetangsu and @rebeccahongsf gentle reminder, please review this by the end of the week.