D435i Aligning IMU and RGB Frames

Required Info

Camera Model
D435i

Firmware Version
<IP_ADDRESS>

Operating System & Version
Win 10

Kernel Version (Linux Only)

Platform

SDK Version
2.17.1

Language
C++

Segment
AR

Issue Description
I'm capturing RGB and Depth frames at 30 fps using one pipe and then using a second pipe with a callback to capture accelerometer and gyro readings at 63 and 200 hz.  I'm then trying to align the IMU frame timestamps with the timestamp of the RGB frame.  However, the timestamps of the IMU readings are in the hardware clock domain and the timestamps of the RGB frames are in the system time domain.  How do I align the two using their timestamps?
Thanks.

You need to enable frame metadata to get hardware timestamp for the color stream:
Enable hardware timestamps on Windows / Enable hardware timestamp on Linux

This worked, so now both the color stream and IMU stream are in the hardware clock domain.  But there appears to be a large offset between the two timestamps even when collected concurrently.  Are they timestamped using the same clock, or how do I compare the two values?
Thanks.

@JBBee - yes, they should have the same clock.
It is reasonable for them to have some offset. You should expect the IMU data to be ~40 ms ahead of depth data. This is due to IMU having ~2ms latency, while UVC frames have roughly at least one frame of latency (and more on Windows).
If you see the situation being other way around (IMU lagging behind depth) - it is probably a rare firmware bug we are investigating right now.
To clarify, if you get motion_frame and depth_frame in the same frameset, you should expect motion_frame.timestamp < depth_frame.timestamp.

@dorodnic I'm actually collecting the IMU samples using a second pipe with a callback, and I'm getting timestamp differences between the IMU samples and the color frames such as 4.12596e+06.  Is this because they're collected on a different pipes?

Hmm... And both are hardware timestamps?
That's strange. Using two pipelines with callbacks (or one with wait for frames and one with callbacks) should not introduce any problems.
What about when starting streaming in the RealSense Viewer? You can see timestamps of each stream under (i) icon of each stream.

@dorodnic Yeah they're both hardware timestamps.  Here is a screenshot.  Thanks.

Thank you. Did you try this with later pre-release? There are some issues with 2.18 and 5.11.1 firmware, but it would be interesting to check with newer viewer. This looks like something we have encountered and already resolved (note that the FPS is also completely wrong)

The timestamps are still different with that pre-release.  Should I try downgrading the firmware?

Could you please share the exact Windows build you are using?
Downgrading firmware is probably not recommended, but we are all waiting for the new firmware to be released for several weeks now (should be published any day now) and it might help with this problem.

Ok great, I'll lookout for the new firmware.  I'm using Win 10 build 1703.

Hello @JBBee,
New firmware has been released, please see latest RealSense Camera Firmware located here:
https://downloadcenter.intel.com/download/28568/Latest-Firmware-for-Intel-RealSense-D400-Product-Family?product=128255
Windows Device Firmware Update Tool (required to upgrade firmware):
https://downloadcenter.intel.com/download/27514/Windows-Device-Firmware-Update-Tool-and-Latest-Firmware-for-Intel-RealSense-D400-Product-Family?v=t
Also please use latest LibRealSense Release:
https://github.com/IntelRealSense/librealsense
Please update ticket with your results.
Thank you!

Hi @RealSenseCustomerSupport
After following the instructions to enable frame metadata I ran it with this latest firmware release and the timestamps now match.
Thank you!


Regarding #626 - Foxtel Go and Play URL's

Ok, regarding Foxtel go and play, this is one of the URLs detected by mitmproxy, however I can't play it. I'm not sure whether this is an authentication issue or something else

I was expecting the stream to open, since I had the direct URL, also, when I tried to play it on my iPhone, I got the error message, 'The operation could not be completed'

How to reproduce the issue
Download Foxtel Go, analyse through mitmproxy and look for url's with Telstra in it's name

Platform is iOS

Will also work with Foxtel Play for Windows

OK, we're getting there. ;) For the next ticket, please put all of this in one message, not multiple ones, and give us a more descriptive title - no references to closed tickets, and a description of the issue in the title. Say, "Foxtel Go and Play URLs do not stream".
Now, the issue here is not a bug in mitmproxy. The way mitmproxy works by default is to buffer up an entire response in the proxy before relaying it downstream. This is meant to let you modify and tamper with the response. For very large responses (i.e. streaming responses), this means mitmproxy never receives the "complete" response, and nothing is ever relayed down tot he client. Please have a look at the response streaming documentation for some ideas of how to handle this in mitmproxy:
http://mitmproxy.org/doc/features/responsestreaming.html


Modify Directions for Docker to Reflect Interactivity

PR #301 changed the role of Docker in this project to an interactive shell, which slightly changes instructions. Additionally, since it's interactive I added vim to its build to allow for some lightweight editing inside the environment.

