Does it not support the following methods

Describe the bug
Does it not support the following methods,"$..book[(@.length-1)]"
To Reproduce
Steps to reproduce the behavior:
jsonData：
{
	"store": {
		"book": [{
				"category": "reference",
				"author": "Nigel Rees",
				"title": "Sayings of the Century",
				"price": 8.95
			}, {
				"category": "fiction",
				"author": "Evelyn Waugh",
				"title": "Sword of Honour",
				"price": 12.99
			}, {
				"category": "fiction",
				"author": "Herman Melville",
				"title": "Moby Dick",
				"isbn": "0-553-21311-3",
				"price": 8.99
			}, {
				"category": "fiction",
				"author": "J. R. R. Tolkien",
				"title": "The Lord of the Rings",
				"isbn": "0-395-19395-8",
				"price": 22.99
			}
		],
		"bicycle": {
			"color": "red",
			"price": 19.95
		}
	}
}

i4, _ := jsonpath.Retrieve("$..book[(@.length-1)]", src)

2、result：[]
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Hi xiaoyaoke-zx,
I believe the JSONPath written in the reproduction resulted in the empty because it tried to find with a key exactly matching "length-1", but does not found.
I would like to confirm the expected behavior, is 👇this the kind of output you want? In other words, the last item.
[{"author":"J. R. R. Tolkien","category":"fiction","isbn":"0-395-19395-8","price":22.99,"title":"The Lord of the Rings"}]

If this is the kind of result you want, I feel the Aggregate function could be used:
package main

import (
	"encoding/json"
	"fmt"
	"reflect"

	"github.com/AsaiYusuke/jsonpath"
)

func main() {
	config := jsonpath.Config{}
	config.SetAggregateFunction(`lastItem`, func(params []interface{}) (interface{}, error) {
		return params[len(params)-1], nil
	})
	jsonPath := `$..book[*].lastItem()`
	srcJSON := `{
		"store": {
			"book": [{
					"category": "reference",
					"author": "Nigel Rees",
					"title": "Sayings of the Century",
					"price": 8.95
				}, {
					"category": "fiction",
					"author": "Evelyn Waugh",
					"title": "Sword of Honour",
					"price": 12.99
				}, {
					"category": "fiction",
					"author": "Herman Melville",
					"title": "Moby Dick",
					"isbn": "0-553-21311-3",
					"price": 8.99
				}, {
					"category": "fiction",
					"author": "J. R. R. Tolkien",
					"title": "The Lord of the Rings",
					"isbn": "0-395-19395-8",
					"price": 22.99
				}
			],
			"bicycle": {
				"color": "red",
				"price": 19.95
			}
		}
	}`
	var src interface{}
	json.Unmarshal([]byte(srcJSON), &src)
	output, err := jsonpath.Retrieve(jsonPath, src, config)
	if err != nil {
		fmt.Printf(`%v, %v`, reflect.TypeOf(err), err)
		return
	}
	outputJSON, _ := json.Marshal(output)
	fmt.Println(string(outputJSON))
}

It seems that giving index -1 indicates the last item, and no Aggregate function was needed here.
package main

import (
	"encoding/json"
	"fmt"
	"reflect"

	"github.com/AsaiYusuke/jsonpath"
)

func main() {
	jsonPath := `$..book[-1]`
	srcJSON := `{
		"store": {
			"book": [{
					"category": "reference",
					"author": "Nigel Rees",
					"title": "Sayings of the Century",
					"price": 8.95
				}, {
					"category": "fiction",
					"author": "Evelyn Waugh",
					"title": "Sword of Honour",
					"price": 12.99
				}, {
					"category": "fiction",
					"author": "Herman Melville",
					"title": "Moby Dick",
					"isbn": "0-553-21311-3",
					"price": 8.99
				}, {
					"category": "fiction",
					"author": "J. R. R. Tolkien",
					"title": "The Lord of the Rings",
					"isbn": "0-395-19395-8",
					"price": 22.99
				}
			],
			"bicycle": {
				"color": "red",
				"price": 19.95
			}
		}
	}`
	var src interface{}
	json.Unmarshal([]byte(srcJSON), &src)
	output, err := jsonpath.Retrieve(jsonPath, src)
	if err != nil {
		fmt.Printf(`%v, %v`, reflect.TypeOf(err), err)
		return
	}
	outputJSON, _ := json.Marshal(output)
	fmt.Println(string(outputJSON))
}

year,What is needed is the last item in the “book”.
It is possible to write this way：
i4, _ := jsonpath.Retrieve("$..book[-1:]", src)

Since the last item is wanted, -1 is the easiest. 👍
Similar test code is here:
https://github.com/AsaiYusuke/jsonpath/blob/250c63894a0aada36d4e1ede9dbb079848abca47/test_jsonpath_test.go#L1825-L1827

year,-1 is the best👍. I saw http://jsonpath.com support it, so I asked a question.
Thank you for your answer 🤝 .

Thanks for the helpful site references, the web interface is nice!
The consensus seems to be that this length syntax is not supported.
https://cburgmer.github.io/json-path-comparison/results/script_expression.html

year,I use -1, which is simpler.


Kotlin integration

I want to integrate the library with Kotlin but in my activity_main.xml file the class LuckyWheel is not found. How can i load it there?

since it's a normal java library it should be found


Revert "Convert HEIC to JPG on upload for darwin"

Reverts keybase/client#26325
Backing this out to add mobile support

cc @mmaxim


[BUG] Doesn't work with clojure-lsp attempt to index local 'data' nil

Describe the bug
When trying to use goto-preview with clojure lsp, I get the following error ...m/site/pack/packer/opt/goto-preview/lua/goto-preview.lua:15: attempt to index local 'data' (a nil value)
Expected behavior
no error, normal behavior
Baseline (please complete the following information):

OS. e.g MacOs
Neovim version nightly
URL to your current config (if public)

Duplicate of #37


Add context for highlight element and update the example.

Hi, I've added a 'context' options for highlight element in specific element, cause for a project I'm working on now I need to keep an area focused while I'm focusing the element in the rest of the application.
Give it a look, thanks.

Merged. Thanks. I'll check it in detail before bump a new version


root factory explodes in IE11