I think it makes more sense to add vim to a personal docker image built from the one here rather than add it to the base image. There are a few reasons for this:
First, the dockerfile is currently an easy way to see all of manim's dependencies, which are not clearly listed in the README. Ideally it would contain everything manim needs and nothing it doesn't, in order to eliminate ambiguity as to what is required and what isn't.
Second, the choice to add vim is a rather personal one, and it would alienate people who prefer emacs, nano, etc. Setting this precedent of adding packages for convenience could make the image prohibitively large (and it's already pretty big due to TexLive).
Third, and I realize I may be getting ahead of myself with this one, I think we should be working toward making manim behave more like a library than a bundle of scripts. Including an editor in a library is bad for modularity at best, and an admission of poor code quality at worst.
I want to be clear that I agree with the other changes, and I think adding vim makes sense for a personal image. I just don't think it should be done here. That said, the final decision isn't up to me.

I largely agree with you. However, the reason I decided to add vim into the base image instead of keeping it in just my personal image is due to the stated purpose of Docker in this project right now; it seems that Docker here is meant mostly to set up dependencies that are otherwise difficult or unclear. In other words, it's meant to help people set things up that otherwise do not have advanced knowledge of Linux, etc. I think this is evidenced by a lot of the issues with Docker posted in this repo -- a lot of them are fairly simple, but posted by people who are just learning.
As a result, it might not be a great idea to leave out a text editor, as one of the target audiences of the Docker file might expect a more ready-to-go development environment. Now I admit that for the audience of beginners, vim might not be the best editor to include, but I think at least something like nano should be included.
An alternative for this could be removing the install from the dockerfile and creating a setup script in manim/files or something to setup some popular development tools, but I'm not sure this is a great solution either.
Let me know what you think about this, because I do agree with your points, but also see a reason to include it.

I think the best solution is to update the README or a page linked from it with clearer information on how to set up and use manim. As it is, nothing about manim is ready-to-go, as is evidenced by the steady influx of issues due to neglecting to configure MEDIA_DIR, install dependencies, or use the correct version of Python. I just don't think we should address the problem by changing the one part of manim that offers any sort of guarantee about it.


implement filtering logs by start-end dates

I will try implementing filtering by:

start time via find's -mtime or -mmin
end time via debugfs stat -> crtime

Start filter implemented - https://github.com/adobdin/timmy/commit/02b0d9851a0286151fc9a4b0cfe6478119d3d2b8


Missing Date#parse

need to add require 'date' to datasift.rb
 /home/mcoyne/.rvm/gems/ruby-1.9.2-p290/gems/datasift-1.2.0/lib/DataSift/definition.rb:101:in `compile': undefined method          `parse' for Date:Class (NoMethodError)
      from /home/mcoyne/.rvm/gems/ruby-1.9.2-p290/gems/datasift-1.2.0/lib/DataSift/definition.rb:62:in `hash'
      from /home/mcoyne/.rvm/gems/ruby-1.9.2-p290/gems/datasift-1.2.0/lib/DataSift/stream_consumer.rb:61:in `initialize'
      from /home/mcoyne/.rvm/gems/ruby-1.9.2-p290/gems/datasift-1.2.0/lib/DataSift/stream_consumer_http.rb:23:in `initialize'
      from /home/mcoyne/.rvm/gems/ruby-1.9.2-p290/gems/datasift-1.2.0/lib/DataSift/stream_consumer.rb:32:in `new'
      from /home/mcoyne/.rvm/gems/ruby-1.9.2-p290/gems/datasift-1.2.0/lib/DataSift/stream_consumer.rb:32:in `factory'
      from /home/mcoyne/.rvm/gems/ruby-1.9.2-p290/gems/datasift-1.2.0/lib/DataSift/definition.rb:161:in `getConsumer'

Thanks Mikey. The datasift-1.2.1.gem has been pushed to RubyGems.


SkyWalking doesn't work properly without JavaScript enabled. Please enable it to continue

Please answer these questions before submitting your issue.

Why do you submit this issue?
[ ] Question or discussion
[x] Bug
[ ] Requirement
[ ] Feature or performance improvement

I install skywalking 8.3 es, oap.log  skywalking-oap-server.log  webapp-console.log  webapp.log are normal, server started bug when i visit http://localhost:8080 it's always tell me "We're sorry but SkyWalking doesn't work properly without JavaScript enabled. Please enable it to continue." but i check and sure i had enable Javascript.
and console have error like this
Uncaught SyntaxError: Unexpected token '<'       app.831aed75.js:1
Uncaught SyntaxError: Unexpected token '<'   app.831aed75.js:1
i guess ui load javascript error ?
hope to answer, thanks

We are setting test env on http://skywalking.apache.org/#demo. You could check there. If there is still this error, you need to check your browser settings.

i can open the  url http://skywalking.apache.org/#demo.and the  skywalking ui show correctly,so my browser setting is correct

That works then this is the code you are using. Check your local env. We are using trusted domain(apache.org), rather than <IP_ADDRESS>. Still your local env settings.

i used also https domain, but i used nginx to foward to the port，Does it matter?

the SW_OAP_ADDRESS needs http:// prefix, you may try this.

I got the same problem. I use k8s(not helm) to delpoy sw .
the ui's configmap is as follows:

and the oap-server's configmap is as follows:

and then i verify the oap-server port,it's ok:

the problem is:

the SW_OAP_ADDRESS needs http:// prefix, you may try this.

thank you ,  I have solved this problem  following your reply ，appreciate ！


[constexpr] Reenable ptrtoint/inttoptr now that we have the address representation straightened out

[constexpr] Reenable ptrtoint/inttoptr now that we have the address
representation straightened out.  This fixes the testcases I failed a few patches ago.
This also incorporates the improvements hongm suggested in the last patch.

@swift-ci please test tensorflow


How to or Where to put an API of social media in Ionic Framework

Good day to all. Badly need help here.
I just wanna ask about Ionic Framework. I want to create an android and iOS app that can manage all communication tools (e.g. Gmail, Outlook, Facebook, Twitter, LinkedIn etc.) just like this app right here https://play.google.com/store/apps/details?id=com.Creata.socialnetworkingall&hl=en but since I'm new in Ionic, I don't know where to start yet. Though I know that it needs an API but I don't know where to put the API.

Welcome to the crouton issue tracker!
#262


PeerAuthentication with port specification ignored in 1.24 ambient mode

Is this the right place to submit this?

[X] This is not a security vulnerability or a crashing bug
[X] This is not a question about how to use Istio

Bug Description
I have OpenTelemetry Operator running in sidecar mode with the following Peer Authentication set:
apiVersion: security.istio.io/v1
kind: PeerAuthentication
metadata:
  labels:
    argocd.argoproj.io/instance: apps-opentelemetry-operator
  name: opentelemetry-operator
  namespace: opentelemetry-operator-system
spec:
  portLevelMtls:
    '9443':
      mode: PERMISSIVE
  selector:
    matchLabels:
      control-plane: controller-manager

this allows workloads to hit its webhook without certificate errors.
If I switch the opentelemetry-operator-system namespace to ambient mode, I get errors like this:
ztunnel-c2kv8 istio-proxy 2024-11-13T17:36:10.380963Z   error   access  connection complete     src.addr=<IP_ADDRESS>:49872 dst.addr=<IP_ADDRESS>:9443 dst.service="opentelemetry-operator-webhook-service.opentelemetry-operator-system.svc.cluster.local" dst.workload="opentelemetry-operator-controller-manager-89f9575cd-q2nsp" dst.namespace="opentelemetry-operator-system" direction="inbound" bytes_sent=0 bytes_recv=0 duration="0ms" error="connection closed due to policy rejection: explicitly denied by: istio-system/istio_converted_static_strict"

and I have to modify the PeerAuthentication to the following to get it to work again:
apiVersion: security.istio.io/v1
kind: PeerAuthentication
metadata:
  labels:
    argocd.argoproj.io/instance: apps-opentelemetry-operator
  name: opentelemetry-operator
  namespace: opentelemetry-operator-system
spec:
  mtls:
    mode: PERMISSIVE
  selector:
    matchLabels:
      control-plane: controller-manager

I don't recall seeing this error in Istio 1.23 with ambient mode enabled.
Version
❯ istioctl version
client version: 1.24.0
control plane version: 1.24.0
data plane version: 1.24.0 (13 proxies)
❯ kubectl version
Client Version: v1.30.4
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.4-eks-a737599

Additional Information
bug-report.tar.gz

@howardjohn

cc @keithmattix

Those static policies shouldn't be attached; I'll send a Pr

Ok so for this to work, we either need to merge in the control plane or in ztunnel. The WDS implementation makes the former a bit difficult,but I don't love the idea of the data plane applying too much extra logic around the resources it receives...


FIX: AppVeyor environment.yml

Last I recall this env doesn't work on CircleCI or AppVeyor, but I want to double check.

Okay apparently AppVeyor is happy with this version, so this env works on OSX, Linux, and Windows (!). It does have the annoying ETS_TOOLKIT caveat, though.
Hopefully CircleCI builds properly, then all CIs can use it.

CircleCI had some weird errors, we can correct those later. Will merge assuming AppVeyor builds this one correctly again.

Codecov Report

Merging #4626 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4626   +/-   ##
=======================================
  Coverage   87.68%   87.68%
=======================================
  Files         351      351
  Lines       66485    66485
  Branches    10330    10330
=======================================
  Hits        58298    58298
  Misses       5232     5232
  Partials     2955     2955


Return devices

I want to ship this in a desktop app. So, I'd like to call Membrane.PortAudio.Devices.list() and get back a list of devices so the user can select one.
I implemented it by adding a device spec and iterating over the DeviceInfo structs to create devices. I then return those in a list.
This is my first crack at NIF's so be gentle.

I was about to start a PR on exactly this, since I have the exact same need (I'm capturing sound cards audio, which can get plugged in / out, not on the same port etc).
Thanks for your work!
For history context:

https://github.com/membraneframework/membrane_portaudio_plugin/issues/9
https://github.com/membraneframework/membrane_portaudio_plugin/pull/43

I'll hit these changes shortly.

Thanks for considering my changes, and your valuable feedback.
I implemented everything you've recommended.
I do question the way we are handling returns.
There are some error cases here.
I don't know Unifex enough to understand how and when to return the ok and error tuples.
Since I removed the :ok from the spec, I can no longer use return_list_ok.
Of course, we can just return empty lists in our error case.
Would it be better for us to return {:ok, devices} or {:error, "Pa_CountDevices returned #{numDevices"} to retain the semantics of the model?
Given my limited experience with Unifex, it's not obvious how to do this, so I just accepted your proposal.
If you think this would be beneficial, I can attempt a refactor.
Your input on syntax would be very helpful.
Additionally, I was seeing intermittent segmentation faults in dev, so I changed the way I was assigning names to dynamically allocate memory on the device, and then copy the value from deviceInfo. I hope that resolves the segmentation fault, but for the safety of your users I should probably kick this around on my local a bit before you merge this PR.
Maybe give it a closer eye and make sure I haven't done anything grotesque with memory management? I'm a bit green with C.

Hi @johns10, basically, the label in .spec.exs maps to the result function name. Have you seen https://hexdocs.pm/unifex/Unifex.Specs.DSL.html? There's also https://hexdocs.pm/unifex/creating_unifex_natives.html. Let me know if we can improve the docs somehow to make it clearer.
Regarding this particular error, you're right, we need to do something about it. If we're about to return an error, it should be somehow structured, for example {:error, {:init, error_no}} and then we should leave the :ok as well. However, I'd rather raise with unifex_raise(env, description).


[GLUTEN-2756] Add a contributing guide

Introduce some conventions of the community on PR, issue, coding, code review, etc., which can also reduce review cost.

@zhouyuan, @baibaichen, @ulysses-you, please spare some time to take a review. Thanks!

Thanks everyone for the review! Will merge the doc soon.


ape(absolute positional embedding) is set False by default, is it OK?

The parameter ape, which stands for adding absolute position embedding to the patch embedding, is set False by default in the config file.
To my knowledge, for transformer models, input should be with positional embeddings to identify where they are. So I wonder if setting ape=False is proper.
Does this mean the swin-transformer model built by default is not sensible to the position of each patch?
And, if true, would this influence the performance of finetuned model?

Hi @feiyangsuo I was also coming across the positional embedding usage, they also use relative positional bias: https://github.com/microsoft/Swin-Transformer/blob/eed077f68e0386e8cdff2e1981492699d9c190c0/models/swin_transformer.py#L89
Which is a learnable matrix of the size of a window, that gets added to the attention matrix.
I think in this way they can exclude the absolute positional embedding.
I general there exist also relative positional embedding schemes which are used in other vision transformers architectures in addition to relative positional bias.

@feiyangsuo Yes, ape is set False by default, where we find ape has no benefit to general vision recognition problem. If you want to use this feature, you can initialize the ape by zero vectors, such that you can directly leverage the pre-trained models.

Hi @feiyangsuo I was also coming across the positional embedding usage, they also use relative positional bias:
https://github.com/microsoft/Swin-Transformer/blob/eed077f68e0386e8cdff2e1981492699d9c190c0/models/swin_transformer.py#L89
Which is a learnable matrix of the size of a window, that gets added to the attention matrix. I think in this way they can exclude the absolute positional embedding. I general there exist also relative positional embedding schemes which are used in other vision transformers architectures in addition to relative positional bias.

I got it, thanks.
So actually swin transformer has a relative position sensibility rather than absolute, which is somewhat alike convolution.


DropdownMenu should let us set the scroller position

Use case
DropdownMenu will set the position of the scroller to either the top of the dropdownMenuEntries if there's nothing selected or to the entry that is currently selected.
When there is nothing selected, I wanted the dropdown to initially display my preferred/suggested option for user to see amongst a long list of possible sorted options.
Proposal
It would be useful to set the position of the scroller to a specific item (without being selected).

You can use a custom searchCallback to highlight an item when it the search is empty.
import 'package:flutter/material.dart';

void main() {
  runApp(const DropdownMenuExample());
}

class DropdownMenuExample extends StatelessWidget {
  const DropdownMenuExample({super.key});

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SafeArea(
          child: Center(
            child: DropdownSearch(),
          ),
        ),
      ),
    );
  }
}

class DropdownSearch extends StatelessWidget {
  DropdownSearch({super.key});

  final entries = [
    for (int value = 0; value < 30; value++)
      DropdownMenuEntry<int>(
        value: value,
        label: "Item $value",
      )
  ];

  @override
  Widget build(BuildContext context) {
    return DropdownMenu<int>(
      dropdownMenuEntries: entries,
      menuHeight: 300.0,
      searchCallback: (entries, query) {
        if (query.isEmpty) {
          return 20;
        } else {
          final int index = entries.indexWhere((DropdownMenuEntry<int> entry) =>
              entry.label.toLowerCase().contains(query));
          return index != -1 ? index : null;
        }
      },
    );
  }
}

Thank you @PurplePolyhedron


Does not request builds that are within a folder

This will return a 404/null if the Job is located under a few folders. This attempts to only request the builds under the root view.
Test:
Get all builds from a job located at: job/AFolder/job/AJob
https://github.com/jenkinsci/java-client-api/blob/b526c33cdbe49b9c0254a394da19689ef867ef8c/jenkins-client/src/main/java/com/offbytwo/jenkins/model/JobWithDetails.java#L126

You could have used "/search/suggest" method but the client is strictly private and no way to extend JenkinsServer and use its client. Will post it as another issue.


Release/2.0.0

We made some changes on composer.json to make the package compatible with systems using php> 7.0 and having same dependencies too.
We also made some corrections in the tests to pass the travis-ci.
We sugest change the master version because can have 'breaking change'.

No entiendo por qué les lleva tanto tiempo mergear a los dueños del repositorio, hace meses está este pull-request que es muy importante

Version 2.0 has been released already, solving the PHP 7 + Doctrine issue. Shouldn't this be closed?


Add some more detail to the README about the different Let's Encrypt

validation methods.

Great!


Question: Setting themes and fonts

The Readme gives some examples of setting a theme under the heading "Customization" along with the command syntax but where can I find the list of theme names and airline themes to choose from.  Also regarding setting a font, being that I run nvim from terminal do I simply change the font my terminal emulator is using or is spaceneovim sourcing other fonts.
This is not an issue but I was unsure where to post my question and seen that there was another question posted here.

Hey!

The Readme gives some examples of setting a theme under the heading "Customization" along with the command syntax but where can I find the list of theme names and airline themes to choose from.

You'll be able to find a list of VIM themes here https://vimcolors.com. You'll then need to find the repository it is in (you can click on them), and add it to your config to pull via
function! Layers()
  " ...
  ExtraPlugin 'liuchengxu/space-vim-dark'
endfunction

For AirLine themes, I think https://github.com/vim-airline/vim-airline-themes is the go to for that :)

Also regarding setting a font, being that I run nvim from terminal do I simply change the font my terminal emulator is using or is spaceneovim sourcing other fonts.

Fonts will be controlled by the terminal, so you'll need to configure your terminal with your favorite font. If you are using a GUI you can set it for that specifically though in your UserConfig block (where most of your VIM configurations will go).

Thank you Tehnix you have been extremely helpful and this answers all of my questions perfectly.  I much appreciate your time and the awesome job you have done on spaceneovim.  I have experimented with other vim distributions and am finding this one to suit my use case the best.  Thanks

@slipsnip happy to hear it worked for you! :) I'll close this issue to clean up the issues list.


Dev/ranger

What problem does this PR solve?
What is changed and how does it work?
Checklist
Tests

Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code

Code changes

Has exported function/method change
Has exported variable/fields change
Has interface methods change
Has persistent data change

Side effects

Possible performance regression
Increased code complexity
Breaking backward compatibility

Related changes

Need to cherry-pick to the release branch
Need to update the documentation
Need to be included in the release note

server端引入的类的关系画一下吧


double error trying to convert bool to int

What did you do?
Tried to convert a bool to an int.
For example: x := int(false)
https://play.golang.org/p/5eGVyWi1kH
What did you expect to see?
a single error message
What did you see instead?
two slightly different error messages for the same source location
main.go:4:9: cannot convert false to type int
main.go:4:9: cannot convert false (type bool) to type int

System details
go version go1.9.2 linux/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/gouser/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build143268145=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOROOT/bin/go version: go version go1.9.2 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.9.2
uname -sr: Linux 4.9.0-4-amd64
Distributor ID:	Debian
Description:	Debian GNU/Linux 9.2 (stretch)
Release:	9.2
Codename:	stretch
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Debian GLIBC 2.24-11+deb9u1) stable release version 2.24, by Roland McGrath et al.
gdb --version: GNU gdb (Debian 7.12-6) <IP_ADDRESS>61007-git

I guess the issue has been fixed by https://github.com/golang/go/commit/d05a1238d6811aa11abf117e668cd9c4f4c15e6a.
See https://github.com/golang/go/issues/20812.
Acutally, the issue cannot be reproduced in my local.
My go version is go version devel +25363de Fri Dec 8 16:54:20 2017 +0000 darwin/amd64.

Was about to write the same - cannot reproduce on tip either. Seems like a duplicate indeed.

Yeah, I searched for issues about bools and "double error" but I did not search for "duplicate error"
Thanks.


Accordion/AccordionPanel Review Notes

Accordion.js
Line 57: Add comment to inform that we are checking for a string in case the user uses an HTML element instead of a React Node, in which case boolean attributes aren't allowed
Lines 115-116: Remove the titlePosition prop and allow user to set positioning/style by passing through a Node instead of a String to the title prop.
Line 118: Remove header-inactive class and make that the default styling. Only overwrite when active.
Lines 130-131: Do we need these?
Line 134: Remove unnecessary wrapper div. Replace with React.Fragment if wrapper is needed.
Line 168: Wrap message in <Text> component.
Line 197: Allow expandAll prop to be either boolean or string. If string, use that value instead of messages.expandAll on line 168.
AccordionPanel.js
Line 17: Delete panelStyles variable and just set styleName=cx("accordionPanel") on div.
Line 49: Set prop type for title to PropTypes.node to allow user to pass in any element. Check styling to make sure end user has full control over the header section when adding a title element.

Change expanded to active


Doc task fails with bad option '-doc-external-doc' for scala3 project

steps

Checkout datadog4s at this commit
run sbt doc

problem
Task succeeds but apidoc is not generated, following warning is written out:
[warn] bad option '-doc-external-doc:/modules/java.base#https://docs.oracle.com/en/java/javas...

expectation
I expect that:

the task would probably fail in order to notify user that no api docs were generated
the task would use correct command for scala3 projects (which based on scaladoc man page i suspect is the following:

-external-mappings Mapping between regexes matching classpath entries and
                   external documentation.
                   'regex::[scaladoc|scaladoc|javadoc]::path' syntax is used

notes
i believe this is the offending line: https://github.com/sbt/sbt/blob/develop/main/src/main/scala/sbt/Opts.scala#L40

i believe this is the offending line: https://github.com/sbt/sbt/blob/develop/main/src/main/scala/sbt/Opts.scala#L40

+1, setting autoAPIMappings := true on a Scala 3 project also seems to trigger this.


Adding new section to AI Analytics Samples

Existing Sample Changes
Some samples do not contain a link to additional samples, adding that section in.
Type of change
Please delete options that are not relevant. Add a 'X' to the one that is applicable.

[X ] Bug fix (non-breaking change which fixes an issue)

There are some merge conflicts. Can you please fix and resubmit the PR

Isha,
Can I merge this?. The PR was in draft state when u modified.

Yes, please merge


about multi-level feature extraction

Hi, thanks for your great work. Is there possible ways to extract multi-level features in the optical flow estimation task? I notice there is a hyperparameter ' num_scales', but when I try to set it to 4, it seems it has correlation with the hyperparameter 'attn_splits_list', 'corr_radius_list' and 'prop_radius_list'. Could you show me how to adjust these three parameters if I would like to extract the 4 level upsample features? Thank you!

Hi, the 'attn_splits_list', 'corr_radius_list' and 'prop_radius_list' are lists where each element controls the corresponding paprameter of each scale. Thus if you use 4 scales, the length of these there parameters should also be 4.


No documentation on dark theme

I searched for some time but wasn't able to reproduce the dark theme as seen in the screenshots. Am I missing something?
(Also want to say that I really like vimiv, I'm very glad I found it, it works wonderfully and has a very clean interface compare to programs like sxiv! Good job :) )

Styling vimiv is done completely via Gtk(3) themes. The screenshots are done with the arc theme in the dark variant. This should probably be mentioned somewhere...
Note that I am currently working on #61 which will allow completely customizing the look of vimiv with its own style sheets.
Thanks a lot for your warm words, much appreciated :smile:

Thank you!
I didn't know there were themes haha (well I don't use a DE and the number of non-cli apps I use is very limited). Looking forward to seeing the style sheets system.


Better Error Handling

I noticed that currently errors are neither captured, handled, or propagated.
This could be replicated by calling any method with an invalid token (there are many other ways, of course).
           if (!error & response.statusCode === 200) {                 callback(JSON.parse(body))             }
Also, we aren't following the NodeJS error-first-callback practice.
We could modify this by introducing a breaking change and passing the error as the first argument of the callback.
callback(err, JSON.parse(body))
or make it backward compatible by passing error as the second argument. This would be a departure from the usual node JS callback conventions though.
thoughts?

@JohnDoePBabu what is your best approach for handling error? I didn't add the error handling while making the project since I want to understand how BMC API works. Do you have any suggestion since we are going to use GOT might has better error handling than request.

Hi @JohnDoePBabu I'm assigning this to you...

@WarenGonzaga  We can do one of the below

Catch error from Axios and pass the error as the first callback

        try {
            const response = await requester.get(path, {
                headers: {
                    Authorization: 'Bearer ' + this.access_token,
                }
            });
            callback(null, response.data);
        } catch (err) {
            callback(err);
        }

Pros:

With callback and Node JS, error first is the real recognized approach.

Cons:

For people currently using the library, this will be a very big breaking change.
if they are currently using the module as

coffee.Subscriptions((data) => {
    console.log(JSON.stringify(data));
  });

They will have to change to
 if (err) // do something with error
 else console.log(JSON.stringify(data));
  });

Catch error from Axios and pass the error as a second callback

 if (err) // do something with error
 else console.log(JSON.stringify(data));
  });

Pros:

Backward compatible with the previous version of BMC JS. No breaking change for current users.
Cons:
Against Node JS convention.
counter-intuitive for future users

Move to Promise style of handling error by rejecting

        try {
            const subcriptions = await coffee.Subscriptions();
        } catch (err) {
            // do something with error
        }

Pros: cleaner than callback
Cons: Again breaking change

Support both callback and promise
Check if the user has sent a function as a second argument if so return callback else use a promise.
Again for the callback version, we will have to decide if we want option 1 or option 2.
So the user can do both

coffee.Subscriptions((err, data) => {
 if (err) // do something with error
 else console.log(JSON.stringify(data));
  });

and ...
        try {
            const subcriptions = await coffee.Subscriptions();
        } catch (err) {
            // do something with error
        }

What do you think is better @JohnDoePBabu? and more standard?
What I see your option number 3 is more okay to me. Breaking changes is natural since we are planning to release the v2.
We need clear documentation once these changes implemented so they can easily adapt to the latest version.

Hi @WarenGonzaga,
I noticed that when there is no data, eg: no supporters, BMC API sends a 200 response with an error in the response body.
such as
 {   "error": "No subscriptions" }
Shall we implement it the same way or do you prefer to

send an empty array
throw an error

Hi @JohnDoePBabu,
I would prefer to throw an error message instead of empty array.

All good closing this issue with merge #18

All good closing this issue with merge #18


build difficulty

Whenever I am trying to make any changes in the html templates - views
the changes are not reflected in the build

/cc @codebytere @zeke

are you running the server with npm run dev?

Yes

It looks like nodemon is not configured to watch for changes to .html files: https://github.com/electron/electronjs.org/blob/03f1a81f1cca717646d3ef0de35035530696c1c4/nodemon.json#L2

Even if I add html in watch
the changes are not occuring

no matter if html is down there or not
the fresh dev run should build from the available html!
which is not

@zeke is there any update on this?

Closing due to no response. Please reopen if you still see this problem


Update audit schema

Changed the data type of the primary key constraint in auditing dmp table

Can one of the admins verify this patch?

ok to test


Unexpected warning "Consumable configurations with identical capabilities" reported in unusual location

Current Behavior
Gradle logs an incorrect warning in the Configuration description when running gradle resolvableConfigurations

The warning message isn't correct. There aren't multiple consumable configurations with the same attributes.
Warnings aren't reported in the console at 'warn' log level.
enableStricterValidation doesn't report warningstasks.validatePlugins {
  enableStricterValidation.set(true)
}

Gradle silently modifies the description of a configuration when it is logged using resolvableConfigurations

Expected Behavior

The validation is either removed, fixed, or has an updated message to explain the problem more clearly.
Warnings ~aren't~ are reported in the console at 'warn' log level.
enableStricterValidation ~doesn't~ should report warningstasks.validatePlugins {
  enableStricterValidation.set(true)
}