you common root factory will throw an uncaught exception when parsing stack traces in ie11:
line 53 i factories.js
        // generate the stack trace
        Error.stackTraceLimit = config.stackLength + 2;
        stack = (new Error()).stack.split('\n'); <- BOOOOM
        stack.splice(0, 3);
        stack.unshift('');
        Error.stackTraceLimit = originalStackLength;
        this.stack = stack.join("\n'";

quick fix instead of bothering with ie11
  // generate the stack trace
    Error.stackTraceLimit = config.stackLength + 2;
    try{
      stack = (new Error()).stack.split('\n');
      stack.splice(0, 3);
      stack.unshift('');
    }catch(e){
      stack = ["failed getting stack trace."];
    }

     Error.stackTraceLimit = originalStackLength;
     this.stack = stack.join('\n');

Nice fix. Thanks for find, reporting, and finding a solution for this bug. I've updated this on Github and published to NPM as version 2.1.2.


left_sidebar: Update remaining gray left sidebar elements.

This PR introduces the new unread-counter colors from @terpimost (https://terpimost.github.io/zulip-sidebar/), as well as the colors for DM partner icons, with the exception of user circles (which maintain their gray in Vlad's design, albeit as dots and with a different set of colors than currently in use).
Likely points of CZO discussion here:

The three levels of unread-counter prominence, including the 'quiet' ones for Drafts, Starred messages, and Scheduled messages, which here have their border removed, in keeping completely with Vlad's work. As an experiment, summary counters (Channels, Direct Messages) are also shown in the 'quiet' style.
Changes to both Recent conversations and Inbox views when applying the new colors. Especially in dark theme, there's little distinction between the 'normal' and 'prominent' (DM) levels of gray.
The uncanny-valley of hovered unreads on the collapsed views section, which might look better taking the same purple-hover background as the collapsed views icons themselves (though that would introduce yet another background color for unreads).

Screenshots and screen captures:

Sidebars light, before
Sidebars light, after

Sidebars dark, before
Sidebars dark, after

Inbox, before
Inbox, after

Recent conversations, before
Recent conversations, after

Self-review checklist

[ ] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[ ] Each commit is a coherent idea.
[ ] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

This looks good to me; I went ahead and merged so we can get development environment testing on this as well. Presumably future changes to the colors will just be editing CSS variables if we decide they're warranted.


[Node.js] Fix getCameraInfo crash issue

getCameraInfo() of Device and Sensor would return undefined
for unsupported camera_info type instead of crash

PTAL, thanks. @halton


FFS...

Closing this issue


[BUG] Wrong compiler is being used

Describe the bug
Compiling a C extension and I am using the Extension class from setuptools. I set the language to C++ and an extra compiler arg and an extra link arg of -std=c++11. I set an environment variable of DISTUTILS_DEBUG to 1 so distutils dumps the maximum  amount of debugging information then I run the script.
This is the output specific to the cython portion of things.
building '_libopenzwave' extension
creating build/temp.linux-x86_64-cpython-310/_libopenzwave

gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DPY_LIB_VERSION=0.5.0 -D_MT=1 -D_DLL=1 -DPY_LIB_FLAVOR=release -DPY_LIB_BACKEND=cython -DCYTHON_FAST_PYCCALL=1 -DPY_SSIZE_T_CLEAN=1 -I_libopenzwave -I/mnt/c/Users/drsch/PycharmProjects/libopenzwave/openzwave/cpp/src -I/mnt/c/Users/drsch/PycharmProjects/libopenzwave/openzwave/cpp/src/value_classes -I/mnt/c/Users/drsch/PycharmProjects/libopenzwave/openzwave/cpp/src/platform -I/mnt/c/Users/drsch/PycharmProjects/libopenzwave/openzwave/cpp/src/command_classes -I/mnt/c/Users/drsch/PycharmProjects/libopenzwave/openzwave/cpp/src/aes -I/mnt/c/Users/drsch/PycharmProjects/libopenzwave/openzwave/cpp/src/tinyxml -I/mnt/c/Users/drsch/PycharmProjects/libopenzwave/openzwave/cpp/build/linux -I/usr/include/python3.10 -c _libopenzwave/_libopenzwave.cpp -o build/temp.linux-x86_64-cpython-310/_libopenzwave/_libopenzwave.o -Wno-builtin-macro-redefined -Wno-deprecated-declarations -Wno-deprecated -Wno-unreachable-code-fallthrough -std=c++11

g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -std=c++11 build/temp.linux-x86_64-cpython-310/_libopenzwave/_libopenzwave.o build/temp.linux-x86_64-cpython-310/lib_build/libopenzwave.a -L/usr/lib/x86_64-linux-gnu -lresolv -o build/lib.linux-x86_64-cpython-310/_libopenzwave.so

The first thing is duplicate arguments being passed to the compilers. Not sure why that is happening. You can see my extra arguments on the first compiler call at the end.
That is not the problem. The problem is the gcc compiler being called when I specified the C++ language. If I delete the   .o and .so files that are made and change the gcc to g++ and paste it into the console and paste the second command into console the shared library gets created properly and I am able to use it. Using the gcc compiler causes none of the objects I created in the pyx file to get exported.
I am not sure if this is going to be a setuptools blunder (wouldn't be shocked if it is) or does Cython take care of making the calls to the compiler and linker... This is going to sound bad but I really do hope the problem is in Cython because I have been trying to get the folks that work on setuptools to fix the Windows compiler detection now for 4-5 years and they simply do not want to do anything about it. I have written a script that properly sets up a windows build environment without using the VCVARS* batch files (which don't work properly 100% of the time) and what I wrote works for VS2008 to current with all NET SDK's, Tools, Windows SDK's and all of the other things that go along with the different VS versions. It also works with Visual C and Microsoft Build Tools. Still they would not fix what they have even when I gave them the code.
I know you guys are on the ball and get things fixed right quick as you have fixed an issue with Stackless Python for me in the past. So I hope the problem is a Cython one. Otherwise I am going to have to monkey patch setuptools for linux compilations on top of already have had to do it for Windows.
Code to reproduce the behaviour:
# example code

Expected behaviour
having the functions, classes and attributes exported properly in the extension module.
Environment
Ubuntu 20.04.5
CPython 3.10.8
Cython 0.29.32
Additional context
No response

I found the problem and it doesn't have top do with Cython or setup tools. I am not sure why but I am not able to import the so file right after i has been built.  What I am doing is generating a stub file for the extension then the build program runs. In order for me to be able to import the file I have to create a subprocess and run the build script using that and then the file gets imported correctly.  I don't know why it is like that. Same code being used to create the stub file just have to run python again after the extension module is made in order for it to properly populate the exports in the file. No errors when importing it at all it just shows as an empty extension module.


can we compress the video in react native(android only) with using this library ? Is it possible ?

Current Behavior
It compressing the video in IOS but is it possible in android ?
Expected Behavior
We should be able to compress the video in android also.
Your Environment

software
version

react-native-video-processing

react-native

node

Yes - It's possible


no .meta in the pretrain dataset

Hi, I
I want to use the pretrained model directly (load the model) but I only find the model check-point and there is no .meta which saved the model. Can anyone tell me how can I get the .meta file?
Thanks.

Can any one advise where to get the .meta file?  I thought we need this to convert checkpoint to PB file?


RFP - Disk Usage

Checklist

[x] The package I am requesting does not already exist on https://chocolatey.org/packages;
[X] There is no open issue for this package;
[x] The issue title starts with 'RFP - ';
[X] The download URL is public and not locked behind a paywall / login;

Package Details
Software project URL : https://docs.microsoft.com/en-us/sysinternals/downloads/du
Direct download URL for the software / installer : https://download.sysinternals.com/files/DU.zip
Software summary / short description: Command-Line Tool to get disk usage information.
Package Expectations
Just install and be able to run "du" from PowerShell.

This package already exists, is there a problem with it?

Holy moly.  I swear I searched "Disk Usage" and couldn't find it on the website.  I'm so sorry for the trouble.


Mic-4833/sort census

Mic-4833/Sort Census
Sorts census dataset by year and household id.

Category: Feature
JIRA issue: MIC-4833

-sorts census dataset by year and household id
Testing
All tests pass

What does the index on the pseudopeople output dataframe end up looking like? Is it still a simple RangeIndex?

@zmbc Yes It is a range index.

Great, thanks for confirming!


GUI NOT SHOWING UP 1.19.2

The title explains it

What is the version of MCPitanLibarch?

1.19.2


Batch integration result metrics are not in proper range

https://openproblems.bio/benchmarks/batch_integration_embed/immune_batch/
It seems the silhouette is greater than 1? How is that possible if scib is rescaling to [0, 1]?
Also, is there a total score that is being computed to rank the methods? It would be great if that total score was included.

Thanks for the issue @adamgayoso. We are currently rescaling the metrics to a range between a random and perfect baseline in open problems. We were discussing on Tuesday how to best document this on the website. One thought was to enable a toggle between raw and scaled values in the tables. Do you have any thoughts on this?
This rescaling is also used to compute a total score just using mean aggregation. Displaying that would indeed be a good idea.

I like the idea of a toggle and including the mean score (as well as how it's computed; are you doing the 0.6/0.4 split)?

We're not currently doing the 60-40 split to be consistent across tasks. I do think we should, but it's not currently something that is set task-specifically.

To me it makes sense to maybe have a straight average, a bio-biased average, and a batch-biased average? (5050,6040,4060)

hmm... i wonder if that will just over-complicate things. Either way it's not generalizeable across tasks and so would require some exception in the ranking. It should definitely be discussed though.

It still seems like the metrics are in different ranges, yet a simple average of the metrics is being used.
For example, isolated label sil. is >1 for many method and seems to contribute a lot to the ranking right now.

See https://github.com/openproblems-bio/openproblems/issues/685

Also, is there a total score that is being computed to rank the methods? It would be great if that total score was included.

This score is displayed as "Mean score". It's the first column.

Closing as duplicate


File sift-cli-linux.sha256.asc appears to be empty

I am attempting to install the sift-cli on a new system following the guide at:
https://github.com/teamdfir/sift-cli
During the download and verify process, I attempted to download the file:
https://github.com/teamdfir/sift-cli/releases/download/v1.10.0-rc3/sift-cli-linux.sha256.asc
This file appears to to be empty, which means that the following step fails:
Validate the signature gpg --verify sift-cli-linux.sha256.asc

Thanks for the report. Fixed in rc4.

I am currently trying to install on a HyperV Ubuntu 18.04, and when I try to gpg verify "sift-cli-linux.sha256.asc" I get
"gpg: verify signatures failed: Unexpected error"
Is this the correct SHA256 for "sift-cli-linux.sha256.asc" ?
"ad66011043442c34d13ccd1df5553c89e9373da6ae15f73993f69457b596f6e4"
Many thanks for any help.

We have a known issue with the signing at the moment, working to resolve. You are still safe to download from the GitHub releases, this is just extra verification.

1.10.0-rc5 is now fixed.

Cheers for the quick response, just tried it and it works.
Many thanks.


SwiftyHolidays considers LocalDate 2021-12-31 as New Year's Day

Hello,
I was surprised to see that SwiftyHolidays considers 2021-12-31 a holiday in the U.S., specifically New Year's Day. I checked and 2021-12-31 is not a Federal Holiday. In addition, Wall Street was open on that day. Why is then 2021-12-31 considered a holiday?
This is my code snippet:
    func isUnitedStatesHoliday() -> Bool {
        let localDate = self.asLocalDate(in: TimeZone(abbreviation: "EST")!)
        return localDate.isHoliday(in: .unitedStates)
    }

local date looks like:
(lldb) po localDate
▿ LocalDate
  - year : 2021
  - month : 12
  - day : 31

SwiftyHolidays API, public func getHoliday(in country: Country) -> Holiday?, returns:
(lldb) po country.allHolidays(in: year).first { $0.date == self }
▿ Optional<Holiday>
  ▿ some : Holiday
    - name : "New Year\'s Day (observed)"
    ▿ date : LocalDate
      - year : 2021
      - month : 12
      - day : 31

Shouldn't New Year's Day fall on January 1st?

Assuming the data in the package is correct, it appears as if "New Year's Day (observed)" is on December 31st and a holiday if it falls on a Friday, see https://github.com/MaxHaertwig/SwiftyHolidays/blob/master/Sources/SwiftyHolidays/Countries/UnitedStates.swift#L231-L233
"New Year's Day" is on January 1st, see https://github.com/MaxHaertwig/SwiftyHolidays/blob/master/Sources/SwiftyHolidays/Countries/UnitedStates.swift#L34
And then there's some super fun logic around "New Year's Eve", see https://github.com/MaxHaertwig/SwiftyHolidays/blob/master/Sources/SwiftyHolidays/Countries/UnitedStates.swift#L226-L229


Search does not work with large folders

It'll truncate them like on GitHub.
For example enter https://github.com/cdnjs/cdnjs/tree/master/ajax/libs/ and click "Search".

Also it doesn't work at all (neither search nor download) with e.g. this URL:
https://github.com/cdnjs/cdnjs/tree/master/ajax/libs/6px

@julmot

Truncate problem is Github limit, i have no idea to solve it :'(
It was a rate limit problem, I have solved it a few hours ago.

I'm not familiar with the API, but I can't imagine that there isn't a method to receive really all folders and files
The issue is still not solved. Type in for example "https://github.com/cdnjs/cdnjs/tree/master/ajax/libs/mark.js"

I opened a new issue for item 2 as #8


Fix transposing of an empty collection

Transposing methods of empty collection fail because array_map can't work without a second argument.

Will look at this on the weekend if possible, thanks!


Correct cell not found as particle crosses nested model border

Hi,
I am attempting to nest a small scale oceanographic model, which is configured in the Regional Oceanographic Modelling System (NEMO grid; described here: https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2019JC015227) within BRAN 3p5, configured using the Ocean Forecasting Australia Model (which is a configuration of the GFDL Modular Ocean Model; details here: https://wp.csiro.au/bluelink/global/bran/).
I am using version 2.1.4 of Parcels and attempting to run these simulations on the HPC at UNSW (Katana). I have successfully run small scale simulations (i.e. 1 particle released every 4 days from 4 locations) - that is the output looks how I expect it to - however, associated with the output is an error/warning log with the following message:
Correct cell not found for (154.050926, -25.534158) after 1000000 iterations
Debug info: old particle indices: (yi, xi) 314 45
            new particle indices: (yi, xi) 314 226
            Mesh 2d shape:  316 271
            Relative particle position:  (xsi, eta) -6.1320155892265049e-01 1.0127507928492394e+00

When I attempt to scale up to full scale simulations (i.e. 100 particles released daily from 10 locations) the jobs consistently time out with the same error/warning message.
These coordinates roughly match the boundary where particles pass from one model into the next.
The following is the code used to run the simulations:
from parcels import FieldSet, Field, AdvectionRK4, ParticleSet, JITParticle, Variable, BrownianMotion2D, random, NestedField
from parcels import ErrorCode
import numpy as np
from glob import glob
from datetime import timedelta as delta
from datetime import datetime as datetime
import math
import os
from operator import attrgetter

out_dir = '/home/z5278054/Nesting'

npart = 1  # number of particles to be released
repeatdt = delta(days=4)  # release from the same set of locations every X day

# Forward: 9
# lon_array = []
# lat_array = []

# Backwards: 13
lon_array = [153.790]#, 153.799, 153.736, 153.172, 153.048, 152.946, 152.775, 152.312, 152.045, 151.577]
lat_array = [-28.165]#, -28.890, -29.432, -30.864, -31.645, -31.899, -32.193, -32.719, -32.917, -33.578]

lon = np.repeat(lon_array,npart)
lat = np.repeat(lat_array,npart)

array_ref = 0 # which season to simulate (0 = 1994/95, 22 = 2015/16)

# Spawning season is September to March (Heasman et al. 1985)
# Reality language: start date will be 30th August and run until 15th May (the year after) to allow for the full 40 days of tracking.
# Particle reality: the first day of life (and hence the 'start') for particles will be 15th May.

year_array = np.arange(1994, 2016, 1)

start_time = datetime(year_array[array_ref], 8, 30) # year, month, day
end_time = datetime(year_array[array_ref]+1, 5, 10)  #year, month, day

# Set diffusion constants (in m/s)
Kh_zonal = 10
Kh_meridional = 10

# Define BRAN fieldset
filenames_BRAN = {'U': sorted(glob('/srv/scratch/z3374139/BRAN_AUS/Ocean_u_*')),
                  'V': sorted(glob('/srv/scratch/z3374139/BRAN_AUS/Ocean_v_*')),
                  'temp': sorted(glob('/srv/scratch/z3374139/BRAN_AUS/Ocean_temp_*'))}

variables_BRAN = {'U': 'u',
             'V': 'v',
             'temp': 'temp'}

dimensions_BRAN = {}
dimensions_BRAN['U'] = {'lat': 'yu_ocean', 'lon': 'xu_ocean', 'depth': 'st_ocean', 'time': 'Time'}
dimensions_BRAN['V'] = {'lat': 'yu_ocean', 'lon': 'xu_ocean', 'depth': 'st_ocean', 'time': 'Time'}
dimensions_BRAN['temp'] = {'lat': 'yt_ocean', 'lon': 'xt_ocean', 'depth': 'st_ocean', 'time': 'Time'}

indices_BRAN = {'depth': [0]} # surface? not sure how many layers BRAN has

fieldset_BRAN = FieldSet.from_netcdf(filenames_BRAN, variables_BRAN, dimensions_BRAN, allow_time_extrapolation = True)

fieldset_BRAN.add_constant('maxage', 40.*86400)
fieldset_BRAN.temp.interp_method = 'nearest'

# Define ROMS fieldset
ufiles = sorted(glob('/srv/scratch/z3097808/20year_run/20year_freerun_output_NEWnci/outer_avg_*'))
ufiles = ufiles
vfiles = ufiles
tfiles = ufiles
mesh_mask = '/home/z5278054/EACouter_mesh_srho.nc'

filenames_ROMS = {'U': ufiles,
             'V': vfiles,
             'temp': tfiles,
             'mesh_mask': mesh_mask}

variables_ROMS = {'U': 'u',
             'V': 'v',
             'temp': 'temp'}

dimensions_ROMS = {'U': {'lon': 'lon_psi', 'lat': 'lat_psi', 'depth': 's_rho', 'time': 'ocean_time'},
             'V': {'lon': 'lon_psi', 'lat': 'lat_psi', 'depth': 's_rho', 'time': 'ocean_time'},
             'temp': {'lon': 'lon_psi', 'lat': 'lat_psi', 'depth': 's_rho', 'time': 'ocean_time'}}

indices_ROMS = {'depth': [29]} # surface?

fieldset_ROMS = FieldSet.from_nemo(filenames_ROMS, variables_ROMS, dimensions_ROMS, indices_ROMS, allow_time_extrapolation=True)
fieldset_ROMS.add_constant('maxage', 40.*86400)
fieldset_ROMS.temp.interp_method = 'nearest'

out_file = str(out_dir)+'/'+str(year_array[array_ref])+'_Back.nc' # be sure to change naming for back/forawrd runs

# If output file already exists then remove it
if os.path.exists(out_file):
    os.remove(out_file)

def DeleteParticle(particle, fieldset, time):
    particle.delete()

# Nest the two models
U = NestedField('U', [fieldset_ROMS.U, fieldset_BRAN.U])
V = NestedField('V', [fieldset_ROMS.V, fieldset_BRAN.V])
temp = NestedField('temp', [fieldset_ROMS.temp, fieldset_BRAN.temp])
fieldset = FieldSet(U, V)

fieldset.add_field(temp)
fieldset.temp.interp_method = 'nearest'

# Keep track of which field is being interpolated: Box 6 & 7 https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_NestedFields.ipynb
# This was modified to match the code block below as it was having a similar error due to the grid not being defined right.
# Adding this made the code REALLY SLOW - Once we confirm the nesting is working correctly, I suggest removing (commenting out).
size2D_ROMS = (fieldset_ROMS.U.grid.ydim, fieldset_ROMS.U.grid.xdim)
size2D_BRAN = (fieldset_BRAN.U.grid.ydim, fieldset_BRAN.U.grid.xdim)
F1 = Field('F1', np.ones((size2D_ROMS), dtype=np.float32), lon=fieldset.U[0].grid.lon, lat=fieldset.U[0].grid.lat, mesh='spherical')
F2 = Field('F2', 2*np.ones((size2D_BRAN), dtype=np.float32), lon=fieldset.U[1].grid.lon, lat=fieldset.U[1].grid.lat, mesh='spherical')
F = NestedField('F', [F1, F2])
fieldset.add_field(F)

# Create field of Kh_zonal and Kh_meridional, using same grid as U
# See Eriks comment on github: https://github.com/OceanParcels/parcels/issues/798
# Note this now uses the BRAN grid (shown by the [1]) not the ROMS grid (which was [0])
size2D_1 = (fieldset.U[1].grid.ydim, fieldset.U[1].grid.xdim)
fieldset.add_field(Field('Kh_zonal', Kh_zonal*np.ones(size2D_1),
                         lon=fieldset.U[1].grid.lon, lat=fieldset.U[1].grid.lat, mesh='spherical'))
fieldset.add_field(Field('Kh_meridional', Kh_meridional*np.ones(size2D_1),
                         lon=fieldset.U[1].grid.lon, lat=fieldset.U[1].grid.lat, mesh='spherical'))

fieldset.add_constant('maxage', 40.*86400)

random.seed(123456) # Set random seed

class SampleParticle(JITParticle): # Define a new particle class
    age = Variable('age', dtype=np.float32, initial=0.) # initialise age
    temp = Variable('temp', dtype=np.float32, initial=fieldset.temp[0])  # initialise temperature
    distance = Variable('distance', initial=0., dtype=np.float32)  # the distance travelled
    prev_lon = Variable('prev_lon', dtype=np.float32, to_write=False,
                        initial=attrgetter('lon'))  # the previous longitude
    prev_lat = Variable('prev_lat', dtype=np.float32, to_write=False,
                        initial=attrgetter('lat'))  # the previous latitude.
    f = Variable('f', dtype=np.int32) # Identifies the grid the particle is in (ROMS or BRAN)

def SampleDistance(particle, fieldset, time):
    # Calculate the distance in latitudinal direction (using 1.11e2 kilometer per degree latitude)
    lat_dist = (particle.lat - particle.prev_lat) * 1.11e2
    # Calculate the distance in longitudinal direction, using cosine(latitude) - spherical earth
    lon_dist = (particle.lon - particle.prev_lon) * 1.11e2 * math.cos(particle.lat * math.pi / 180)
    # Calculate the total Euclidean distance travelled by the particle
    particle.distance += math.sqrt(math.pow(lon_dist, 2) + math.pow(lat_dist, 2))
    particle.prev_lon = particle.lon  # Set the stored values for next iteration.
    particle.prev_lat = particle.lat

def SampleAge(particle, fieldset, time):
    particle.age = particle.age + math.fabs(particle.dt)
    if particle.age > fieldset.maxage:
        particle.delete()

# Kernel to identify which grid a particle is in (Very slow once this is included)
#def SampleNestedFieldIndex(particle, fieldset, time):
 #   particle.f = fieldset.F[time, particle.depth, particle.lat, particle.lon]

def SampleTemp(particle, fieldset, time):
    particle.temp = fieldset.temp[time, particle.depth, particle.lat, particle.lon]

end_time = np.repeat(end_time,len(lon))

pset = ParticleSet.from_list(fieldset, pclass=SampleParticle, lon=lon, lat=lat, time=end_time, repeatdt=repeatdt)

pfile = pset.ParticleFile(out_file, outputdt=delta(days=1))

kernels = pset.Kernel(AdvectionRK4) + SampleAge + SampleDistance + BrownianMotion2D #+ SampleNestedFieldIndex + SampleTemp #+ SampleBathy

pset.execute(kernels,
             dt=-delta(minutes=5), # interpolation timestep, positive/negative for forwards/backwards
             output_file=pfile,
             verbose_progress=True,
             recovery={ErrorCode.ErrorOutOfBounds: DeleteParticle},
			 endtime = start_time)
pfile.close()

Any tips you can provide would be greatly appreciated!

more testin```

test
second line

Hi @DEHewitt, thanks for reporting this. I haven't worked much with nested fields yet, so haven't seen this problem myself.
As a workaround, you could try reducing the itMax value at https://github.com/OceanParcels/parcels/blob/master/parcels/include/index_search.h#L201. 100,000 is arguably a bit high number for this, and reducing it to e.g. 10 may speed up the code. Especially on rectangular (i.e. non-Curvilinear) Grids, the index search algorithm should only need a handful of iterations maximum. Can you give that a try?

Hi @erikvansebille, thanks for the speedy response!
I have followed your advice and forked, edited and installed the latest version of parcels (v2.2.0). However, am running into a different issue now and getting the following warnings/errors:
/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py:335: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  timeslices = np.array(timeslices)
/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py:337: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  dataFiles = np.concatenate(np.array(dataFiles))
WARNING: Casting lon data to np.float32
WARNING: Casting lat data to np.float32
WARNING: Casting depth data to np.float32
/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py:335: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  timeslices = np.array(timeslices)
/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py:337: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  dataFiles = np.concatenate(np.array(dataFiles))
/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py:335: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  timeslices = np.array(timeslices)
/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py:337: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  dataFiles = np.concatenate(np.array(dataFiles))
/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py:335: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  timeslices = np.array(timeslices)
/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py:337: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  dataFiles = np.concatenate(np.array(dataFiles))
WARNING: Trying to initialize a shared grid with different chunking sizes - action prohibited. Replacing requested field_chunksize with grid's master chunksize.
WARNING: Casting field data to np.float32
INFO: Compiled random ==> /scratch/pbs.491672.kman.restech.unsw.edu.au/parcels-15278054/parcels_random_a1b191d8-b0e0-41d5-a6b1-928875572d40.so
Traceback (most recent call last):
  File "nest_BRAN_ROMS_0.py", line 166, in <module>
    pset = ParticleSet.from_list(fieldset, pclass=SampleParticle, lon=lon, lat=lat, time=end_time, repeatdt=repeatdt)
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/particleset.py", line 342, in from_list
    return cls(fieldset=fieldset, pclass=pclass, lon=lon, lat=lat, depth=depth, time=time, repeatdt=repeatdt, lonlatdepth_dtype=lonlatdepth_dtype, **kwargs)
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/particleset.py", line 278, in __init__
    v.initial.fieldset.computeTimeChunk(time[i], 0)
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/fieldset.py", line 932, in computeTimeChunk
    data = f.computeTimeChunk(data, tind)
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py", line 1306, in computeTimeChunk
    buffer_data = filebuffer.data
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py", line 2114, in data
    return self.data_access()
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py", line 2204, in data_access
    data = data.rechunk(self.chunk_mapping)
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/core.py", line 2201, in rechunk
    return rechunk(self, chunks, threshold, block_size_limit)
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/rechunk.py", line 233, in rechunk
    chunks = normalize_chunks(
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/core.py", line 2484, in normalize_chunks
    chunks = sum(
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/core.py", line 2486, in <genexpr>
    blockdims_from_blockshape((s,), (c,))
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/core.py", line 974, in blockdims_from_blockshape
    return tuple(
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/core.py", line 975, in <genexpr>
    ((bd,) * (d // bd) + ((d % bd,) if d % bd else ()) if d else (0,))
ZeroDivisionError: integer division or modulo by zero

The code used is the same (except BrownianMotion2D was changed to DiffusionUniformKh). I attempted to run another simulation (below) that doesn't use nested fields and got a similar error (bottom). All code was written (and worked) in version 2.1.4 - I note there have been some changes to dask in recent releases and that seems to be what is causing the issue here.
Non-nested code
from parcels import FieldSet, Field, AdvectionRK4, ParticleSet, JITParticle, Variable, DiffusionUniformKh, random
from parcels import ErrorCode
import numpy as np
from glob import glob
#import time as timelib
from datetime import timedelta as delta
from datetime import datetime as datetime
#import cartopy
import math
import os
from operator import attrgetter

out_dir = '/home/z5278054/Nesting'

npart = 1  # number of particles to be released
repeatdt = delta(days=1)  # release from the same set of locations every X day

# Forward: 9
# lon_array = []
# lat_array = []

# Backwards: 13
lon_array = [153.790]#, 153.799, 153.736, 153.172, 153.048, 152.946, 152.775, 152.312, 152.045, 151.577]
lat_array = [-28.165]#, -28.890, -29.432, -30.864, -31.645, -31.899, -32.193, -32.719, -32.917, -33.578]

lon = np.repeat(lon_array,npart)
lat = np.repeat(lat_array,npart)

array_ref = 0 # which season to simulate (0 = 1994/95, 22 = 2015/16)

# Spawning season is September to March (Heasman et al. 1985)
# Reality language: start date will be 30th August and run until 15th May (the year after) to allow for the full 40 days of tracking.
# Particle reality: the first day of life (and hence the 'start') for particles will be 15th May.

# Manually set the filenames. The names correspond to the number of days since 1, 1, 1990
file_nos = np.arange(1461, 9742, 30)
year_array = np.arange(1994, 2016, 1)

# Days since 1990
start_time = datetime(year_array[array_ref],8, 30) # year, month, day
start_dys = start_time-datetime(1990,1,1) + delta(days=1)
start_id = np.where(file_nos<=start_dys.days) #Find the reference file location
start_id = start_id[0][-1]

end_time = datetime(year_array[array_ref]+1, 5, 15)  #year, month, day
end_dys = end_time-datetime(1990,1,1) + delta(days=1)
end_id = np.where(file_nos>=end_dys.days) #Find the reference file location
end_id = end_id[0][0]

runtime = end_time-start_time + delta(days=1)

ufiles = sorted(glob('/srv/scratch/z3097808/20year_run/20year_freerun_output_NEWnci/outer_avg_*'))
ufiles = ufiles[start_id:end_id+1] # not sure what the +1 is doing here
vfiles = ufiles
tfiles = ufiles
bfiles = '/home/z5278054/EACouter_mesh_srho.nc' # For Hayden
mesh_mask = '/home/z5278054/EACouter_mesh_srho.nc' # For Hayden

# Set diffusion constants (in m/s)
Kh_zonal = 10
Kh_meridional = 10

filenames = {'U': ufiles,
             'V': vfiles,
             'temp': tfiles,
             'bathy': bfiles,
             'mesh_mask': mesh_mask}

variables = {'U': 'u',
             'V': 'v',
             'temp': 'temp',
             'bathy': 'h'}

out_file = str(out_dir)+'/'+str(year_array[array_ref])+'_Back.nc'

dimensions = {'U': {'lon': 'lon_psi', 'lat': 'lat_psi', 'depth': 's_rho', 'time': 'ocean_time'},
             'V': {'lon': 'lon_psi', 'lat': 'lat_psi', 'depth': 's_rho', 'time': 'ocean_time'},
             'temp': {'lon': 'lon_psi', 'lat': 'lat_psi', 'depth': 's_rho', 'time': 'ocean_time'},
             'bathy': {'lon': 'lon_rho', 'lat': 'lat_rho'}}

indices = {'depth': [29]}

if os.path.exists(out_file):
    os.remove(out_file)

def DeleteParticle(particle, fieldset, time):
    particle.delete()

fieldset = FieldSet.from_nemo(filenames, variables, dimensions, indices, allow_time_extrapolation=True)
fieldset.add_constant('maxage', 40.*86400)
fieldset.temp.interp_method = 'nearest'

# Create field of Kh_zonal and Kh_meridional, using same grid as U
size2D = (fieldset.U.grid.ydim, fieldset.U.grid.xdim)
fieldset.add_field(Field('Kh_zonal', Kh_zonal*np.ones(size2D),
                         lon=fieldset.U.grid.lon, lat=fieldset.U.grid.lat, mesh='spherical'))
fieldset.add_field(Field('Kh_meridional', Kh_meridional*np.ones(size2D),
                         lon=fieldset.U.grid.lon, lat=fieldset.U.grid.lat, mesh='spherical'))

random.seed(123456) # Set random seed

class SampleParticle(JITParticle): # Define a new particle class
    age = Variable('age', dtype=np.float32, initial=0.) # initialise age
    temp = Variable('temp', dtype=np.float32, initial=fieldset.temp)  # initialise temperature
    bathy = Variable('bathy', dtype=np.float32, initial=fieldset.bathy)  # initialise bathy
    distance = Variable('distance', initial=0., dtype=np.float32)  # the distance travelled
    prev_lon = Variable('prev_lon', dtype=np.float32, to_write=False,
                        initial=attrgetter('lon'))  # the previous longitude
    prev_lat = Variable('prev_lat', dtype=np.float32, to_write=False,
                        initial=attrgetter('lat'))  # the previous latitude.

def SampleDistance(particle, fieldset, time):
    # Calculate the distance in latitudinal direction (using 1.11e2 kilometer per degree latitude)
    lat_dist = (particle.lat - particle.prev_lat) * 1.11e2
    # Calculate the distance in longitudinal direction, using cosine(latitude) - spherical earth
    lon_dist = (particle.lon - particle.prev_lon) * 1.11e2 * math.cos(particle.lat * math.pi / 180)
    # Calculate the total Euclidean distance travelled by the particle
    particle.distance += math.sqrt(math.pow(lon_dist, 2) + math.pow(lat_dist, 2))
    particle.prev_lon = particle.lon  # Set the stored values for next iteration.
    particle.prev_lat = particle.lat

def SampleAge(particle, fieldset, time):
    particle.age = particle.age + math.fabs(particle.dt)
    if particle.age > fieldset.maxage:
        particle.delete()

def SampleTemp(particle, fieldset, time):
    particle.temp = fieldset.temp[time, particle.depth, particle.lat, particle.lon]

def SampleBathy(particle, fieldset, time):
    particle.bathy = fieldset.bathy[0, 0, particle.lat, particle.lon]

end_time = np.repeat(end_time,len(lon))

pset = ParticleSet.from_list(fieldset, pclass=SampleParticle, lon=lon, lat=lat, time=end_time, repeatdt=repeatdt)

pfile = pset.ParticleFile(out_file, outputdt=delta(days=1))

kernels = pset.Kernel(AdvectionRK4) + SampleAge + SampleTemp + SampleBathy + SampleDistance + DiffusionUniformKh

pset.execute(kernels,
             dt=-delta(minutes=5),
             output_file=pfile,
             verbose_progress=True,
             recovery={ErrorCode.ErrorOutOfBounds: DeleteParticle},
			 endtime = start_time)
pfile.close()

Error
WARNING: Casting lon data to np.float32
WARNING: Casting lat data to np.float32
WARNING: Casting depth data to np.float32
WARNING: Trying to initialize a shared grid with different chunking sizes - action prohibited. Replacing requested field_chunksize with grid's master chunksize.
WARNING: Casting time data to np.float64
WARNING: Casting field data to np.float32
INFO: Compiled random ==> /scratch/pbs.497989.kman.restech.unsw.edu.au/parcels-15278054/parcels_random_83b14cd5-cf7f-4a3a-a1f9-39c45ff2a00b.so
Traceback (most recent call last):
  File "gmc_back_1994.py", line 139, in <module>
    pset = ParticleSet.from_list(fieldset, pclass=SampleParticle, lon=lon, lat=lat, time=end_time, repeatdt=repeatdt)
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/particleset.py", line 342, in from_list
    return cls(fieldset=fieldset, pclass=pclass, lon=lon, lat=lat, depth=depth, time=time, repeatdt=repeatdt, lonlatdepth_dtype=lonlatdepth_dtype, **kwargs)
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/particleset.py", line 278, in __init__
    v.initial.fieldset.computeTimeChunk(time[i], 0)
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/fieldset.py", line 932, in computeTimeChunk
    data = f.computeTimeChunk(data, tind)
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py", line 1306, in computeTimeChunk
    buffer_data = filebuffer.data
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py", line 2114, in data
    return self.data_access()
  File "/home/z5278054/test_python_env/lib/python3.8/site-packages/parcels/field.py", line 2204, in data_access
    data = data.rechunk(self.chunk_mapping)
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/core.py", line 2201, in rechunk
    return rechunk(self, chunks, threshold, block_size_limit)
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/rechunk.py", line 233, in rechunk
    chunks = normalize_chunks(
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/core.py", line 2484, in normalize_chunks
    chunks = sum(
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/core.py", line 2486, in <genexpr>
    blockdims_from_blockshape((s,), (c,))
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/core.py", line 974, in blockdims_from_blockshape
    return tuple(
  File "/apps/python/3.8.3/lib/python3.8/site-packages/dask/array/core.py", line 975, in <genexpr>
    ((bd,) * (d // bd) + ((d % bd,) if d % bd else ()) if d else (0,))
ZeroDivisionError: integer division or modulo by zero

Hmm, I have not seen this dask error before. You say it appears with the latest version of dask?
You can turn off dask by adding field_chunksize=False to your FieldSet.from_nemo(...) command. This will lead to higher memory usage, but if you have sufficient memory anyways, it could help circumvent the error?

Thanks for your help, @erikvansebille. We're still working on this and will provide feedback once we have some (that is more complete). Thanks!

Thanks @erikvansebille , I have an update on what @DEHewitt and myself have been attempting. Dan's original error which was repeated many times resulting in excessively large error files (filling up the HPC memory allocation):
Correct cell not found for (154.050926, -25.534158) after 1000000 iterations
Debug info: old particle indices: (yi, xi) 314 45
            new particle indices: (yi, xi) 314 226
            Mesh 2d shape:  316 271
            Relative particle position:  (xsi, eta) -6.1320155892265049e-01 1.0127507928492394e+00

occurs only on the HPC, it runs fine on my windows laptop (using a reduced dataset on both). This is using Parcels v2.2.0 with Python 3.6.5 (the HPC did not like the Python 3.8 with Parcels v2.2.0 so we went back to python 3.6)
Following your suggestion and editing the itMax value we attempted to use the development version and this resulted in the second error Dan reported. This error occurs with the development version before (and after) we attempt to edit anything.
ZeroDivisionError: integer division or modulo by zero

I then attempted to change the v2.2.0 and edited the itMax value in that version and it runs on both my windows laptop and the HPC but it does not track any particles so i think i did something a little wrong.
ParticleSet is empty on writing as array at time 2.4624e+06

So i think there is something in the development version that did not like our code (possibly the nesting).
I also tried including and excluding the field_chunksize=False in the FieldSet.from_nemo(...) command and it did not change anything in the working 2.2.0 version of parcels.
We still get the original issue of the correct cell error occurs so many times it gets a massive error file. Do you have any further suggestions or can I provide more information?

I've looked at your Issue again, and it maybe that your problem is a really fundamental one to how Parcels now does nesting. As all of the development/testing was done on RectilinearGrids, it was easy to see if a Particle was out of bounds in the inner grid, and then move it to the outer grid. However, if the inner grid is curvilinear, then Parcels first tries to do this iterative find of the grid cell, which is why you keep seeing these warning messages, for every particle that moves from the inner to the outer grid
I don't think I have an easy solution for this, I fear. Supporting nesting with Curvilinear Grids will require a major redevelopment of how we deal with nesting; for which we don't have time now here in Utrecht. Is there no other way you can get around this? Or would you want to try develop and contribute this feature yourself?
Sorry that I can't be more helpful at the moment

Thanks @erikvansebille, I will have an attempt at finding a work around (I am encouraged by the fact it appears to run without this warning on my laptop) and a look at the nesting source code but rewriting it is probably beyond my python ability at the moment.
I will post some feedback here on our final solution/work around.

Hi @erikvansebille, we have pivoted away and potentially arrived back at this issue. Unfortunately, developing the feature in Parcels is beyond my Python ability too. I am here hoping you can point me in the direction of any examples you're aware of that accomplish nesting using if/else statements depending on particle position, or using recovery kernels (as I note in the tutorial for nesting it says this is possible). Many thanks!

Dear @DEHewitt. Sorry that it is proving so difficult to implement nesting for curvilinear grids. I'm not sure of any if/else solutions that you point to
Another option, depending on exactly your Field setup, is to interpolate the parent nest onto the child nest grid, and then not use nesting at all? This of course is far from an ideal solution (would require much more storage!) but might be easiest to get going?

No worries @erikvansebille. I think I follow your second option and may be useful. There are other products in my region of interest that encompass the entire range of the species I'm interested in, just at a coarser resolution (but not too coarse). Thanks for your assistance so far!

Hi all
Just wondering if you found any solution for this? Never had this issue before running earlier versions of parcels on HPC but just updated python and ocean parcels to the latest version (3.0.3) on our HPC and has seem to break it.
Same error: "Correct cell not found for<PHONE_NUMBER>00, 8433760.000000) after 1000000 iterations
Debug info: old particle indices: (yi, xi) 0 63
new particle indices: (yi, xi) 0 63
Mesh 2d shape:  300 330"
Thanks for your help :)
Camille

Hi Erik
Thank you for your quick reply! Yes I do work with a fine-scale model referenced in UTM (m) and have the right mesh='flat' when I generate my fieldset. Any other suggestions?
Thank you again - I've tried everything and can't seem to figure this one out.
Camille


Add  element

Address issue #1348

Only half-baked, closing.

See discussion of #1348 for a better proposal


Post Uploading Criteria Changed Completely

This is how creating new posts look like now

This is how when new post with caption & Image uploaded

@narayan954 Plz merge my pull request !!

This is how creating new posts look like now
This is how when new post with caption & Image uploaded
@narayan954 Plz merge my pull request !!

please mention issue number

Issue number 383 😅. Branch name was issue number itself !!

Issue number 383 sweat_smile. Branch name was issue number itself !!

oh, my bad but still mention it in the pr as well

If you can move this to the sidebar's new post button and implement it for there, it'd be really helpful. I can change the issue difficulty level to 3 as it might be tedious, removing code from there and placing there and ensuring the working

Can you plz give an Example that where to shift this ?

@narayan954 OK Done I will change it ✅.

Can you plz give an Example that where to shift this ?

check the current deployed version of our application, we've a side bar with new post button  as well which is un implemented. If you wish to fix that, you can... Else it's okay we'll handle that in a different issue.You can fix the current issue I highlighted.

I will do it , I have no problem. I have to remove New post button from above Navbar and that new post dialog should be shown on clicking sidebar new post . Right ??

I will do it , I have no problem. I have to remove New post button from above Navbar and that new post dialog should be shown on clicking sidebar new post . Right ??

yes, exactly... It'll cause a bit of code refactoring as well. We're now focussing on code refactoring as well.

No Problem !! I have started working on this functionality !! Plz mark it as Level 3 issue as you said 🙂


Change the default port for OLTP gRPC in Documentation Collector Configuration

4317 is the default port for OLTP gRPC now, as https://github.com/open-telemetry/opentelemetry-specification/pull/1221

Thanks for catching this! We're actually changing how we manage docs for the collector. We want the source of truth for collector docs to live in the collector repo. This PR should already have your changes: open-telemetry/opentelemetry-collector#2839
Once that PR is merged, a separate (new) PR will be opened here to mirror the changes. Can you help us get #2839 merged?

Closing because this is handled in open-telemetry/opentelemetry-collector#2839


update bbknn arguments and docstring

Updated sc.external.pp.bbknn() to match current arguments and docstring.

It seems this is of some relevance to users, as shown by it showing up twice independently over the course of the past week.
For some reason, my tweaks have killed off ReadTheDocs, and I can't check why as upon pressing the "details" button I get the 404 equivalent :) I am now importing types so I can correctly define metric as also including types.FunctionType. This  is probably what is causing whatever hiccup is happening.
@giovp , some assistance with getting the ball rolling on this? The changes are a result of me expanding BBKNN with pynndescent on your recommendation.

@ktpolanski following from https://scanpy.readthedocs.io/en/stable/dev/code.html#code-style and building the docs locally gives me (among some errors that were not relevant):
...
/path/to/scanpy/scanpy/external/pp/_bbknn.py:docstring of scanpy.external.pp._bbknn.bbknn:28: WARNING: py:class reference target not found: function
/path/to/scanpy/scanpy/external/pp/_bbknn.py:docstring of scanpy.external.pp._bbknn.bbknn:28: WARNING: py:class reference target not found: function
...

It does not, as an analogous docstring built just fine over on the BBKNN page.

I ran pip3 install scanpy[doc], as instructed by that page, and the doc seems to have built fine locally.

The only fishy thing is the function is not clickable, while the other two are, but it built.

Hmm, I'm stumped. @ivirshup ?

I can't get it to work. I have unquoted types.FunctionType, and function remains unclickable. I have tried to switch to an collections.abc.Callable, and instead of anything helping the entire argument support vanishes:

Please help?

I think that should do it. I believe the types module isn't actually meant to be used for type annotations, that's what the typing module is for (which is always confusing to me).

and instead of anything helping the entire argument support vanishes:

I got this behaviour too, but running make clean and building from scratch got things working again.  ¯_(ツ)_/¯

Thanks a lot for the help, assuming things are in order then that's it for me.

Thanks for the update!


Use const fn for constructors

Using const fn for constructors would allow them to be used to initialize constants. This is especially beneficial in an embedded environment because these object can be stored in flash and don't consume RAM.
Many constructors in e-g are implemented in impl blocks with trait bounds, which can't be used to implement const fns in stable Rust. But this should be reevaluated when more const_fn features are stabilized.

Tracking issue for const_fn: rust-lang/rust#57563
RFC for generic const fn parameters: rust-lang/rfcs#2632 (I think this is relevant)

Something specific that would allow quite a more fns to be const would be the const-stabilisation of saturating_add and saturating_sub. The feature was added in rust-lang/rust#58246, but is still behind the const_saturating_int_methods feature as shown in rust-lang/rust#53718.

const saturating_add and saturating_sub have been stabilized in 1.47. I'd be happy to work on this, but I guess it'd be a breaking change for the minimum supported Rust version? Is that ok?

Yeah, 1.47 would be a breaking change. I'd like to not bump the MSRV too often, so perhaps it would be a good idea to leap ahead to 1.56.1 (edition 2021) instead?
That would give us even more const items, particularly https://github.com/rust-lang/rust/pull/80962 (along with .pow()) as well as min_const_generics.

... so perhaps it would be a good idea to leap ahead to 1.56.1 (edition 2021) instead?

IMO this would be a good idea, I'm getting tired of having to work around limitations of our ancient MSRV.

Me too. I'll start working on a PR.

If you were curious, 1.40.0 came out almost exactly two years ago. Not that ancient I suppose ;)
@peterstuart looks like we're settled on 1.56.1 MSRV, so if you want to take a stab at constifying a bunch of methods, please base it on that version (and #638 if it's not merged yet).


update project

Pull Request Test Coverage Report for Build 120

9 of 10 (90.0%) changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.01%) to 99.291%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/VersionFactory.php
5
6
83.33%

Totals

Change from base Build 117:
-0.01%

Covered Lines:
140

Relevant Lines:
141

💛  - Coveralls


Added frontend-app-component-footer-mitol

Description
Replaced frontend-component-footer with @mitol/frontend-component-footer-mitol using npm aliases  and added env variables.
which are relevant tickets.
Closes #411

Looks good :+1:

:+1:


feat(viewportGrid): simplifying ViewportGrid and enhancing performance by aligning with hanging protocol viewportIds

Context
ViewportGrid has grown to be a complex piece with viewportIds being almost random, and also not following the defined Hanging Protocol Ids.
This PR will fix this issue and remove various pieces to make the viewportGrid simple as before and also following hanging protocol defined ids.
Changes & Results

Changes are removing the useViewportId logic which was barely hit (as it required various conditions to be true)
making the disableElement based on viewportId

Results
Bringing back the meaningfull viewportIds
Before (right now)
https://github.com/OHIF/Viewers/assets/7490180/135bf67d-5731-491c-ad56-245ab5d4d8a8
After:
https://github.com/OHIF/Viewers/assets/7490180/6cf977b3-42db-4ae5-b141-7610eb26a39c

Enable change of protocol during volume loading
Before(now)
https://github.com/OHIF/Viewers/assets/7490180/e04938ed-bfaa-49fd-a10c-4d18f4b980ff
After:
https://github.com/OHIF/Viewers/assets/7490180/c7a936ec-5418-4902-90ba-d33b109ef1a8

No unnecessary re-rendering when not required
Going from default tmtv (10 viewports) to its next stage, there are viewports that are picked for the next stage (nothing is added, some are removed). Assigning the viewportId to the key will help react to manage the move for the viewports without the need for rendering. So going from HP0 to HP1 in tmtv will not even hit the setViewportData inside the cornerstoneViewportService which means better performance

Testing
Checklist
PR

[] My Pull Request title is descriptive, accurate and follows the
semantic-release format and guidelines.

Code

[] My code has been well-documented (function documentation, inline comments,
etc.)

Public Documentation Updates

[] The documentation page has been updated as necessary for any public API
additions or removals.

Tested Environment

[] OS:
[] Node version:
[] Browser:

closing in favor of https://github.com/OHIF/Viewers/pull/3591


How Do We Get This Data?

In light of the below information, figure out how to get the "Desired Data Output" dataframe
What Our Data Looks Like At Present:
Data Inputs:

Historical Danger Rating

Date
Area
Danger Rating

Apr 15 2023
Stevens Pass
LOW

Historical weather (from NWAC; there's gotta be a better way to get it)

Date PDT
Temp F
RH %
Min mph
Spd mph
Gust mph
Dir deg

Apr 24 6:00
23
98
7
18
31
W

Historical SNOTEL (can add more/different metrics potentially?)

Date
Station Id
Station Name
Snow Water Equivalent (in)
Snow Depth (in)
Precipitation Accumulation (in)
Air Temperature Observed (degF)
Elevation (ft)
Latitude
Longitude

2022-11-01 00:00
702
Potato Hill
1.6
4
3.9
34.2
4510
46.34963
-121.51435

Date
Station Id
Station Name
Snow Water Equivalent (in)
Snow Depth (in)
Precipitation Accumulation (in)
Air Temperature Observed (degF)
Elevation (ft)
Latitude
Longitude

2022-11-01 00:00
804
Surprise Lakes
0.0
0
6.5
34.5
4290
46.09497
-121.76345

etc,etc for all desired snotel sites
Combining SNOTEL Data
For all the snotel sites we use to calculate our metrics, we want to combine them with both mean and median aggregation. So, for every individual hourly (or daily) metric, we want the mean/median of all values for all sites.
Desired Data Output:

Date
Max Air Temp 24hr
Max Air Temp 72hr
Total Snowfall 24hr
Total Snowfall 72hr
Max Windspeed 24hr
Weighted Snowfall 96hr
Min Temp Diff 48hr
Was Heavy Snowfall 24hr
Was High Winds 24hr
Sum Max Temp 72hr
Delta SWE 24hr
Yesterday Danger
Danger Rating

1/1/2000
32.0
33.0
13
23
27
40
-10
True/1
False/0
63
0.5
MODERATE/2
LOW/1

(These are absolutely random values)
Data Points and Why They Are Necessary:

Max Air Temp 24hr: Maximum air temperature in the past 24 hours

Really warm (significantly above freezing) causes wet slides, really really cold causes other problems.

Max Air Temp 72hr: Maximum air temperature in the past 72 hours

This is similar to 1, but shows warm temperatures over a longer time frame.

Yesterday Danger: Previous day's danger rating

If the previous day had a high danger rating, the current day will likely have a high(ish) danger rating.

Ideally we wouldn't use this, because it would be cool to generate predictions based only on weather, but we should make our prediction good before optimizing completely.

Total Snowfall 24hr: Total snowfall in the past 24 hours

Lots of new snow is a red flag.

Total Snowfall 72hr: Total snowfall in the past 72 hours

Prolonged high snowfall adds a lot of stress to the snow.

Max Windspeed 24hr: Maximum wind speed in the past 24 hours

High wind creates "wind slabs": blocks of cohesive snow that stick together. These blocks of snow sit on top of older snow, and as in the above example, they are another "brick on top of packing peanuts".

Was Heavy Snowfall 24hr: Threshold snowfall: was there > 7cm (convert to in) in the past 24 hours

This shifts us from linear/numerical to categorical data. We might not be able to use both, so this is a less important metric. Basically, there are "thresholds" that if they are passed it is an immediate red flag. This is one of them.
We should try with both a 12 in threshold, which is the standard for avalanche forecasting, and a 7 cm threshold, which is the value that one of the DS projects identified as being the best measure.

Was High Winds 24hr: Did the wind speed exceed 20 mph in the past day?

This is another boolean value like the one above that we may or may not be able to use.
As like the max windspeed metric, high winds can be a bad sign
It would also be cool to try this with:

Use 25 mph instead
Use maximum gust instead of speed

Delta SWE 24hr: Water content of new snow (use SWE)

How much did the SWE change in the past 24 hours?
Snow Water Equivalent (SWE) measures how much water actually fell from the sky. This is a measure of the density of new snow. 10" of super light snow could weigh the same as 2" of super dense snow, so this might actually be a better metric to use than actual snowfall, which is just the depth of snow.

Sum Max Temp 72hr: Sum of maximum temperature of the past 3 days

indicative of a warm spell

Min Temp Diff 48hr: Difference in minimum temperature from previous day

This can tell us if there are large temperature swings (rapid warming leads to rapid thawing which creates rivers under the snow that destabilize the snowpack, rapid cooling does some bad stuff too but I can't remember what exactly).
Today's temperature - yesterday's temperature

Weighted Snowfall 96hr: Weighted sum of snow for the past 4 days

1.0 * yesterday snowfall + 0.75 * two days ago snowfall + 0.5 * three days ago snowfall + 0.25 * four days ago snowfall
This is similar to total snowfall, but gives a better view of the past few days, with more recent snowfall being more "important" than snowfall 4 days ago.

How Do We Get These Data Points:

mean/median: Can we do this with SNOTEL Report Generator? Or do we have to do ourselves?

Can we do this with SNOTEL?
Can we do this with SNOTEL?
Probably have to calculate ourselves (shouldn't be terribly hard)
Can we do this with SNOTEL?
Can we do this with SNOTEL?
Can we do this with SNOTEL?
Probably have to do ourselves
Ourselves, probably
Can we do this with SNOTEL?
Ourselves, probably
Ourselves, probably
Ourselves, probably

NWAC Weather Data Portal

putting in review so i can refer back to it


20354 money request participants selector skeleton fix

Details

A quick fix to Skeleton issues on MoneyRequestParticipantsList components. Debouncing searching.
Fixed Issues

$ https://github.com/Expensify/App/pull/32692#issuecomment-1888223436
PROPOSAL:
Tests

[ ] Verify that no errors appear in the JS console

Offline tests

QA Steps

[ ] make a money request
[ ] observe the skeleton showing up when the screen shows up
[ ] observe the skeleton showing up the searching for contact
[ ] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

I think you're planning to reuse BaseSelectionsList in different other parent components right? Such as the SearchPage and NewChatPage, in this case, can we code this debouncing logic in the BaseSelectionsList itself instead of having to duplicate in each parent componenent?

I'm still seeing a flicker, here it is compared to the search page
https://github.com/Expensify/App/assets/9680864/d042cfdb-068b-412b-8482-b7f7f4e863fb

I think you're planning to reuse BaseSelectionsList in different other parent components right? Such as the SearchPage and NewChatPage, in this case, can we code this debouncing logic in the BaseSelectionsList itself instead of having to duplicate in each parent componenent?

I actually wouldn't advice adding debouning to the list component. for simplicity and separation of concerns sake. The list is only to display things. Yes it has some convenient things added to it, but still they are "list related".
Let's say we added debouncing to textInputValue and suddenly we have a use-case where we actually don't need it because all the data is local and we just need to quickly filter them. We would then need to add yet another param to turn off debouncing. Also another param to manage to debouncing time. This exactly what happened to the previous list element (which we are removing right now) - it got bloated over time with features that we don't use 99% of time. By keeping debouncing outside of the scope of the list we keep things modular and easier to refactor in the future.

I'm still seeing a flicker, here it is compared to the search page

OK, it's because the new SelectionList doesn't have a param that the old one had, which is a flag that was showing a loading indicator in input field. Instead I reverted to showing a skeleton while searching and that creates that unpleasant effect. I'll just add that old param to the new list component - this should solve the issue.

@lukemorawski Im working in this skeleton transition here #32665
Although you are still in the middle of refactoring, we need to control the getOptions call. Like you did in here.
Also,

param that the old one had, which is a flag that was showing a loading indicator in input field

I adjusted the 'SelectionList' props #commit, I think it works fine now, but any feedback is welcome.
We also need a fill={theme.icon} in the MoneyRequestReferralProgramCTA.tsx

We need to make the same adjustments to NewChatPage and SearchPage.
I went ahead and resolved this in my PR as well. What do you think?

@lukemorawski Im working in this skeleton transition here #32665
Although you are still in the middle of refactoring, we need to control the getOptions call. Like you did in here.
Also,

param that the old one had, which is a flag that was showing a loading indicator in input field

I adjusted the 'SelectionList' props #commit, I think it works fine now, but any feedback is welcome.
We also need a fill={theme.icon} in the MoneyRequestReferralProgramCTA.tsx

I went ahead and resolved this in my PR as well. What do you think?
We need to make the same adjustments to NewChatPage and SearchPage.

OK, I see we are basically working on mostly the same things here. There is no point of making two PRs with code changes addressing the same issues. I could close my PR if you could add some some extra things my PR have and your doesn't. That way we won't duplicate. If you're cool with that then here's a quick list:

debounce text input value. You can use the same way I used in this PR using useDebouncedState hook and useEffect to run Report.searchInServer on debounced value change.
applying all the same changes in src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js as it's basically the same component but used elsewhere.

OK, I see we are basically working on mostly the same things here

Yes 😂

I could close my PR if you could add some some extra things my PR have and your doesn't.

Absolutely, I will work on these changes immediately.

And I could prepare another PR where fix the icon thing.

I completed the fill property in MoneyRequestReferralProgramCTA in my PR #commit, can I leave it? I believe we can create a ReferralProgramCTA to be used in all others, SerachPage and NewPage for example. I don't know if it already exists.

@lukemorawski,  One more thing, about https://github.com/Expensify/App/issues/20354, I believe we will have more work, I can see some places that use OptionSelector that I believe can be replaced by SelectionList, I don't know. But in any case, I'm at your disposal if you need help with the next steps of it.

@lukemorawski, One more thing, about #20354, I believe we will have more work, I can see some places that use OptionSelector that I believe can be replaced by SelectionList, I don't know. But in any case, I'm at your disposal if you need help with the next steps of it.

Thanks for that! I'm those refactorings one by one, so it's not a huge unreadable PR.

OK, I see we are basically working on mostly the same things here

Yes 😂

I could close my PR if you could add some some extra things my PR have and your doesn't.

Absolutely, I will work on these changes immediately.

And I could prepare another PR where fix the icon thing.

I completed the fill property in MoneyRequestReferralProgramCTA in my PR #commit, can I leave it? I believe we can create a ReferralProgramCTA to be used in all others, SerachPage and NewPage for example. I don't know if it already exists.

Awesome. Leave your change please and I'll address the rest. I have already created one common ReferralProgramCTA. I'll just refer it in all those pages.

Closing this PR because the work here has been largely double in https://github.com/Expensify/App/pull/32665.
Please see this comment https://github.com/Expensify/App/pull/34443#issuecomment-1892308955

@lukemorawski The PR is ready for Review.
I made the changes you mentioned:

debounce text input value. You can use the same way I used in this PR using useDebouncedState hook and useEffect to run Report.searchInServer on debounced value change.
applying all the same changes in src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js as it's basically the same component but used elsewhere.

Can you verify please? #32665/files
Thank you :D

Commit changes requested by @lukemorawski here https://github.com/Expensify/App/pull/34443#issuecomment-1892308955 to resolve https://github.com/Expensify/App/pull/32692#issuecomment-1888223436.


test-branch/execute-job/wrong-commit-sha-on-pr/ac3791cd-bfa5-49a9-a406-b884e1daf943

PR for testing e36b59292995919febad5a9ee89e0260c029d44c

/canonical/self-hosted-runners/run-workflows 7bcc59645efe37169701ccc1e3c6734e2c35c287


licenses to add to a full text

Describe the improvement
After adding a full text file, the information on that full text file can be edited. One information field is the license. Currently, the user can use between different CC licenses. Which licenses are expected here?
@sdebodt to check with Myriam
Screenshots

for open access only:

The dropdown menu should list the CC licenses (if possible, would also be nice to somehow indicate CC0, CC-BY and CC-BY-SA as "open" licenses. Maybe in a tooltip or in some other way?). These licenses can only be selected when the access level is set to  open access.

In addition to the predefined list of CC licenses in the dropdown, users need to be able to provide custom licenses (i.e. free text field) (e.g. because these are used by some publishers). In this case, no spdx license identifier will be available, so these will be classified as "Other" in FRIS.

Question: how to deal with older versions of CC licenses that have been applied to certain publications (e.g. CC-BY 2.5)?
for other access levels:
a box "no license (in copyright)" referring to https://rightsstatements.org/page/InC/1.0/?language=en, to tick or automatically tick the box?

OK, to revisit later.

Will you add/have you added the copyright box for non-open access?

no, do we really need another form field or is the absense of a license enough for now? the form is already too large for some people to grok

need to check with Myriam whether absence of a license is sufficient


In Scoping, add conditions

Review for conditions and add.At least one in feedstock - biobased should prompt the other question.

@sjgllghr pointed out that I need to reference the section as well, so added "feedstock." in front of each question like I see it in other files. And now it doesn't show that question when nothing is checked (YAY!) but it also doesn't appear when I check "Bio-based". So, progress of a sort. What else am I missing?

I'm guessing it's because the question you're applying the conditional to has a period at the end. It's mentioned in the guide, but basically right now periods don't work as punctuation for questions that have conditional rules. (Since "." is used to tell what sub-section a question is from, if you use a period in your question it'll think whats before the period is a subsection and not be able to find it)
https://github.com/NorthwestGreenChemistry/PrISM/blob/53cc6022d0a352b6aa2910f676d2a01610ec1936/app/assets/quiz/guiding_questions1_rules.json#L4

Woohooo, it works now! Remove the '.' didn't fix it completely; that got the conditional question to disappear but it wouldn't reappear. Removed the dash in bio-based (changed to biobased), and now it works!


[HW] Rakesh Pavuluri

Name: Rakesh Pavuluri
Email<EMAIL_ADDRESS>Linkedin Profile: https://www.linkedin.com/in/rakeshpavuluri/
Attach the homework step I screenshots below:

All good !

Hey Rakesh Pavuluri, great job! Congrats! Here is your badge! https://api.badgr.io/public/assertions/qBcccRsMQcKX41Sxspy-Og

<EMAIL_ADDRESS>


DirectXTK12 compiling errors on VS 2017 (v141)

The project DirectXTK_Desktop_2017_Win10 won't compile and following errors appeared:

1>------ Build started: Project: DirectXTK12, Configuration: Debug x64 ------
1>pch.cpp
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\winrt\wrl\client.h(892): error C2187: syntax error: 'identifier' was unexpected here
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\winrt\wrl\client.h(900): error C2187: syntax error: 'identifier' was unexpected here
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\winrt\wrl\implements.h(629): error C2187: syntax error: ')' was unexpected here
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\winrt\wrl\implements.h(697): note: see reference to class template instantiation 'Microsoft::WRL::ChainInterfaces<I0,I1,I2,I3,I4,I5,I6,I7,I8,I9>' being compiled
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\winrt\wrl\implements.h(710): error C2187: syntax error: ')' was unexpected here
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\winrt\wrl\implements.h(781): note: see reference to class template instantiation 'Microsoft::WRL::ChainInterfaces<Microsoft::WRL::MixIn<Derived,MixInType,hasImplements>,I1,I2,I3,I4,I5,I6,I7,I8,I9>' being compiled
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\winrt\wrl\implements.h(955): error C2187: syntax error: ')' was unexpected here
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\winrt\wrl\implements.h(982): note: see reference to class template instantiation 'Microsoft::WRL::Details::ImplementsHelper<RuntimeClassFlagsT,Microsoft::WRL::Details::InterfaceList<Microsoft::WRL::ChainInterfaces<C0,C1,C2,C3,C4,C5,C6,C7,C8,C9>,I1>,doStrictCheck,false>' being compiled
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\winrt\wrl\implements.h(993): error C2187: syntax error: ')' was unexpected here
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\winrt\wrl\implements.h(1015): note: see reference to class template instantiation 'Microsoft::WRL::Details::ImplementsHelper<RuntimeClassFlagsT,Microsoft::WRL::Details::InterfaceList<Microsoft::WRL::ChainInterfaces<C0,C1,C2,C3,C4,C5,C6,C7,C8,C9>,Microsoft::WRL::Details::Nil>,doStrictCheck,false>' being compiled
1>Done building project "DirectXTK_Desktop_2017_Win10.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I am using latest Visual Studio Enterprise 2017 15.3.5

This is already fixed in the master branch and will be included in a new release later this week.


Make room search case insensitive

Example:
if I search room "foo" I have to find room "Foo".

Will be done in 229


In table/column headings add title/info icon/label

Some table headings and column headings need to have a title/info icon/label that will inform the user about their use

Thank hkalbertl !


change column dag_json for phylo_trees to longtext

Code Climate has analyzed commit 1469d3a and detected 0 issues on this pull request.
View more on Code Climate.

65,535


release and publish GHA

A release and publish GHA never made it into inequality. This is a prerequisite for #45.

xref #24


FAISS - Incorrect relevance score with MAX_INNER_PRODUCT distance metric.

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code
I used notebook in official faiss page for reference. Here is the reference code.
https://python.langchain.com/v0.1/docs/integrations/vectorstores/faiss/
To show the issue, I modified it to use max_inner_product distance strategy. Here is the modified code section.
db = FAISS.from_documents(docs, embeddings, distance_strategy=DistanceStrategy.MAX_INNER_PRODUCT)
Error Message and Stack Trace (if applicable)
No response
Description
Reference code which uses l2 distance by default generates following output:

Modified code which uses max_inner_product distance generates the following output:

Relevance score by definition is between 0-1. 0 is dissimilar, 1 is most similar. See reference 1.
Reference code output produces valid relevance score, in which most similar document have relevant score closest to 1.
Modified code using MAX_INNER_PRODUCT, produces invalid relevance score, in which most similar document have relevant score most distant to 1. This contradicts with the definition of relevance score.
References:
1- https://api.python.langchain.com/en/latest/vectorstores/langchain_core.vectorstores.VectorStore.html
System Info
langchain==0.2.1
langchain-community==0.2.1
langchain-core==0.2.1
langchain-openai==0.1.7
langchain-text-splitters==0.2.0
faiss-cpu==1.8.0

Yes it is supposed to be in that way, try to understand the metrics:

For L2/euclidean distance, the more the similar vector are the lesser their distance will be therefore higher the normalized score will be since it is calculated in langchain using the following formula

1.0 - distance / math.sqrt(2)

However, for inner product, the more the similar vector are the higher the dot product will be therefore the lower the normalized score will be since it is calculated in langchain using the following formula:

if distance > 0:
    return 1.0 - distance
return -1.0 * distance

Yes it is supposed to be in that way, try to understand the metrics:
* For L2/euclidean distance, the more the similar vector are the lesser their distance will be therefore higher the normalized score will be since it is calculated in langchain using the following formula

1.0 - distance / math.sqrt(2)

* However, for inner product, the more the similar vector are the higher the dot product will be therefore the lower the normalized score will be since it is calculated in langchain using the following formula:

if distance > 0:
    return 1.0 - distance
return -1.0 * distance

Thanks @keenborder786 . I do not understand how normalized score is related to our discussion. My concern is about relevance score. Here is the definition of relevance score from official langchain faiss documentation.

And here is a more detailed output from MAX_INNER_PRODUCT case. As it is clearly visible, most similar document has the lowest relevance score (0.184) which is in contradiction to the definition of the relevance score. It should have had the greatest relevance score, compared to less similar documents.
The definition of relevance score does not mention any distance metric, thus I assume it is distance metric agnostic. Even if it is not agnostic the issue is still valid.

@habanoz Please see this line,  the scores are always normalized after similarity_search_with_relevance_scores has been called.

@habanoz Please see this line, the scores are always normalized after similarity_search_with_relevance_scores has been called.

Yes it is. I have debugged the code and have some idea of how it works.
But i did not mention the code so far. I am trying to articulate documentation and behaviour is different. (What happens in the code matters less. Maybe there is  bug in the code. Maybe it should not be normalized, maybe it should be normalized in a different way.)
@keenborder786 Do you think my understanding on the definition of relevance score is wrong, if so in what ways?
Thanks


about pair-wise and pixel-wise distillation for FCOS

Hi, i am trying to reimplement the results for FCOS, but the details is not introduced in your paper. So could you explain it in detail ?

I add the distillation item 'pairwise' on all level of fpn-features, which works well.
Besides, the pixelwise item is added to the cls-logits.
The initial loss looks like this:
2019-07-06 17:46:22,202 maskrcnn_benchmark.trainer INFO: eta: 1 day, 14:34:09  iter: 20  loss: 3.9805 (4.8004)  kd_logits: 0.0289 (0.0297)  loss_centerness: 0.6665 (0.6702)  loss_cls: 1.0147 (1.0264)  loss_reg: 1.9654 (2.7365)  sd_fea: 0.3358 (0.3376)  time: 1.4797 (1.5431)  data: 0.0300 (0.0717)  lr: 0.003333  max mem: 19266
This class will help you to build the distillation items in FCOS code.
class Sd_model(nn.Module):
"""
Main class for Generalized R-CNN. Currently supports boxes and masks.
It consists of three main parts:
- backbone
- rpn
- heads: takes the features + the proposals from the RPN and computes
detections / masks from it.
"""
def __init__(self, s_cfg, t_cfg):
    super(Sd_model, self).__init__()

    self.teacher = GeneralizedRCNN(t_cfg)
    self.student = GeneralizedRCNN(s_cfg)
    self.teacher.eval()
    for param in self.teacher.parameters():
        param.requires_grad = False
    self.kd_loss = CriterionKD()
    self.sd_mode = s_cfg.MODEL.SD_MODE
    self.sd_loss = CriterionSDcos_no()
    self.mimic_loss = CriterionMSE()

    self.mimic_loss = nn.ModuleList(
        [CriterionMSE(T_channle=t_cfg.MODEL.BACKBONE.OUT_CHANNELS, S_channel=s_cfg.MODEL.BACKBONE.OUT_CHANNELS) for
         _ in range(5)])

def forward(self, images, targets=None):
    if self.training:
        with torch.no_grad():
            sd_teacher, _ = self.teacher(images, targets)
        sd_student, losses = self.student(images, targets)
        sd_loss = {}

        if 'KD' in self.sd_mode:
            logits_t = sd_teacher['cls_logits']
            logits_s = sd_student['cls_logits']
            loss = 0
            for i in range(len(logits_s)):
                temp_loss = self.kd_loss(logits_s[i], logits_t[i])
                loss = loss + temp_loss
            sd_loss.update({'kd_logits': loss})

        if 'SD' in self.sd_mode:
            fea_t = sd_teacher['fpn_features']
            fea_s = sd_student['fpn_features']
            loss = 0
            for i in range(1, len(fea_s)):
                temp_loss = self.sd_loss(fea_s[i], fea_t[i])
                loss = loss + temp_loss
            sd_loss.update({'sd_fea': loss})
        if 'mimic' in self.sd_mode:
            fea_t = sd_teacher['fpn_features']
            fea_s = sd_student['fpn_features']
            loss = 0
            for i in range(len(fea_s)):
                temp_loss = self.mimic_loss[i](fea_s[i], fea_t[i])
                loss = loss + temp_loss
            sd_loss.update({'mimic_fea': loss})

        losses.update(sd_loss)
        return losses

    return self.student(images)

Thanks for your reply, and i have some questions.

Does it mean that kd_loss can be replaced with CriterionPixelWise, and mimic_loss can be replaced with CriterionPairWiseforWholeFeatAfterPool in your master codes ?
What is the loss weight of your pixel-wise loss and pair-wise loss ?
How to deal with the pixel-wise-loss for the model with only one class , since log-softmax is always 0 ?

yes
1
You can replace it with mse. But in our implementation, the log-softmax ('cls_logits') is not zero.

Thanks for your code and i have some questions.

In your reply to the last question, you mean that kd_loss can be replaced with CriterionPixelWise, and mimic_loss can be replaced with CriterionPairWiseforWholeFeatAfterPool.
I'm confused about which loss should be applied in the detection code, only CriterionPairWiseforWholeFeatAfterPool can be used for feature mimicking and cls-logits loss is appended ?
Meanwhile, what is self.sd_loss and self.sd_mode? Can you post your cfg file if it is convenient?

Thanks!