Gradle should not silently modify the description of a configuration when it is logged using resolvableConfigurations

Steps to Reproduce

Create two configurations. One is resolvable, one is consumable.

 fun Configuration.resolvable(
   visible: Boolean = false,
 ) {
   isCanBeResolved = true
   isCanBeConsumed = false
   isCanBeDeclared = false
   isVisible = visible
 }

 internal fun Configuration.consumable(
   visible: Boolean = false,
 ) {
   isCanBeResolved = false
   isCanBeConsumed = true
   isCanBeDeclared = false
   isVisible = visible
 }

 configurations.register("fooResolver") {
   resolvable()
   attributes {
     attribute(USAGE_ATTRIBUTE, objects.named("foo"))
   }
 }

 configurations.register("fooConsumer") {
   consumable()
   attributes {
     attribute(USAGE_ATTRIBUTE, objects.named("foo"))
   }
 }

Run gradle resolvableConfigurations -q

Verify the output contains fooResolver, but not fooConsumer. This is expected.

Observe unexpected warning message regarding fooResolver. Why does a non-consumable Configuration clash with a consumable one? Why is this warning reported in the reports, here?
--------------------------------------------------
Configuration fooResolver
--------------------------------------------------
Consumable configurations with identical capabilities within a project (other than the default configuration) must have unique attributes, but configuration ':fooResolver' and [configuration ':fooConsumer'] contain identical attribute sets. Consider adding an additional attribute to one of the configurations to disambiguate them. For more information, please refer to https://docs.gradle.org/8.7/userguide/upgrading_version_7.html#unique_attribute_sets in the Gradle documentation.

Attributes
    - org.gradle.usage = foo

Gradle version
8.7
Build scan URL (optional)
No response
Your Environment (optional)
No response

@aSemy does it happen in 8.6?

I can reproduce with 8.8.
It's happening here

There seems to be 2 code paths that check for conflicts. The other one goes this way and correctly filters out the non-consumable configurations but later on it's checked again for non-consumable ones.


Add links to OSS-SECURITY.yaml and Alpha-Omega

I think it's important that every OpenSSF working group link to all of its projects.
Otherwise people can't find them & collaborate.
These two projects are missing - let's fix that.

@scovetta - can you please merge soon?


NSObject equality naming conflict

Issue
Since this project extends NSObject to make it conform to IGListDiffable and that protocol has a method with a similar isEqual signature as the standard NSObject one, it is creating naming conflicts with other, completely unrelated, objects in the project that use the vanilla isEqual comparison.

You should consider uniquely naming the IGListDiffable method, e.g.:
- (BOOL)isEqualToDiffableObject:(nullable id<IGListDiffable>)object;

I looked into opening a PR for this, but honestly there are too many vague isEqual calls in the codebase so I'm not sure which should be the diffable equality check and which should be the vanilla NSObject ones.
New issue checklist

[x] I have reviewed the README and documentation
[x] I have searched existing issues and this is not a duplicate

General information

Library version(s): 1.0.0
iOS version(s):
Devices/Simulators affected:
Reproducible in the demo project? (Yes/No): N/A
Related issues:

Hey @iwasrobbed ! 😄
It looks like your error is with override. Removing this should fix that. However, isEqual: changed in Swift 3. It should be isEqual(object: Any?) -> Bool. (Note: not AnyObject.) Are you using Swift 2.3 or 3.0? (We're only supporting 3.0)

This is Swift 2.3 code, but the same issue would possibly exist in a Swift 3.0 project unless they made compiler fixes for these sorts of ambiguity.
This is actually existing code, not something I added after adding IGListKit, and the class it's on inherits from NSObject so it's technically an override. The class in question has nothing to do with IGListKit whatsoever which strikes me as side effects which you wouldn't want to have in people's projects.
Removing that just gives another error Method 'isEqual' with Objective-C selector 'isEqual:' conflicts with method 'isEqual' from superclass 'NSObject' with the same Objective-C selector

Removing that just gives another error Method 'isEqual' with Objective-C selector 'isEqual:' conflicts with method 'isEqual' from superclass 'NSObject' with the same Objective-C selector

Can you annotate the func with @nonobjc ?

Oh — and if you can fork and reproduce this in the demo project, that would be great! 👍

re: @nonobjc: Ultimately, the compiler is not able to find the vanilla isEqual method since it's being overwritten by the diffable version, so the annotation doesn't help unfortunately.
Looks to be fixed in Swift 3.0 since it disambiguates the two equality functions.
Feel free to close, but I imagine a lot of people will be stuck on Swift 2.3 for a bit longer. At the very least, may be worth specifying this via a .swift-version file and README.

This was something that @ryanolsonk and I discussed a while back. We landed on overriding isEqual: for simplicity's sake. Also we had a bunch of models that had custom equality methods, so the change was easy.
The other problem that we have with -isEqual: is that it basically requires implementing -hash. We could:

Change the protocol to the method -isEqualToDiffableObject: or something like that
Have the NSObject+IGListDiffable category just return [super isEqual:object]; so everything "just works"

This would obviously be a breaking change, but its early so we can afford it.

It looks like you closed this in favor of just saying that it requires Swift 3.  However, this creates problems for us in Objective-C.  We useisEqual: to test what you call diffIdentifier.  This made it handy for us to use common NSArray methods (like containsObject:, removeObject:, indexOfObject:, etc) - such that when we got a new array of updated objects, we could simply call removeObject: on the old array which meant "remove the thing that has the same uniqueID as this object".  Arguably, this was perhaps a misuse of isEqual: on our part.  But given how pervasively isEqual: is used by collection objects and such, I can't imagine we're the only ones who will bump into an issue like this.
Would it be a simple enough solution to add an optional method to the IGListDiffable protocol along the lines of isEqualToDiffableObject: and then add a 3rd option to IGListDiffOption (perhaps called something like IGListDiffCustomEquality) and when you use that option, you use isEqualToDiffableObject: instead of isEqual:?

Across the same lines I'm currently using it in a few Swift 2.3 projects, and I'm constantly getting bit in the ass by the fact CoreData refuses to let you override isEqual: and based on the way my processes work (and have done for ages) that one will return false even if they're the same object.
This issue may still be in Swift 3 as well, not been able to test it.

@chrismcs this isn't closed yet (just ref'd from a closed PR).
Ya there are definitely issues w/ this when used w/ ObjC, esp if you aren't careful (see my note above about -hash). It's pretty easy to break things and the compiler wont have your back.
I think I'm set on changing the protocol to -isEqualToDiffableObject:. Been meaning to grab @ryanolsonk's opinion on this b/c he was influential in shaping IGListDiffable.

@rnystrom +1 for isEqualToDiffableObject:

Working on this, got a question for everyone. I want to keep the default NSObject<IGListDiffable> category.
We also include this category in the umbrella header. When I changed the protocol method to isEqualToDiffableObject: everything works, but things will silently break if you had custom isEqual: and #import <IGListKit/IGListKit.h> (in Swift bridging header or ObjC). Kind of a bummer.
Chalk this up to growing pains?
One idea is to build a "bridging" function that checks if objects conform to IGListDiffable and also have custom isEqual: implementations? Sort of saying "hey you probably didn't migrate".
Not sure its worth the effort.

Chalk this up to growing pains?

Yeah, I would. This is why we have a changelgo + release notes. 😄

Not sure its worth the effort.

Definitely not, IMO.

Another option: don't include that category header in the umbrella header. Force clients to import that manually if they want it.


Day348

Resolves #693.

Pull Request Test Coverage Report for Build 1691

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 1681:
0.0%

Covered Lines:
5

Relevant Lines:
5

💛  - Coveralls

Pull Request Test Coverage Report for Build 1683

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 1681:
0.0%

Covered Lines:
5

Relevant Lines:
5

💛  - Coveralls


[parallel-hashmap] Update to version 1.36

Which triplets are supported/not supported? Have you updated the CI baseline?
all

Does your PR follow the maintainer guide?
yes

If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?
yes

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

@greg7mdp For any modification of the port files, even an empty commit needs to comply with the port-version policy.
See documentation :)

@FrankXie05 sorry about this, I believe I addressed the empty change.

/azp run

@greg7mdp
vcpkg does not build port test and example projects by default, which can reduce unnecessary build time. :)
# Use greg7mdp/parallel-hashmap's own build process, skipping examples and tests
vcpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
        -DPHMAP_BUILD_TESTS=OFF
        -DPHMAP_BUILD_EXAMPLES=OFF
)

Thanks a lot @FrankXie05 , I added the change!

Thanks for the PR!

Thank you for merging it :-)


Loading segment files fails

When starting a Jitar node the following error pops up: ModuleNotLoaded [Error]: Module '***/examples/1-basic/1-hello-world/cache/default.segment.node.js' could not be loaded | Receiver must be class ModuleLoader
This seems an effect of securing the module loader. Because this is an blocking issue and needs to be fixed asap.

With securing the ModuleLoader the import function is refactored to call an internal (private) function. This works fine when calling the import function directly, but we also used it for setting the dependency loader:
setDependencyLoader(ModuleLoader.import);

This causes the error because in this context the import function has another this than the ModuleLoader class. Because the previous import function didn't call another function, this wasn't a problem.
The solution I chose for now is to wrap the function calls:
setDependencyLoader((name: string) => ModuleLoader.import(name));

Later on we need to find a cleaner solution.


Compare checksums on byte values

Small PR to improve resilience by not relying on hex-text values when comparing hashes.
Added on top of #33. Marked as draft until the PR is merged to avoid extra efforts on rebase.

If possible, please release a beta.2 so that I can continue with resticprofile. Thanks 👍

LGTM, thanks 😄
I'll make a beta-2 👍🏻


Hide empty (draft) guides by default

On production, a lot of people try out the site without realising that they are being encouraged to write up a guide.
#637 talks about not deleting useful guides, but the opposite scenario has happened.
This results in:

... which doesn't really showcase the point of openfarm.
Modelling a guide status or completeness (draft => published) would create a way to only show relevant guides more easily.

We've actually discussed adding a draft boolean to guides. This would be super useful, and would mean guides only get shown if the user clicks on "Publish" at the end. 100% agreed.

This is now implemented!
Todo: send out an e-mail to members saying that drafts of guides are now possible. Encourage them to complete their guides.

Just tested this on staging:

Hit the "review" button
Successful redirect to my draft guide, with big banner on top (great job with that!)
Toast notification showed that I had successfully created a guide, which was a little confusing, because the banner tells me this is a draft, and the toast is telling me I've created the guide. The messages are just kind of conflicting. I suggest we remove the toast notification.
I hit the "Publish" button and the banner immediately dissappeared, but I wasn't sure if it successfully published. I suggest that this is where a toast should show (either successful publishing or error)
Go to check the search results, guide is not listed.
Went back to the guide and the banner had re-appeared. Clicked publish again and the same thing happened (banner disappears but it doesn't actually publish) This showed up in the console:

application-dfb1196….js:5 TypeError: Cannot read property 'image_url' of null
    at g (show-d14e067….js:1)
    at c.e.saveGuideChanges (show-d14e067….js:1)
    at t.$$ChildScope.$$ChildScope.e.publish (show-d14e067….js:1)
    at application-dfb1196….js:6
    at application-dfb1196….js:6
    at t.$$ChildScope.$$ChildScope.$eval (application-dfb1196….js:5)
    at t.$$ChildScope.$$ChildScope.$apply (application-dfb1196….js:5)
    at HTMLButtonElement.<anonymous> (application-dfb1196….js:6)
    at HTMLButtonElement.dispatch (application-dfb1196….js:2)
    at HTMLButtonElement.m.handle (application-dfb1196….js:2)

Here is the test guide: http://staging.openfarm.cc/en/guides/57e8a10cf3d809000300000e

A little update: The test guide I made originally did not have any images (not even a cover image). This seemed to be preventing it from publishing. Once I edited the guide and added a cover image, the publish button worked, the banner disappeared, and the guide showed up in search results.

Okay, so I've just pushed a fix for this to staging. The issue was that I also implemented adding a featured image to the update-guide process. That broke because it now assumed that an image was always present when updating. Oops! Should really think about writing those front-end tests a bit more.
The bug should be fixed. Remaining todo:

[ ] Make toast pop up in the right place. I suspect we should just remove the notification from the erb. controller and just do it on callback in the JavaScript.


Reenable and fix warning 4838 - conversion from 'unsigned int' to 'int' requires a narrowing conversion

@digitalinfinity Please code review.

:+1:


[question] Is there a way to convert the strokes into fills?

I search for solution to convert path with stroke attributes into path with fill attributes
Example:
stroked_path.svg
<?xml version="1.0" encoding="UTF-8" ?>
<svg width="50" height="50">
    <path fill="none" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"  ... />
</svg>

filled_path.svg
<?xml version="1.0" encoding="UTF-8" ?>
<svg width="50" height="50">
    <path fill="#000000" stroke="none" ... />
</svg>

This two paths in the Inkscape:

Loop over all your path you have and check the stroke attribute. If stroke is set, remove it and set fill.


PHP-Redis missed - Scale not possible

Cause PHP-Redis is missing it is not possible to point to an ditributed redis instance.
Cause of this, you are bind to local caching methods, that results in beeing not able to scale nextcloud on an docker swarm.
So, please add php-redis.

As i can see php7.1redis is not available jet, may manuel install is necessarry?

BR

I would like to, and I know php7.1-redis is not available yet. But even when using pecl, the module is built and installed, but php is saying the module cannot be recognised. I find nothing about this...
If you want to help, you can try to make it work. I'm very busy and I've spent enough time looking around for a solution. So I ended up removing the extension ; not very professional I know, but I've made this image and  I maintain it for my own use first. However I don't say I'm not open to suggestions, and you can be sure I will add php-redis extension again... if it works.

@Wonderfall  i'll try... stay tuned


Not consistent depth colormap between nerfacto and depth-nerfacto

Describe the bug
I was comparing the results from depth-nerfacto and nerfacto in tensorboard, but I realized there is not a consistent way of applying the colormaps to the output depths. In depth_nerfacto.py:
predicted_depth_colormap = colormaps.apply_depth_colormap(             outputs["depth"],             accumulation=outputs["accumulation"],             near_plane=torch.min(ground_truth_depth),             far_plane=torch.max(ground_truth_depth),         )
And in nerfacto:
        depth = colormaps.apply_depth_colormap(             outputs["depth"],             accumulation=outputs["accumulation"],         )
If a value is not provided to apply_depth_colormap, the max and min values of the depth map are taken which results in squashing the histogram like in the following image (left is depth nerfacto and right is nerfacto):

Also, by clipping the colormap of depth nerfacto to the largest value, it prevents from showing further details
By setting something a fixed value for both nerfacto and depth-nerfacto for the far plane (5 meters) like:
        depth = colormaps.apply_depth_colormap(             outputs["depth"],             accumulation=outputs["accumulation"],             near_plane=0.0,             far_plane=5.0,         )
We get much more coherent results (left is depth nerfacto and right is nerfacto):

However, there should be a better or more flexible solution.

My first thought was sliders for near and far, with defaults, but I notice there are already sliders for range in there; not sure how they should interop...

It looks like if you change the depth colormap from default to, say, turbo, you can then manipulate the range sliders; range seems to default to [0, 1] but the sliders let one set it to [-2, 5].
Maybe you can try setting the sliders to [0, 5] and see if that is the same as your near/far plane settings in code?  Because if so, we should probably change the default range to NOT be [0, 1].


ability to set fee in sat/b instead of absolute

I would like to set the fee in sat/b instead of only being able to set absolute values.
This would include the option to send 0-fee transactions.

sat/v would be very helpful to switch between total and sat/b for fee's


Imported components are always typed as any

I have some code that looks like this:
import {useTemplateRef} from "vue";
import DatasetFilterComponent from "./DatasetFilter.vue";

type DatasetFilterComponentType = InstanceType<typeof DatasetFilterComponent>;
const datasetFilterComponent = useTemplateRef<DatasetFilterComponentType>(
    "datasetFilterComponent"
);

The template in this component file includes some lines like this:
<DatasetFilter
    ref="datasetFilterComponent"
></DatasetFilter>

The imported component in DatasetFilter.vue contains this line, intended to expose a function.
defineExpose({setDatasetName});

Both of these components have their code written within a <script lang="ts" setup> tag.
Instead of providing a type like {defineExpose: function}, the LSP shows that the value of the datasetFilterComponent ref is instead just any. (This any typing also seems to be present when running vue-tsc, which doesn't produce an error on attributes that I know don't exist on the component. This may be an issue with my configuration in general?)

Note that though the Vue docs mention that omitting the useTemplateRef template argument should allow the type of the component to be inferred, omitting the template argument only results in a type of unknown instead of any.

I tried using takeover mode by configuring my project as described in the readme, but this didn't have any effect on the problem.
How can I fix this and get a correct type?

Closing because the actual issue was that the component import path was incorrect, and for some reason I was not receiving any kind of TypeScript error for the nonexistent import path. After fixing the import path, the type is no longer any. (Though the inferred type is still unexpectedly unknown.)


Changed OS to ubuntu and added LibUv.

Additionally changed mono version to latest 4.2 stack which I found to be a lot stabler than 4.0 when it comes to threading.

This base container shouldn't include libuv should it?  It's meant to be the base for all F# docker containers - the one from which all ones are derived and the "official" base docker container for F# - shouldn't libuv be added in a derived container?

We could create a 'web' container; how would that be?

Agreed! We should keep the mono 4.2.x stack though, as it is a lot stabler than 4.0.

Btw.: Mono 4.2.1 can be regarded as stable from today on. http://www.mono-project.com/docs/about-mono/releases/4.2.1/

@sebfia should you update your PR or should I?

Sorry for the late reply!
I can do it.
Btw.: We could build the latest F# release from source since there is currently no package for it. For maintenance this would not make any difference as only the FSHARP_VERSION env. var. would need to be touched...

No LibUv any more and we have F# <IP_ADDRESS>

Thanks, I'm testing this. Replacing maintainer with my own account though, but in no diminishing your contribution, for which we're greatful!

Of course - no problem!


[BUG] "United Kingdom" Matches to United States

Describe the bug
A clear and concise description of what the bug is.
The string "United Kingdom" matches to the United States. It should match to the United Kingdom.
To Reproduce
!pip install geograpy3
import geograpy
places = geograpy.get_geoPlace_context(text="United Kingdom")
print(places)

Output:
countries=['United States of America']
regions=[]
cities=['United']
other=[]

Expected behavior
Expected Output:
countries=['United Kingdom']
regions=[]
cities=[]
other=[]

Environment:

OS: Ubuntu 20.04
Python Version: 3.10.1

Confirmed that it is not an environment issue with a minimal reproduction on Colab: https://colab.research.google.com/drive/1iZ8Qk8p044jF1hWNDxQjFPZ_MruOefNW?usp=sharing

Same thing also happens with
places = geograpy.get_geoPlace_context(text="England") print(places)

One more case of odd mapping to the United States:
places = geograpy.get_geoPlace_context(text="Republic of Korea")
print(places)

Output:
countries=['United States of America']
regions=[]
cities=['Republic', 'Korea']
other=[]

You are using an outdated API.

I ended up switching to a different library for my project but, for others use, it might help to understand which aspect is outdated in the Colab.
The package is installed using the setup instructions from the readme.

Is this the part that's outdated?
The method used is the first method mentioned under basic usage in the README.

Is that method no longer used?

no - that method is outdated and unreliable. A more reliable method is to combine nominatim access + geograpy with details about countries and regions in combination with a "voting" mechanism. See .e.g the code below
'''
Created on 2021-08-11

@author: wf
'''
#from lodstorage.entity import EntityManager
from geograpy.locator import LocationContext
from geograpy.nominatim import NominatimWrapper
import sys

class LocationLookup:
    '''
    lookup locations
    '''
    predefinedLocations={}

    @classmethod
    def initPredefinedLocations(cls):
        locMap={
            "Not Known": None,
            "Online": None,
            "Virtual": None,
            "Virtual, USA": None,
            "Virtual Event, USA": None,
            "Amsterdam": "Q727",
            "Amsterdam, Amsterdam": "Q727",
            "Amsterdam Netherlands": "Q727",
            "Amsterdam, Netherlands": "Q727",
            "Amsterdam, The Netherlands":"Q727",
            "Amsterdam The Netherlands": "Q727",
            "Będlewo, Poland": "Q5005546",
            "Bergen, Norway":"Q26793",
            "Bremen, Germany": "Q24879",
            "Brussels, Belgium": "Q239",
            "Brussels Belgium": "Q239",
            "Cancun, Mexico":"Q8969",
            "Cancún, Mexico": "Q8969",
            "Gdansk, Poland":"Q1792",
            "Heraklion, Crete, Greece":"Q160544",
            "Красноярск": "Q919",
            "Luxembourg, Luxembourg":"Q1842",
            "Macau, Macau, China":"Q14773",
            "Marina del Rey, CA": "Q988140",
            "Monterrey, Mexico":"Q81033",
            "Москва": "Q649",
            "New Delhi": "Q987",
            "New Delhi, India": "Q987",
            "Новосибирск":"Q883",
            "Salamanca, Spain": "Q15695",
            "Skovde, Sweden": "Q21166",
            "St. Petersburg": "Q656",
            "Санкт-Петербург": "Q656",
            "Saint-Petersburg, Russia":"Q656",
            "Thessaloniki": "Q17151",
            "Thessaloniki, Greece": "Q17151",
            "Trondheim, Norway":"Q25804",
            "Valencia": "Q8818",
            "Valencia, Spain": "Q8818",
            "Valencia, Valencia, Spain": "Q8818",
            "York, UK":"Q42462"
        }
        for city,region,regionCode,countryCode,country,wikiDataId in [
            ("Albuquerque","New Mexico","NM","USA","United States","Q34804"),
            ("Alexandria","Virginia","VA","USA","United States","Q88"),
            ("Cambridge",None,None,"UK","United Kingdom","Q21713103"),
            ("Cambridge","Massachusetts","MA","USA","United States","Q49111"),
            ("Charleston","South Carolina","SC","USA","United States","Q47716"),
            ("Lake Louise","Alberta","AB","CA","Canada","Q12826048"),
            ("Los Angeles","California","CA","USA","United States","Q65"),
            ("Miami Beach","Florida", "FL", "USA","United States","Q201516"),
            ("Montreal","Quebec","QC","CA","Canada","Q340"),
            ("Montréal","Quebec","QC","CA","Canada","Q340"),
            ("New Brunswick","New Jersey","NJ","USA","United States","Q138338"),
            ("New Port Beach","California","CA","USA","United States","Q268873"),
            ("Newport Beach","California","CA","USA","United States","Q268873"),
            ("New Orleans","Louisiana","LA","USA","United States","Q34404"),
            ("New York","New York","NY","USA","United States", "Q60"),
            ("Palo Alto","California","CA","USA","United States","Q47265"),
            ("Pasadena","California","CA","USA","United States","Q485176"),
            ("Phoenix","Arizona","AZ","USA","United States", "Q16556"),
            ("San Diego", "California","CA","USA","United States", "Q16552"),
            ("San Francisco","California","CA","USA","United States", "Q62"),
            ("San Jose","California","CA","USA","United States", "Q16553"),
            ("Santa Barbara","California","CA","USA","United States", "Q159288"),
            ("Santa Fe","New Mexico","NM","USA","United States","Q38555"),
            ("Snowbird","Utah","UT","USA","United States","Q3487194"),
            ("St. Louis","Missouri","MO","USA","United States", "Q38022"),
            ("Toronto","Ontario","ON","CA","Canada", "Q172"),
            ("Waikiki, Honolulu","Hawaii","HI","USA","United States","Q254861")
        ]:
            terms=[
                f"{city}, {country}",
                f"{city}, {countryCode}"
            ]
            if region is not None:
                terms.extend([
                    f"{city}, {region}",
                    f"{city} {region}",
                    f"{city}, {regionCode}",
                    f"{city} {regionCode}",
                    f"{city}, {region}, {country}",
                    f"{city} {region} {country}"
                    f"{city}, {region}, {countryCode}",
                    f"{city} {region} {countryCode}",
                    f"{city}, {regionCode}, {country}",
                    f"{city} {regionCode} {country}",
                    f"{city}, {regionCode}, {countryCode}",
                    f"{city} {regionCode} {countryCode}"
                ])
            for term in terms:
                locMap[term]=wikiDataId
        cls.preDefinedLocations=locMap
        cls.other={
            "Washington, DC, USA": "Q61",
            "Bangalore": "Q1355",
            "Bangalore, India": "Q1355",
            "Xi'an": "Q5826",
            "Xi'an, China": "Q5826",
            "Virtual Event USA": "Q30",
            "Virtual USA": "Q30",
            "London United Kingdom": "Q84",
            "Brno":"Q14960",
            "Cancun":"Q8969",
            "Gothenburg Sweden": "Q25287",

            "Zurich, Switzerland": "Q72",
            "Barcelona Spain": "Q1492",
            "Vienna Austria": "Q1741",
            "Seoul Republic of Korea": "Q8684",
            "Seattle WA USA": "Q5083",
            "Singapore Singapore":"Q334",
            "Tokyo Japan": "Q1490",
            "Vancouver BC Canada": "Q24639",
            "Vancouver British Columbia Canada": "Q24639",
            "Paris France": "Q90",
            "Nagoya": "Q11751",
            "Marrakech":"Q101625",
            "Austin Texas":"Q16559",
            "Chicago IL USA":"Q1297",
            "Bangkok Thailand":"Q1861",
            "Firenze, Italy":"Q2044",
            "Florence Italy":"Q2044",
            "Timisoara":"Q83404",
            "Langkawi":"Q273303",
            "Beijing China":"Q956",
            "Berlin Germany": "Q64",
            "Prague Czech Republic":"Q1085",
            "Portland Oregon USA":"Q6106",
            "Portland OR USA":"Q6106",
            "Pittsburgh PA USA":"Q1342",
            "Новосибирск":"Q883",
            "Los Angeles CA USA":"Q65",
            "Kyoto Japan": "Q34600"
        }
        cls.predefinedLocations=locMap

    def __init__(self):
        '''
        Constructor
        '''
        LocationLookup.initPredefinedLocations()
        self.locationContext=LocationContext.fromCache()
        cacheRootDir=LocationContext.getDefaultConfig().cacheRootDir
        cacheDir=f"{cacheRootDir}/.nominatim"
        self.nominatimWrapper=NominatimWrapper(cacheDir=cacheDir)

    def getCityByWikiDataId(self,wikidataID:str):
        '''
        get the city for the given wikidataID
        '''
        citiesGen=self.locationContext.cityManager.getLocationsByWikidataId(wikidataID)
        if citiesGen is not None:
            cities=list(citiesGen)
            if len(cities)>0:
                return cities[0]
        else:
            return None

    def lookupNominatim(self,locationText:str):
        '''
        lookup the location for the given locationText (if any)

        Args:
            locationText(str): the location text to search for

        Return:
            the location by first finding the wikidata id for the location text and then looking up the location
        '''
        location=None
        wikidataId=self.nominatimWrapper.lookupWikiDataId(locationText)
        if wikidataId is not None:
            location=self.getCityByWikiDataId(wikidataId)
        return location

    def lookup(self,locationText:str,logFile=sys.stdout):
        '''
        lookup a location based on the given locationText

        Args:
            locationText(str): the location to lookup
            logFile: the logFile to use - default is sys.stdout
        '''
        if locationText in LocationLookup.preDefinedLocations:
            locationId=LocationLookup.preDefinedLocations[locationText]
            if locationId is None:
                return None
            else:
                location=self.getCityByWikiDataId(locationId)
                if location is None:
                    print(f"❌❌-predefinedLocation {locationText}→{locationId} wikidataId not resolved",file=logFile)
                return location
        lg=self.lookupGeograpy(locationText)
        ln=self.lookupNominatim(locationText)
        if ln is not None and lg is not None and not ln.wikidataid==lg.wikidataid:
            print(f"❌❌{locationText}→{lg}!={ln}",file=logFile)
            return None
        return lg

    def lookupGeograpy(self,locationText:str):
        '''
        lookup the given location by the given locationText
        '''
        locations=self.locationContext.locateLocation(locationText)
        if len(locations)>0:
            return locations[0]
        else:
            return None

Hi, I'm not sure I follow the example provided. For example, what are those locMap, and others list provided?

The predefinedLocations are completly optional and try to fix cases that were not properly solved by the voting process at the time of creation of the code. The key is to ask to different services and find out whether they agree. You might want to have a more blackbox view on the code although i provided all the details.
Location Lookup Overview
The LocationLookup class is designed to handle the complexities of geographical location determination. It leverages predefined mappings and external services to ensure accurate and reliable location data.
Class Diagram

Plantuml source code
Diagram Description

LocationLookup: Main class that provides methods to initialize location settings, perform location lookups using predefined data, and integrate results from different geolocation services.
LocationContext: Provides context-specific configuration and caching mechanisms.
NominatimWrapper: Interfaces with the Nominatim API to fetch geographical data based on location text.

Core Functionalities

initPredefinedLocations(): Sets up predefined location data to handle known edge cases.
lookup(): Main method to perform location lookups. It cross-references multiple data sources to confirm location accuracy.
lookupNominatim() and lookupGeograpy(): These methods are used to fetch location data from specific APIs and compare their results for consistency and accuracy.

The diagram illustrates how LocationLookup interacts with LocationContext and NominatimWrapper to provide comprehensive location resolution services. It is designed to handle ambiguities and discrepancies in location data retrieval, ensuring high reliability.

Maybe not a black box view of the code, but this class is not in the documentation and the README shows an example using:
import geograpy
url = 'https://en.wikipedia.org/wiki/2012_Summer_Olympics_torch_relay'
places = geograpy.get_geoPlace_context(url=url)

as previously noted. This is quite different from having to create a class, call two distinct functions, and then compare their respective outputs.


Fix support of [target.'cfg(...)'] syntax for rustc and rustdoc flags

Support of [target.'cfg(...)'] for rustc and rustdoc flags is buggy.
This adds meaningful tests and fixes the issue.
Fixes #3499

r? @matklad
(rust_highfive has picked a reviewer for you, use r? to override)

@bors: r+
Thanks!

:pushpin: Commit 828247a has been approved by alexcrichton

:hourglass: Testing commit 828247ac1e51e4d5908a0581fe02d527b36ee105 with merge 5a5fe12cc369561ad5ed9bf3024d892bd6356c9a...

:sunny: Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 5a5fe12cc369561ad5ed9bf3024d892bd6356c9a to master...


Implementation of service area server

Fixes #33365.
This PR implements the Service Area cluster server. The Instance / Delegate pattern used for the Mode Base and Operational State clusters has been used.
This PR builds on top of #33569 and #33752.
This PR also adds a service area cluster to the RVC example app. It is not yet properly integrated with RVC app logic but it implements all the necessary methods to test attribute access. Further work on the RVC app is covered by issue #33367.

Manual merging: github CI seems broken somehow (java tests hang, restyler does not work)


content collections tutorial

Description (required)
This removes the individual "Extend the tutorial with Content Collections" tutorial and instead add a "bonus/optional" section to the existing blog tutorial
Closes #10025
In particular:

at this draft stage, provides TWO alternatives (we need to choose only one!) for adding this to the tutorial: as "6.4" or as an optional unit 7
lightly edits text for context, now that it is part of the existing tutorial
includes create astro updates introduced in https://github.com/withastro/astro/pull/12083 (minimal option must be chosen via template flag, is no longer a menu item; Typescript template is automatically set to strict)
Includes a redirect
updates the tutorial extension as a "next step" card at the end of the tutorial

Still to do:

update any code samples as necessary now that the template uses the strict TypeScript setting
choose a strategy for where this content is added (new unit? Bonus after Congratulations?)
make sure the redirect is correct for our chosen location of the new content!
update the github repo for the blog tutorial code content-layer branch

at this draft stage, provides TWO alternatives (we need to choose only one!) for adding this to the tutorial: as "6.4" or as an optional unit 7

I'd say an unit 7 could be better:

Because this part seems a bit long.
If we want to encourage people to use Content Collections instead of the layout: property in the frontmatter of MD files. But, in both cases, it might seem weird after the "Congratulations" part.

Suggestion:

Make a Content Collection (optional) could be a separate unit, just after Check in: Unit 6 - Astro Islands.
We move Congratulations (6.3) in an unit 8.
We add a CardLink at the beginning of unit 7 Make a Content Collection (optional), with something like Skip this optional unit.

It's just an idea... maybe it can be improved. And it depends on the intention: to discourage the use of layout: or not.

So one immediate problem with a Unit 7 (and holy cow, no unit 8!!) is how our tracker was designed to fit 6 units 😅

Also, as you yourself said, the tutorial is LONG. And all you can see when you start is the unit numbers, not for example, that the last one is optional... This is why I am leaning towards being in Chapter 6 (even if the unit title is a little weird for that) and specifically showing it AFTER congratulations in that way.

If we want to encourage people to use Content Collections instead of the layout: property in the frontmatter of MD files

Well, we want to give them the option of learning it, but think of how many Astro sites are 1 page portfolios that don't need a collection! (And a lot of new concepts specific to that feature.) That's in part why the tutorial emphasizes the file-based routing and had an additional add-on for those who do have sets of data to manage.
So, I would say it's not necessarily a given that the tutorial should push towards collections, but should make it available.

Secret bonus track!! 😄

Lunaria Status Overview
🌕 This pull request will trigger status changes.

Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File
Note

en/tutorial/1-setup/2.mdx
Source changed, localizations will be marked as outdated.

en/tutorial/3-components/4.mdx
Source changed, localizations will be marked as outdated.

en/tutorial/5-astro-api/1.mdx
Source changed, localizations will be marked as outdated.

en/tutorial/5-astro-api/2.mdx
Source changed, localizations will be marked as outdated.

en/tutorial/5-astro-api/3.mdx
Source changed, localizations will be marked as outdated.

en/tutorial/6-islands/4.mdx
Localization added, will be marked as complete.

en/tutorial/7-collections/index.mdx
Localization added, will be marked as complete.

Warnings reference

Icon
Description

🔄
The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

OK, thanks to @ArmandPhilippot for evaluating the code samples and making the neccessary updates!


Extension of PBC code to 1D

Hi, I was wondering if there are any plans to extend the code for calculations in periodic boundary conditions to different choices of dimensionality, for example to the one-dimensional case. Thanks!

We don't have any plans to do so at the moment. You're welcome to submit a
pull request if you'd like to try it yourself.
On Fri, Jul 28, 2023, 11:33 AM Elia Steve @.***> wrote:

Hi, I was wondering if there are any plans to extend the code for
calculations in periodic boundary conditions to different choices of
dimensionality, for example to the one-dimensional case. Thanks!
—
Reply to this email directly, view it on GitHub
https://github.com/deepmind/ferminet/issues/63, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABDACAO3JTV2AMZLSHHZWLXSOIRDANCNFSM6AAAAAA23KCUTQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

That sounds about right. Let us know if you run into any issues.
On Fri, Jul 28, 2023, 4:09 PM Elia Steve @.***> wrote:

I see. I was thinking that, apart from setting system.ndim=1 in the
config, I would need to rewrite the parts of the code implementing the
envelopes, hamiltonian and feature layer and then "plug them in" to the
rest of the code by setting the appropriate variables in the config
(network.make_envelope_fn and so on). Does this sound right? Thanks.
—
Reply to this email directly, view it on GitHub
https://github.com/deepmind/ferminet/issues/63#issuecomment-1655858846,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABDACADZVRVDM5LTDHZEC3XSPIZHANCNFSM6AAAAAA23KCUTQ
.
You are receiving this because you commented.Message ID:
@.***>

Ok, thanks a lot for your replies! I'm closing the issue for now.

So, it seems I have actually run into a bit of an issue. I tried adapting the parts of the original code implementing the envelopes, hamiltonian and feature layer to 1D instead of rewriting them from scratch to make sure the code would work before starting to optimize it. This is the code for the feature layer (which mostly works as-is by setting ndim = 1, the only thing I rewrote was the periodic norm)
from typing import Optional, Tuple

import chex
from ferminet import networks
import jax.numpy as jnp

def periodic_norm_1d(metric: jnp.ndarray, scaled_r: jnp.ndarray) -> jnp.ndarray:
    del metric #unused
    return jnp.sin(jnp.pi*scaled_r[..., 0])/jnp.pi#Divide by pi to recover the euclidean norm in the limit of small scaled_r

#Same function as in the original code, just uses my norm.
def make_pbc_feature_layer_1d(
    natoms: Optional[int] = None,
    nspins: Optional[Tuple[int, ...]] = None,
    ndim: int = 1,
    rescale_inputs: bool = False,
    lattice: Optional[jnp.ndarray] = None,
    include_r_ae: bool = False,
) -> networks.FeatureLayer:
  """Returns the init and apply functions for periodic features.

  Args:
      natoms: number of atoms.
      nspins: tuple of the number of spin-up and spin-down electrons.
      ndim: dimension of the system.
      rescale_inputs: If true, rescales r_ae for stability. Note that unlike in
        the OBC case, we do not rescale r_ee as well.
      lattice: Matrix whose columns are the primitive lattice vectors of the
        system, shape (ndim, ndim).
      include_r_ae: Flag to enable electron-atom distance features. Set to False
        to avoid cusps with ghost atoms in, e.g., homogeneous electron gas.
  """

  del nspins

  if lattice is None:
    lattice = jnp.eye(ndim)

  # Calculate reciprocal vectors, factor 2pi omitted
  reciprocal_vecs = jnp.linalg.inv(lattice)
  lattice_metric = lattice.T @ lattice

  def init() -> Tuple[Tuple[int, int], networks.Param]:
    if include_r_ae:
      return (natoms * (2 * ndim + 1), 2 * ndim + 1), {}
    else:
      return (natoms * (2 * ndim), 2 * ndim + 1), {}

  def apply(ae, r_ae, ee, r_ee) -> Tuple[jnp.ndarray, jnp.ndarray]:
    # One e features in phase coordinates, (s_ae)_i = k_i . ae
    s_ae = jnp.einsum('il,jkl->jki', reciprocal_vecs, ae)
    # Two e features in phase coordinates
    s_ee = jnp.einsum('il,jkl->jki', reciprocal_vecs, ee)
    # Periodized features
    ae = jnp.concatenate(
        (jnp.sin(2 * jnp.pi * s_ae), jnp.cos(2 * jnp.pi * s_ae)), axis=-1)
    ee = jnp.concatenate(
        (jnp.sin(2 * jnp.pi * s_ee), jnp.cos(2 * jnp.pi * s_ee)), axis=-1)
    # Distance features defined on orthonormal projections
    r_ae = periodic_norm_1d(lattice_metric, s_ae)
    if rescale_inputs:
      r_ae = jnp.log(1 + r_ae)
    # Don't take gradients through |0|
    n = ee.shape[0]
    s_ee += jnp.eye(n)[..., None]
    r_ee = periodic_norm_1d(lattice_metric, s_ee) * (1.0 - jnp.eye(n))

    if include_r_ae:
      ae_features = jnp.concatenate((r_ae[..., None], ae), axis=2)
    else:
      ae_features = ae
    ae_features = jnp.reshape(ae_features, [jnp.shape(ae_features)[0], -1])
    ee_features = jnp.concatenate((r_ee[..., None], ee), axis=2)
    return ae_features, ee_features

  return networks.FeatureLayer(init=init, apply=apply)

This is the code for the envelopes (I just rewrote make_kpoints to give 1D "vectors", and this gives the correct value for the arguments of sine, cosine)
from typing import Mapping, Optional, Sequence, Tuple, Union
import jax.numpy as jnp

def make_kpoints_1d(
    lattice: Union[jnp.ndarray, jnp.ndarray],
    spins = Tuple[int, int],
    min_kpoints: Optional[int] = None
) -> jnp.ndarray:
    if min_kpoints is None:
        min_kpoints = sum(spins)
    elif min_kpoints < sum(spins):
        raise ValueError("Number of kpoints must be greater than number of electrons")

    #kpts will be of the form i*mod, with i an integer between -n and n inclusive
    mod = 2*jnp.pi/lattice[0][0]
    if min_kpoints%2 == 1: n = min_kpoints
    else: n = min_kpoints + 1 #In 1d always generate an odd number of pts
    n //= 2

    kpoints = mod*jnp.arange(-n, n+1, 1)
    #If the first kpt is zero the envelope evaluates to 1 at the beginning of training
    kpoints = jnp.concatenate((kpoints[n:], kpoints[:n]))
    return kpoints[:, None]

The systems I've been testing the code on are ideal gases, so the hamiltonian is just the kinetic energy part, and again the code is very similar to the original since when computing the laplacian the coordinate vector used is flattened anyway
from ferminet import networks
from ferminet import hamiltonian
import jax.numpy as jnp
from typing import Sequence

def local_energy_free_particles(
    f: networks.FermiNetLike,
    charges: jnp.ndarray,
    nspins: Sequence[int],
    use_scan: bool = False,
    complex_output: bool = False,
) -> hamiltonian.LocalEnergy:
    """Just a wrapper with a signature that matches the one of
    hamiltonian.MakeLocalEnergy"""

    del nspins, charges
    ke = hamiltonian.local_kinetic_energy(
        f,
        use_scan=use_scan,
        complex_output=complex_output
    )
    def _e_l(params, key, data):
        del key
        kinetic = ke(params, data)
        return kinetic

    return _e_l

This is one of the scripts I'm trying to run:
import sys
import subprocess as sp
import os
import time

from absl import logging
import jax
import jax.numpy as jnp

from ferminet import base_config as cfg
from ferminet.utils import system as system
from ferminet import train
from ferminet.pbc import envelopes

from pbc_1d import envelopes_1d as env
from pbc_1d import feature_layer_1d as fl
from pbc_1d import hamiltonian_1d as ham

def main():
    # Optional, for also printing training progress to STDOUT.
    # If running a script, you can also just use the --alsologtostderr flag.
    logging.get_absl_handler().python_handler.stream = sys.stdout
    logging.set_verbosity(logging.INFO)

    lattice = jnp.array([[5]]) #Matrix with lattice vectors as columns
    placeholder_atom = system.Atom(
      symbol = "X", #"Element" with atomic number 0
      charge = 0,
      coords = (0.,)
    )

    my_config = cfg.default()

    my_config.system.ndim = 1
    my_config.system.molecule = [placeholder_atom]
    systems = [(1, 1)]

    my_config.pretrain.iterations = 0
    my_config.optim.lr.rate = 1e-4

    my_config.network.make_feature_layer_fn = "pbc_1d.feature_layer_1d.make_pbc_feature_layer_1d"
    my_config.network.make_feature_layer_kwargs = {"include_r_ae":False, "lattice":lattice}
    my_config.network.make_envelope_fn = "ferminet.pbc.envelopes.make_multiwave_envelope"
    my_config.system.make_local_energy_fn = "pbc_1d.hamiltonian_1d.local_energy_free_particles"
    #The following is only used for the potential energy
    #my_config.system.make_local_energy_kwargs = {"lattice": lattice}
    my_config.network.determinants = 16
    my_config.log.save_frequency = 5.
    my_config.optim.iterations = 100

    my_config.debug.deterministic = True

    A = 1e4
    C = 1.
    B = 1

    my_config.optim.lr.rate = B/(A**C)
    my_config.optim.lr.decay = C
    my_config.optim.lr.delay = A

    for spin_pair in systems:
        print("Running spin_pair", spin_pair)
        my_config.system.electrons = spin_pair
        #If even, make_kpoints will add one
        min_kpoints = spin_pair[0] + spin_pair[1] + 1
        kpoints = env.make_kpoints_1d(lattice, my_config.system.electrons, min_kpoints = min_kpoints)
        print("kpoints:", kpoints)
        my_config.network.make_envelope_kwargs = {"kpoints":kpoints}
        train.train(my_config)

if __name__ == "__main__":
    main()

There are are a couple of indicators that there is a problem with the code:

Calculations for 1, 2 electrons (unpolarized) seem to correctly converge to zero energy, but the ones for 3, 4, 5 (unpolarized) seem to converge to an energy lower than the one obtained theoretically. I have also run ideal gas calculations in 3D which seem to converge to the theoretical value. Here are plots for the energy of the 1D systems:
energy (1, 0).pdf
energy (1, 1).pdf
energy (2, 1).pdf
energy (2, 2).pdf
energy (3, 2).pdf

On some of the calculations (2, 5 electrons, unpolarized) the energy fluctuates widely in the first few hundred iterations, then it stabilizes. Here are blow-ups of the relevant plots:
energy (1, 1) beginning.pdf
energy (3, 2) beginning.pdf

I've also plotted the wavefunctions for 1, 2 electrons unpolarized:

I ran a calculation for the 2 electron polarized gas to make sure that the wavefunction would come out antisymmetric, and it does:

(Here energy (2, 0).pdf is the energy during training for this last calculation)
Any ideas what the problem might be? Thanks, and sorry for the long post.

If your calculation is non-variational, then likely causes:

your wavefunction is not actually anti-symmetric. After network initialisation, generate some random positions and evaluate the network. Then, swap the positions of two electrons of the same spin and re-evaluate the network -- this should give the negative of the values obtained in the firsts evaluation. If not, you have a bug somewhere.
you are not sampling psi^2 correctly. This can happen at the start of a calculation. Run the MCMC burn in for longer. [This is a good idea anyway...]

Finally you might just need to train for longer.
[The N=(2,1) case looks to converge to 0.4, though hard to tell from the plot. If so, this is a bit suspicious...]

Yeah, I thought the N=(2, 1) case converging to 0.4 (the theoretical energy is supposed to be 0.79 and the 3D case seems to converge to this value pretty well) was suspicious too: if the energy had been higher than the theoretical one I could have thought it just hadn't come to convergence yet, but I doubt then that the energy would be lower. The 3D cases also seemed to converge to a few hundredths of an Hartree of the theoretical value in a number of iterations of the order of 10000.
I have run the (2, 1) calculation again with 1000 and 5000 burn-in steps (the original one was with the default of 100) and I get very similar results to the original calculation.
I have also tested the wavefunction for antysymmetry and it seems to be ok, however there appears to maybe be a problem with the periodic boundary conditions: I will run tests on that and also try testing the hamiltonian with exact wavefunctions. I am marking this as closed for now and I'll reopen the issue if I run into any more problems. Thanks a lot for the help.


Issue with Ensemble model.

When I want to use Ensemble model, like the tutorial"
resp_obj = DeepFace.verify("img1.jpg", "img2.jpg", model_name = "Ensemble")
I get the following error:
There is an error with this image and modelCould not open /usr/local/lib/python3.6/dist-packages/deepface/models/face-recognition-ensemble-model.txt
How we can solve that?
the library version is 0.0.31

It is interesting. face-recognition-ensemble-model.txt is in here: https://github.com/serengil/deepface/tree/master/deepface/models
Could you share what exist in /usr/local/lib/python3.6/dist-packages/deepface/
PS: If you copy the txt file I shared in the path specified in exception message, it will work.

Yeah, it's so strange! There is nothing in this path (.../deepface/models) except for init.py!
I used pip install deepface

Could you try to run the following command?
pip install deepface==0.0.31 --ignore-installed

Oke, I understand the problem. I will fix in 0.0.32 version. Until it is solved, you can copy the txt file manually.

new version is released. could you try it right now?

new version is released. could you try it right now?

Unfortunately Not!
Another most strange thing is when I add this file on models directory and run my code both on Google Colab and on local my kernel dies!

deepface 0.0.32 comes with this txt file, you don't need to copy it anymore.
BTW, ensemble method requires lightgbm. Could you run the command "pip install lightgbm==2.3.1" before importing deepface.

It didn't solve my problem.
you can reach our my code in the following link. you can edit it if you want.
[https://colab.research.google.com/drive/1Vgn5FO52zz9awrQMtvtDUVJW9tRUwvvz?usp=sharing](Google Colab)
In the fourth cell, I got this error:
LightGBMError: Could not open /usr/local/lib/python3.6/dist-packages/deepface/models/face-recognition-ensemble-model.txt

Oke, that's a bug, I will resolve it soon.

I released version 0.0.33. Could you install this version and try again please?

It's work!!!!

I am very excited to know what is the problem since I read your code and I did not notice what's the problem.

Let me explain the problem, maybe this helps some people having same trouble
Firstly, ensemble model needs .txt file and I stored in the repo: https://github.com/serengil/deepface/tree/master/deepface/models
Even though this text file exists in the repo, this won't be uploaded to PyPI. Before 0.0.32, this does not exist in the repo.
Then, I found that if you add this text file as script in setup.py, then this will be uploaded to pypi.
scripts=['deepface/models/face-recognition-ensemble-model.txt'],
Even though this is uploaded to pypi, this won't be copied when you call pip install command. That's why, I downloaded this text file externally in the code.
DeepFace.py
home = str(Path.home())

if os.path.isfile(home+'/.deepface/weights/face-recognition-ensemble-model.txt') != True:
	print("face-recognition-ensemble-model.txt will be downloaded...")
	url = 'https://raw.githubusercontent.com/serengil/deepface/master/deepface/models/face-recognition-ensemble-model.txt'
	output = home+'/.deepface/weights/face-recognition-ensemble-model.txt'
	gdown.download(url, output, quiet=False)

ensemble_model_path = home+'/.deepface/weights/face-recognition-ensemble-model.txt'

deepface_ensemble = lgb.Booster(model_file = ensemble_model_path)

Funnily, this text file will be downloaded from GitHub repo :)

PS: do not forget to star the repo please :)

Thank you for your complete response.


Convert CSV with first column with no name failed

Hello
You plugin is very great and helpfull. But I have one problem.
When I convert a tow column CSV with no name on the first columns it's failed :
;NAME
A;1
B;2
give me

;NAME

A;1

B;2

Is there anything I didn't see ?
PS : It's OK with more columns (3 or more)

I'm tried to figure out this issue with below sample :
;NAME
A;1
B;2

But i could not find any issues.
I need more information related this issue.
Thank you for your reporting.

This issue has been closed because there has been no response.
With only the information that is currently in the issue, i don't have enough information to take action.
Please reach out if you have or find the answers i need so that i can investigate further.


0000-01-02-saahoadydeva.md

Welcome to our second slide page of github page.

great and enjoyfull


[suggestion] (a touch) longer cooldown on the evocator fangs

as it currently stands, when the fangs start showing means I must run around until he stops casting them if I was trying to eat instead of getting in position to retaliate against him while casting with my axe/sickle, however sometimes he seems to attack immediately again right after stopping, making sure he cant attack immediately would let the player get to eat a bit more reliably.
LOVING the lil guy btw, he's the only mob that's consistently capable of killing me.
whenever I hear the thunder and that laugh echoing my reaction is always either happiness or fear.
great job on this mood setting mod!

I just realised I should probably be using a bow on it while its casting instead of trying to get to melee range ...

Fixed with baedeb27e30de99b31868100138541e8fdfc3d78.

I was actually about to comment on this again today! made a new world and the first one that spawned successfully managed to kill me because i didnt have a moment to breathe and eat to regen, and now I see this updated hours ago!
so excited to check this out!


Add active refinements info for the menu, hierarchicalMenu and the refinementList widgets

Would be great to add more info in the markup about the active. That would help to build UI/UX where the list of those possible filter items are hidden.
We could for instance imagine to have:

add a class at the top level that there is 1 or more items selected
add a count value in the ais-menu--header to indicate how many items have been selected (+ extra attribute, to get that value easily accessible programmatically)

    Cuisine 1

     ...

What do you guys think?

Like that!

I love the idea, but wondering about retro-compatibility. Adding the count in the default template of the header might break a lot of designs. And it makes much more sense for UI where the list is hidden, not so much when it is displayed.

Adding a data-attribute should be trivial
Adding an __active class on the header if a filter is selected should be doable as well
Instead of changing the default template, I would simply pass the count to the template, and let users use this information or not in their design.

WDYT?

Adding an __active class on the header if a filter is selected should be doable as well
Instead of changing the default template, I would simply pass the count to the template, and let users use this information or not in their design.

:+1:

Adding a data-attribute should be trivial

What is the goal of having data-active-items="1" in your current demo @seafoox?

If you have the correct attribute on an element, you can easily add the count through CSS with
:after {
  content: attr('data-active-items');
}

If you have the correct attribute on an element, you can easily add the count through CSS with

I understand but at the same time this would be the first time we include data this way, I would first just pass the data in the template and build the same without the need to have another data attribute.
Every css class or data attribute we add raise the surface of the API (and raise the complexity).

You're right. @seafoox did you had any other need for the attribute that could not be fixed by a specific CSS class?

I could eventually be interesting to have the list of active refinements at the root level. But I don't have any use case yet. So for now, I'd say no, I don't see any other need for the attribute that could not be fixed by a specific CSS class.