text:
Add E2E test to Digital Twin Repo

This commit containts:

Change of registry variables in Scorpio deployments and Digital Twin created deployment to
allow easier usage of local registry (to avoid pulling from private docker repo)
Bats/Detik based Kubernetes tests to check k8s resource status
Tests check operators and horizontal platform status
Automated the ingress setup for keycloak.local, alerta.local, ngsild.local urls
and respective updates in README.md
Automated K3s setup with two nodes and local registry
Linting of bats test files
Take mangement of postgres operator out of olm (since version on operatorhub is too old)
Upgrade of Postgres-operator to 1.7.1
Kubernetes version whcih is tested is 1.22

Closes #118

@wagmarcel is this the latest run for the CI? Seems to be failing
https://github.com/wagmarcel/DigitalTwin/actions/workflows/k8s-tests.yaml

@wagmarcel is this the latest run for the CI? Seems to be failing
https://github.com/wagmarcel/DigitalTwin/actions/workflows/k8s-tests.yaml

No. That was my tests runs. The test of this  PR is already listed in this  PR - see the 2nd check:.
https://github.com/IndustryFusion/DigitalTwin/runs/5253256772?check_suite_focus=true

My bad... I clicked on the branch at the top and ended up on the fork.

authors: sysarcher wagmarcel

repo: IndustryFusion/DigitalTwin


text:
Document that the module's files option does env substitution

Currently, neither the readme nor the option docs mention that services.minecraft-servers.servers.<name>.files performs environment substitution.
I just got bitten by this when working with binaries that were getting mysteriously corrupted, and the module mutating them was not something that I expected.
The ideal case scenario is IMHO that this is disabled by default and opt-in on each file, or at least opt-able out of, but it should really be documented. I can make a PR for either if it helps. :slightly_smiling_face:

It's technically documented under the environmentFile option, however I do agree that it should be documented under files as well. Making it toggleable should be pretty straight forward too, but would likely need some changes to the mkFiles script. Feel free to open PRs if you have the time :)

hi, sorry for not replying sooner. I kept thinking I'll find time for this some when, but I'm starting to see I won't be able to anytime soon. on top of that, I'm somewhat considering moving my infra over from systemd to nomad. while NixOS modules are superior in many ways, I'm starting to feel the need for a more flexible orchestrator, and would also prefer to spend less time worrying about every other NixOS service being completely unsandboxed. :)

I just found this without seeing this bug report.
This issue of doing env substitution blindly makes the files option unusable for setting up mods. And since symlinks puts a symlink directly to the Nix Store, it doesn't look like there's a proper way to declaratively install mods, at least not the way the README suggests.

The symlinks option is the proper way to declaratively install mods. Mods are binaries, so symlinking them to the nix store is perfectly fine and generally preferable, as it reduces on the space cost of copying files.

The symlinks option is the proper way to declaratively install mods. Mods are binaries, so symlinking them to the nix store is perfectly fine and generally preferable, as it reduces on the space cost of copying files.

The issue with this is that it's a symlink to the Nix Store and Paper (And probably other server codebases.) likes to create the plugin configs in the same directory as the jars... which it can't do since the Nix Store is read-only. This causes Paper to bail with a "read-only file system" because it can't write to the plugins directory symlink makes.
Unless there's some other way to get this to work? Is there a setting I overlooked where Paper can create plugin configs outside the plugins directory which is a symlink to the Nix Store?

<Tired opinion (not because of you but because I've dealt with this before)>
As far as I am concerned, this is because Paper is bad. Paper, and other plugin-centered projects, are the only ecosystem I've seen that feels like it has any dominion over the folder dedicated to putting binaries from the user. No other modloader does this. The fact that a mod port of a plugin did this (LuckPerms) frustrated me to the point where I just found an alternative instead.
</Tired opinion>
The proper way to work around this is to make symlinks individually in the manner you did with the files option, as opposed to symlinking directly to the mods folder. (I.e., "mods/mod.jar" = ...;) There isn't a better option because Paper tries to write to a directory it has no business writing to. You can, at minimum, do this a bit easier with mapAttrs.

Hmm, that's not a perspective I thought of. I honestly don't think it's a problem, but that's why it's opinion, I suppose.
What server do you recommend?

I exclusively use mod loaders and not plugins, so the use case is a bit different. For my part, I use Fabric and Quilt on all of my servers, including vanilla-compatible ones. Forge is also a possibility for highly modded ones, but since that isn't currently packaged (see #15), I just stick with the textiles.

Will be fixed by #116

source: gharchive/issue

authors: Infinidoge Misterio77 YaroKasear frantisekhanzlikbl

repo: Infinidoge/nix-minecraft

license: MIT

license_type: permissive

license_source: github-api


text:
Datasett: begrep og informasjonsmodeller

Legge inn en setning i Kommentar-feltet for Datasett: begrep, om at denne brukes kun når informasjonsmodell ikke brukes, og henvise til modelldcat-ap-no, eller at det bør være samsvar mellom disse når begge brukes.

Fiksa (#258)

repo: Informasjonsforvaltning/dcat-ap-no


text:
feat: frontpage/data-hunter sync

Resolves #130 #132 #138 #158 #159 https://github.com/Informasjonsforvaltning/fdk-team-private/issues/94 https://github.com/Informasjonsforvaltning/fdk-team-private/issues/87

Denne er allerede merget av https://github.com/Informasjonsforvaltning/fdk-frontend/pull/164

source: gharchive/pull-request

authors: Lillebo jeffreiffers

repo: Informasjonsforvaltning/fdk-frontend


text:
[L7J7] Pipeline reproduction (SPM - deriv)

Softwares
SPM12
Input data
derivatives (fMRIprep)
Additional context
List of tasks
Please tick the boxes below once the corresponding task is finished. :+1:

[ ] :ok_hand: A maintainer of the project approved the issue, by assigning a :checkered_flag:status: ready for dev label to it.
[ ] :deciduous_tree: Create a branch on your fork to start the reproduction.
[ ] :sunrise: Create a file team_{team_id}.py inside the narps_open/pipelines/ directory. You can use a file inside narps_open/pipelines/templates as a template if needed.
[ ] :inbox_tray: Create a pull request as soon as you completed the previous task.
[ ] :brain: Write the code for the pipeline, using Nipype and the file architecture described in docs/pipelines.md.
[ ] :blue_book: Make sure your code is documented enough.
[ ] :snake: Make sure your code is explicit and conforms with PEP8.
[ ] :microscope: Create tests for your pipeline. You can use files in tests/pipelines/test_team_* as examples.
[ ] :microscope: Make sure your code passes all the tests you created (see docs/testing.md).

@icorouge: I am adding you as assignee on this issue (just for the time of the hackathon) so that we can more easily see which pipelines are open for new contributions in https://github.com/orgs/Inria-Empenn/projects/1/views/1

Correlation results with 108 subjects : [0.93, 0.94, 0.93, 0.94, 0.94, 0.93, 0.94, 0.93, 0.95] with commit ba2b3dd

authors: bclenet cmaumet


text:
[ENH] add model U26C

[x] add bids stats model for U26C

Had to make some choices on how to define parametric regressors for SPM.
This seems to be handled differently for SPM in nipype: https://nipype.readthedocs.io/en/latest/api/generated/nipype.algorithms.modelgen.html#module-nipype.algorithms.modelgen
So I did put them in the software options.
I will try to do the same for the model from our teams to see if I can make this work without turning it into a headache.

Not sure if this is helpful here (and Remi you must know about this) but keeping a note so that I remember too...
Just heard about NARPS BIDS-stats-models example: https://bids-standard.github.io/model-zoo/exhibits/narps/model-narps_smdl.html from Alejandro.

Yup Rotem and I created this one and I think I took it as a first step to start building those ones: https://github.com/Inria-Empenn/narps_open_pipelines/tree/main/narps_open/models

authors: Remi-Gau cmaumet


text:
Survey's last page message don't fit displayed Timestamp after Platine extraction

Env
PROD Collecter
Survey
Any
Bug Descirption

quand on consulte le questionnaire d'une UE répondante, la date d'envoi de son questionnaire varie entre le moment où elle vient de l'envoyer (on voit alors la vraie date d'expédition par l'entreprise) et le moment où il y a eu l'extraction Platine (ond voit alors la date d'extraction depuis Platine, vers 6h) comme le montre les copies d’écran ci-dessous.
==> une fois l'extraction faite, on ne voit plus à quelle heure l'UE a expédié son questionnaire, d'autant qu'on n'a pas accès à la preuve de dépôt quand on clique dessus

Screenshot

Comportement attendu
Avoir une heure qui correspond à l'état
Solutions

~Changer la stratégie du batch pour ne plus update l'état du questionnaire lors de l'extraction~

https://github.com/InseeFr/stromae-dsfr/issues/133#issuecomment-2399272922

Changer le message suivant l'état du questionnaire

@AnneHuSKa Il faudrait déterminer l'autre message que l'on souhaite afficher dès que le batch d'extraction Platine soit passé.
Je ne sais pas trop à quel point il faut être proche de la "réalité technique" ou non.
Est-ce que tu as une idée ?

@JulienCarmona j'ai des idées pas forcément top : tu veux poser la question à Collecter ? Ce sont eux qui seront les plus concernés non  ?

Vu avec Collecter, dans un premier temps on va afficher:

Si VALIDATED on change rien
Si TOEXTRACT ou EXTRACTED:

retirer la date, le message devient: Vos réponses ont bien été envoyées.

Testé en visu recette avec un questionnaire tiré de PE dans l'état VALIDATED
{
 "stateData": {
   "state": "VALIDATED",
   "date": 1730217107584,
   "currentPage": "endPage"
 }
}

Avec les états TOEXTRACT et EXTRACTED
{
 "stateData": {
   "state": "TOEXTRACT",
   "date": 1730217107584,
   "currentPage": "endPage"
 }
}

authors: AnneHuSKa JulienCarmona laurentC35

repo: InseeFr/stromae-dsfr


text:
BUG: Linux internal build failure is silent

An issue was observed in the HASI repository where Linux wheel builds failed but jobs were marked as having completed successfully. MacOS and Windows wheels failed and were correctly marked as failed.
https://github.com/KitwareMedical/HASI/actions/runs/3750380351/jobs/6370024283
Steps to Reproduce
The HASI module depends on the ITKBoneEnhancement project. If ITKBoneEnhancement build outputs are not provided then HASI wheels are expected to fail.

Fetch ITK build artifacts (without ITKBoneEnhancement)
Try building HASI with ITKPythonPackage build scripts

Observed behavior
The HASI build begins inside the appropriate docker container and fails at the config stage. However, the failure does not seem to propagate from the container back to the host.

A similar issue was encountered in https://github.com/InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/issues/52 where a package failed to install inside the docker image, resulting in a build failure that is not caught by the GitHub Actions runner and subsequently reported as a success.
A minimum path to address this issue is to validate that the expected wheel / number of wheels is present in dist/ after the build process completes and before artifact upload is attempted.

Workaround introduced in https://github.com/InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/pull/53 so that a job fails if expected wheel output is not produced. Closing for now with the potential to reopen if this fix proves insufficient for tracing errors.


text:
Using Instasharp without a session

I am creating an Umbraco package, to do this I cannot use any ActionResult or a Session could you help advise an alternative so that I can have a 'Stateless' controller.
Thanks

The library is not tied to Sessions. You can store the data in any place.

repo: InstaSharp/InstaSharp

license_source: bigquery


text:
Question about an assert in IGListAdapter.m

This is a little strange.
#if DEBUG
    for (id object in objects) {
        IGAssert([object isEqual:object], @"Object instance %@ not equal to itself. This will break infra map tables.", object);
    }
#endif

When will [object isEqual:object] return NO? object won't be nil in the for-loop.
Could you please attach an example for this?

@PhilCai1993 before ab890fc6070f170a2db5a383a6296e62dcf75678 when we used -isEqual: to test diffable objects, we had a user bug where someone's equality implementation accidentally returned NO even when the object was the same pointer. The error was really difficult to track down, so we added this assert so it wont even happen again.
However, since we changed the equality method to -isEqualToDiffableObject:, this assert should be updated.

But I'm still confused...
How could [obj isEqualToDiffableObject:obj ] return NO?
-(BOOL)isEqualToDiffableObject:(id)object {
//   it returns NO when object === self, how could it happen?
}

@PhilCai1993 Purely by developer error. Non-obvious example:
@interface MyClass: NSObject
@property NSString *text;
@end

@implementation MyClass
- (BOOL)isEqualToDiffableObject:(id)object {
  if (![object isKindOfClass:[MyClass class]]) { return NO; }
  return [self.text isEqualToString:[object text]];
}
@end

Then you create and compare:
MyClass *left = [MyClass new];
NSLog(@"%zi", [left isEqualToDiffableObject:left]);
// prints "0" (aka NO)

That's b/c passing a message to nil returns a 0 value (NO in this case). Obviously this is fixed with a self == object check, but people make mistakes. The assert just makes a tricky-to-catch mistake impossible while debugging.

Thanks a lot!

repo: Instagram/IGListKit

license: mit


text:
About Identity Similarity...

In technical report, Fig. 6, "Jackie Chan" does not looks like reference image especially his nose. I supposed antelopev2 model should able to extract Jackie Chan very well as his images should be in Glint360k training data. Is this the limitation of face id encoder?
Also, the picture quality seems over saturated. Is it because of SDXL base model or your prompt?

It should be related to the weight scale. We don't tune the parameters carefully. Anyway, talk is easy, we will show you the code.

In technical report, Fig. 6, "Jackie Chan" does not looks like reference image especially his nose. I supposed antelopev2 model should able to extract Jackie Chan very well as his images should be in Glint360k training data. Is this the limitation of face id encoder?
Also, the picture quality seems over saturated. Is it because of SDXL base model or your prompt?

It may be a problem with prompt. I changed the prompt and base model to generate a new image. At the same time, our model is constantly being optimized.

@wangqixun which model were using here?

base model = https://civitai.com/models/43977?modelVersionId=227916
prompt = "cinema 4d render, high contrast, vibrant and saturated, sico style, dark and moody close-up shot of a handsome Saint-Pierrais man with a tired expression, (renaissance theme:1.1), colorful northern warrior, (glowing eyes:1.05),   dynamic pose, hooded robe,  surrounded by magical glow, floating ice shards, snow crystals, cold, windy background, frozen natural landscape in background  cinematic atmosphere, highly detailed, sharp focus, intricate design, 3d, unreal engine, octane render, CG best quality, highres, photorealistic, dramatic lighting, artstation, concept art, cinematic, epic Steven Spielberg movie still, sharp focus, smoke, sparks, art by pascal blanche and greg rutkowski and repin, trending on artstation, hyperrealism painting, detailed character design, matte painting, 4k resolution"
neg prompt = "asian, (worst quality, low quality, thumbnail:1.4), signature, artist name, web address, cropped, jpeg artifacts, watermark, username, collage, grid, nude, topless, nsfw, naked, nipples"
The style is not very stable. Generate the image again.

@wangqixun which model were using here?

base model = https://civitai.com/models/43977?modelVersionId=227916
prompt = "cinema 4d render, high contrast, vibrant and saturated, sico style, dark and moody close-up shot of a handsome Saint-Pierrais man with a tired expression, (renaissance theme:1.1), colorful northern warrior, (glowing eyes:1.05), dynamic pose, hooded robe, surrounded by magical glow, floating ice shards, snow crystals, cold, windy background, frozen natural landscape in background cinematic atmosphere, highly detailed, sharp focus, intricate design, 3d, unreal engine, octane render, CG best quality, highres, photorealistic, dramatic lighting, artstation, concept art, cinematic, epic Steven Spielberg movie still, sharp focus, smoke, sparks, art by pascal blanche and greg rutkowski and repin, trending on artstation, hyperrealism painting, detailed character design, matte painting, 4k resolution"
neg prompt = "asian, (worst quality, low quality, thumbnail:1.4), signature, artist name, web address, cropped, jpeg artifacts, watermark, username, collage, grid, nude, topless, nsfw, naked, nipples"
The style is not very stable. Generate the image again.

Correct it
base model = https://civitai.com/models/84040?modelVersionId=196039

authors: haofanwang renderless wangqixun

repo: InstantID/InstantID


text:
en la bandeja de proyectos POSTULACIÓN

REVISAR la sumatoría de gastos de los productos asociados al proyecto, verificar los estados que está leyendo.
Este es el código con problemas:

Saludos,

Actualmente el proyecto está con solicitud de cambio en construcción, el monto original del proyecto es de $37.683.300 y en la solicitud de cambio hasta el momento se han utilizado $34.433.310, falta que se completen $3.249.990. Dado que no se ha utilizado todo el monto del proyecto, arroja el error cuando se intenta enviar la solicitud de cambio a revisión, quedando en evidencia en la imagen siguiente:

@danteghirardelli estimado;
Necesito que realice lo siguiente:
Crear un proyecto y llevarlo hasta la aprobación. Adjuntar el reporte.
Crear una SC, elimine un gasto.
Descargue el reporte desde postulación.
El monto del proyecto siempre debería ser el mismo,

Se creará nuevo Proyecto entidad ADO para posteriormente realizar Solicitud de Cambio

Gastos en Bienes y Raíces

@felipedonoso @pabloespinoza
Se continúa con la creación de Proyecto.

@felipedonoso @pabloespinoza
Se realizará Solicitud Cambio Proyecto 1800042030

Generar Solicitud de Cambio

Se modifican los Gastos

En Reporte se mantiene correctamente el Monto $11.000.000 original

Se modificó el Gasto sin aprobar la Solicitud de Cambio. Reporte se mantiene con monto Real y original.
Prueba solicitada se da por aprobada.
@felipedonoso @pabloespinoza
Gracias Pablo por la ayuda.

Se crea nuevo Proyecto COCH

Proyecto 1800042031 Postulado

@felipedonoso @pabloespinoza

@felipedonoso @pabloespinoza
Continuar con Proyecto 1800042031
Evaluar Proyecto

Proyecto Seleccionado

Se creará Solicitud de Cambio para Proyecto 1800042031

Generar Solicitud de Cambio

Enviar Solicitud de Cambio

Consultar por mensaje
Se ingresa Gasto en Bienes y Servicios que supera El Monto Total del Proyecto originalmente Aprobado $10 millones.

Se modifica Total del Proyecto por uno válido.

@felipedonoso @pabloespinoza
Se continúa con la Solicitud de Cambio.

Postulación:
http://10.15.1.51/AltoRendimientoQA
Usuario: 15314968
Contraseña: federacion
Se sigue con la Solicitud de Cambio para proyecto 1800042031

Eliminar Solicitud de Cambio

@felipedonoso @pabloespinoza
¿Por qué cambio el Monto?

Costo total del producto: 10.000.000

Agregar un gasto en bienes y servicios por $6.000.000, buscando como fin validar la regla del 5%.
El sistema valido dicha prueba, indicando que el monto del producto supera los 10.000.000.
Se modifica el gasto por 5.000.000, se vuelve a validar y aparece el mensaje de la regla del 5%.
Se Elimina la SC, y el sistema tiene un error al indicar el monto del producto que paso de 10.000.000 a 15.000.000.
@felipedonoso @pabloespinoza

@felipedonoso @pabloespinoza
Crear nuevo Proyecto COCH "Tubito"

@felipedonoso @pabloespinoza
Revisemos Proyecto 1800042032

@felipedonoso @pabloespinoza
Se realiza Solicitud de Cambio para Proyecto 1800042033

Crear nuevo Proyecto COCH y posteriormente aprobar una Solicitud cambio.

@felipedonoso @pabloespinoza
Se continua con la creación de Proyecto "Usted Sabe"

Proyecto "Usted Sabe"

Geolocalización

@felipedonoso @pabloespinoza
Se continua con el proyecto.

Retomando el error detectado por @danteghirardelli 👍
Costo total del producto: 10.000.000

Agregar un gasto en bienes y servicios por $6.000.000, buscando como fin validar la regla del 5%.
El sistema valido dicha prueba, indicando que el monto del producto supera los 10.000.000.
Se modifica el gasto por 5.000.000, se vuelve a validar y aparece el mensaje de la regla del 5%.
Se Elimina la SC, y el sistema tiene un error al indicar el monto del producto que paso de 10.000.000 a 15.000.000.

1.- Se bajará le gasto en personal para poder obtener los 6.000.000 para bienes y servicios.
De 10.000.000 a 6.000.000:

2.- Modificando el monto a 5 millones:

3.- Se elimina la SC:

El error a sido corregido se elimina la SC y el proyecto vuelve al monto original:

@felipedonoso @pabloespinoza
Verificar Proyecto

Evaluar Proyecto Ingresado

@felipedonoso @pabloespinoza
Revisando Proyecto "Usted Sabe"

@felipedonoso @pabloespinoza
Se continua con Proyecto "Usted Sabe"
Evaluar Proyecto Ingresado

Postular

Proyecto 1800042036 Postulado

Evaluar Pre Seleccionado

Evaluar Proyecto Seleccionado

Evaluar Proyecto Aprobado

Reporte Antes SC
Proyecto - 1800042036_AntesSC.pdf
Después se continuará con este Proyecto 1800042036


text:
WEBAPP-562: Test content not found error poi

This pull request belongs to an issue on our bugtracker.
You can find it there by looking for an issue with the key which is mentioned in the title of this pull request.
It starts with the keyword WEBAPP.

The changes in FailureSwitcher are just what I think fits better to our mindset to prefer testing functunality. If you don't like it feel free to object :)

Examples for non-snapshot tests:
it('should show correct text', () => {
  const wrapper = shallow(<MyComponent />);
  expect(wrapper.text().includes('my text')).toBe(true);
});

const wrapper = shallow(
<button className='btn btn-primary'>OK</button>
);
const button = wrapper.find('.btn');
expect(button.text()).to.be.eql('OK');

authors: Taggotty maxammann

repo: Integreat/integreat-webapp


text:
Mismatch between the Self Link in apiserver - K8s plumbing working group documentation and the implementation

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: networks.kubernetes.cni.cncf.io
spec:
  group: kubernetes.cni.cncf.io
  version: v1
  scope: Namespaced
  names:
	plural: networks
	singular: network
	kind: Network
	shortNames:
	- net

Implementation: https://github.com/Intel-Corp/multus-cni/blob/122dbfb345ae4a13fd1d592723a0ba1603278dd9/multus/multus.go#L386

@s1061123 @dougbtv Creating a patch for it.

#58 Fixed in the PR

repo: Intel-Corp/multus-cni


text:
[hevce] Enable QP modulation

Pass QP mod parameters to driver

@saosipov , @lakulako , @vilichev , please review

Need to wait while typo would be fixed in libva interface.
Now it contain filed hierachical_flag but it should be hieraRchical_flag.

Relates to this https://github.com/intel/libva/issues/429

authors: alexelizarov dmitryermilov

repo: Intel-Media-SDK/MediaSDK


text:
RE1 closes windowed or full screen at beginning

It closes when you first enter the mansion or when you go into the dining room. Never had RE1 issues before this update the seed is
R710-XVX3-XNE7603LCF020149K49K0WZZZZZZZZZZ00Z
I was playing as Jill.

Does it happen on vanilla as well or just when you load the biorand mod?
Does it happen if you select some NPCs and BGMs, or disable those two things?

it doesn't happen on vanilla. It happens with and without the NPCs and BGMs disabled

Does it happen if use an older version of biorand?

No everything is fine with an older version of BioRand.

Unfortunately I can't reproduce it, so I am not sure why it is crashing for you.

ok the 3.01 update fixed it brother so I'm gonna close this

repo: IntelOrca/biorand


text:
The accuracy of the distance between 2 points is high in the center but is low on the edge, how can I improve it?

Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

Consider checking out SDK examples.
Have you looked in our documentations?
Is you question a frequently asked one?
Try searching our GitHub Issues (open and closed) for a similar issue.

All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)

Required Info

Camera Model
D435i

Operating System & Version
Win10

Language
python

Issue Description
Hi, sorry to bother you. I have read many issues but don't find the proper solution. I'm trying to measure the diameters of rebars in the RGB photos taken by realsense D435i. There is the problem that the accuracy of diameters is high for the rebars in the center but is low  for the rebars on the dege As shown in the following figure(the reality is on the up and left, the calculation is on the down and right using the Euclidean distance).

I'm thinking is there any key point ignored. I don't know whether is the problem that the pointcloud gained by python is not aligned correctly, because the rebars seems not to lie on the highest plcace and have a bias.

This is the code I transport the points from pixels to the camera coordinates(using the method of point cloud):
import pyrealsense2 as rs
import numpy as np
import cv2
''' camera setting '''
pipeline = rs.pipeline()
config = rs.config()
config.enable_stream(rs.stream.depth, 1280,720, rs.format.z16, 30)
config.enable_stream(rs.stream.color, 1920,1080, rs.format.bgr8, 30)
profile = pipeline.start(config)
pc = rs.pointcloud()
points = rs.points()
#Define filters
#Decimation:
decimation = rs.decimation_filter()
#Depth to disparity
depth_to_disparity = rs.disparity_transform(True)
disparity_to_depth = rs.disparity_transform(False)
#Spatial:
spatial = rs.spatial_filter()
spatial.set_option(rs.option.holes_fill, 0)             # between 0 and 5 def = 0
spatial.set_option(rs.option.filter_magnitude, 2)       # between 1 and 5 def=2
spatial.set_option(rs.option.filter_smooth_alpha, 0.5)   # between 0.25 and 1 def=0.5
spatial.set_option(rs.option.filter_smooth_delta, 20)   # between 1 and 50 def=20
#Temporal:
temporal = rs.temporal_filter()
temporal.set_option(rs.option.filter_smooth_alpha, 0.4)
temporal.set_option(rs.option.filter_smooth_delta, 20)
colorizer = rs.colorizer()
#Get info about depth scaling of the device
depth_sensor = profile.get_device().first_depth_sensor()
depth_scale = depth_sensor.get_depth_scale()
print("Depth Scale is: " , depth_scale)
#align to color
align_to = rs.stream.color
align = rs.align(align_to)
def get_aligned_images():
frames = pipeline.wait_for_frames()

#Apply filters
pc_filtered = decimation.process(frames)
pc_filtered = depth_to_disparity.process(pc_filtered)
pc_filtered = spatial.process(pc_filtered)
pc_filtered = temporal.process(pc_filtered)
pc_filtered = disparity_to_depth.process(pc_filtered).as_frameset()

#Align the depth frame to color frame
aligned_frames = align.process(pc_filtered)
aligned_depth_frame = aligned_frames.get_depth_frame()
aligned_color_frame = aligned_frames.get_color_frame()

img_color = np.asanyarray(aligned_color_frame.get_data())
img_depth = np.asanyarray(aligned_depth_frame.get_data())

aligned_depth_color_frame = colorizer.colorize(aligned_depth_frame)
img_depth_mapped = np.asanyarray(aligned_depth_color_frame.get_data())

return img_color, img_depth, img_depth_mapped, aligned_color_frame, aligned_depth_frame, aligned_frames

def get_3d_camera_coordinate(depth_pixel, aligned_color_frame, aligned_depth_frame, aligned_frames):
x = np.round(depth_pixel[1]).astype(np.int64)
y = np.round(depth_pixel[0]).astype(np.int64)
#pointcloud
pc.map_to(aligned_color_frame)
points = pc.calculate(aligned_depth_frame)
points.export_to_ply("../frame_test.ply", aligned_color_frame)

vtx = np.asanyarray(points.get_vertices())
#print('vtx_before_reshape: ', vtx.shape)
vtx = np.reshape(vtx, (1080, 1920, -1))
#print('vtx_after_reshape: ', vtx.shape)

camera_coordinate = vtx[y][x][0]
#print ('camera_coordinate: ',camera_coordinate)
dis = camera_coordinate[2]

return dis, camera_coordinate

Hi @weicuiting  As the Decimation filter will be reducing the resolution of the depth image, are measurements more accurate if you comment out the Decimation filter, please?

It's really appreciate for the quick apply. I just tried to comment out the Decimation filter, and the trend did not change(low accuracy onthe edge) even worse.

If the measurements are accurate at the center but become increasingly inaccurate when moving towards the edge of the image, this is usually because of an inaccuracy in the depth-color alignment.  You seem to have applied alignment correctly in your script though and placed the align process after the post-processing filter list as Intel recommend.
Does accuracy improve if you align color to depth instead of depth to color by changing the align_to instruction from 'color' to 'depth'.
align_to = rs.stream.depth

As you are using pc.calculate to generate the point cloud and map_to to map color onto the depth points, it may not actually be necessary to use align_to to align depth to color.

Thank you for the responce! I tried 'align_to = rs.stream.depth', the trend still didn't changed. More important, it is not suitbale for my program to use  'align_to = rs.stream.depth' . This would result in the decreasing of RGB resolution and the black edges which affects the segmentation accuracy of rebars in the RGB photos(as the green masks shown in the following pictures).

Are you able to comment out the align instructions and let map_to perform the pointcloud alignment as suggested above at https://github.com/IntelRealSense/librealsense/issues/11293#issuecomment-1371935666

I comment out the align part, icluding 3 lines:
align to color
#align_to = rs.stream.color      ## commen out(1)
#align = rs.align(align_to)      ## commen out(2)
def get_aligned_images():
frames = pipeline.wait_for_frames()

#Apply filters
pc_filtered = decimation.process()
pc_filtered = depth_to_disparity.process(pc_filtered)
pc_filtered = spatial.process(pc_filtered)
pc_filtered = temporal.process(pc_filtered)
pc_filtered = disparity_to_depth.process(pc_filtered).as_frameset()

#Align the depth frame to color frame
#aligned_frames = align.process(pc_filtered)      ## commen out(3)
aligned_depth_frame = pc_filtered.get_depth_frame()
aligned_color_frame = pc_filtered.get_color_frame()

img_color = np.asanyarray(aligned_color_frame.get_data())
img_depth = np.asanyarray(aligned_depth_frame.get_data())

aligned_depth_color_frame = colorizer.colorize(aligned_depth_frame)
img_depth_mapped = np.asanyarray(aligned_depth_color_frame.get_data())

return img_color, img_depth, img_depth_mapped, aligned_color_frame, aligned_depth_frame, aligned_frames

But in the process of calculate the 'vtx', an IndexError occurred: index 1578 is out of bounds for axis 0 with size 640, where the 1578 is from RGB while the 640 is from depth. Should I change the x and y pixel values according to the resolution rate(rate x = 640/1920, rate y = 360/1080)?
def get_3d_camera_coordinate(depth_pixel, aligned_color_frame, aligned_depth_frame, aligned_frames):
x = np.round(depth_pixel[1]).astype(np.int64)
y = np.round(depth_pixel[0]).astype(np.int64)
# 计算点云
pc.map_to(aligned_color_frame)
points = pc.calculate(aligned_depth_frame)
#points.export_to_ply("../frame_test.ply", aligned_color_frame)

vtx = np.asanyarray(points.get_vertices())
# print('vtx_before_reshape: ', vtx.shape)  # 921600
vtx = np.reshape(vtx, (360,640, -1))
# print('vtx_after_reshape: ', vtx.shape)  # (720, 1280, 1)

camera_coordinate = vtx[y][x][0]
# print ('camera_coordinate: ',camera_coordinate)
dis = camera_coordinate[2]

"""dis = aligned_depth_frame.get_distance( np.round(x).astype(np.int64), np.round(y).astype(np.int64))        # 获取该像素点对应的深度
# print ('depth: ',dis)       # 深度单位是m
camera_coordinate = rs.rs2_deproject_pixel_to_point(depth_intrin, depth_pixel, dis)
# print ('camera_coordinate: ',camera_coordinate)"""

return dis, camera_coordinate

Yes, I would recommend the x and y pixel values according to the resolution rate.  align_to uses the RealSense SDK's 'align processing block' to automatically adjust for differences between the depth and color streams such as different resolutions.  As far as I am aware, these automatic adjustments for differences do not take place with map_to.

Can I understand by this way that it's better to keep the same resolution between RGB and depth(such as 1280*720) if I use 'map_to'. Because  the resolution rate maybe cause the bias too?

Yes, if using map_to I recommend using the same resolution for both.

It's really sorry to let you waiting. I was just calculating the results. I used the same solution(1280*720) for the RGB and depth. And comment out the 'Decimation filter' and 'align_to' to keep the depth resolution. But the result is the worst until now:

Would the big bias cause by the different HOV between RGB and depth?When using the 'map to' alone didn't align the RGB and depth even they have the same resolution?
Currently, the original method(using 'align_to' and 'map to') is better. Is there any other method to improve the edge inaccuracy using depth-color alignment? Can I get the pointcloud using python as accurately as using realsense viewer?

Comparing your code to the align_depth2color.py example that the script seems to be based on, I note that you use this line:
aligned_frames = align.process(pc_filtered)
Whilst in align_depth2color_py it uses frames in the brackets instead of pc_filtered.
aligned_frames = align.process(frames)
The frames information comes from the frames = pipeline.wait_for_frames() line a little earlier in the script.

Does this mean that I can't use the filters or use the filters after align?
frames = pipeline.wait_for_frames()
aligned_frames = align.process(frames)
or
frames = pipeline.wait_for_frames()
aligned_frames = align.process(frames)
pc_filtered = decimation.process(aligned_frames)
pc_filtered = depth_to_disparity.process(pc_filtered)
pc_filtered = spatial.process(pc_filtered)
pc_filtered = temporal.process(pc_filtered)
pc_filtered = disparity_to_depth.process(pc_filtered).as_frameset()

You can still use the filters, yes.
Intel's recommendation is to place align.process after the post-processing filter list.  This is a recommendation rather than a requirement though, and there are rare cases where an application has performed much better when placing align.process before the post-processing filters.

I have tried using align before filters, but it's a pity that the method didn't work.Is there other methods to improve the align accuracy or depth quality?  (I'm think is there any problem with the depth quality)
How does the realsense viewer get the pointcloud? How can I get the pointcloud using python as accurately as using realsense viewer ? (can any setting files export from viewer and then import to python)

My understanding is that the RealSense Viewer pointcloud in its 3D mode is based on pc.calculate and map_to, and does not make use of align_to.  RealSense Viewer is also a C++ application rather than a Python one.
You could check whether there is a mis-calibration of your camera's depth sensing by resetting it to its factory-new default calibration in the RealSense Viewer using instructions at https://github.com/IntelRealSense/librealsense/issues/10182#issuecomment-1019854487

OK, I'll calibrate the camera again. Does I just need to do the on_chip calibration, tare calibration and dynamic calibration?
Except the problem of align, how can I improve the depth quality, which kind of setting is useful to reduce the volatility of rebar lines that is stright actually?

Whilst on-chip calibration can be used to calibrate the camera, simply using the Viewer's factory-default calibration reset can work just as well.
On-chip calibration improves depth image quality, whilst tare calibration improves depth measurement accuracy.
Dynamic Calibration is a different method of calbration to on-chip that has the benefit of being able to calibrate the RGB sensor too.
The grid of rebar objects has the potential to confuse the depth sensing algorithm of the camera by forming a repetitive pattern (a series of similar looking objects in horizontal and vertical arrangements, like ceiling / floor tiles).  Intel have a guide at the link below to reducing the neative impact of repetitive patterns.
https://dev.intelrealsense.com/docs/mitigate-repetitive-pattern-effect-stereo-depth-cameras

Thank you for the links, I'll have a try!

Sorry to bother again, is there any method to plot the points on the pointcloud.ply imported from map_to?(I  want to check the point location on the pointcloud)

Once a ply is exported then you can import it into other tools and also pointcloud processing libraries such as PCL and Open3D but not import a .ply directly back into the RealSense SDK and access its depth information.  A .bag file is the best format for reading recorded depth data back into an SDK script.

Is there any recommended samples for Open3D?

There are some Open3D examples for RealSense at the link below.
http://www.open3d.org/docs/0.12.0/tutorial/sensor/realsense.html
The official RealSense documentation for the Open3D wrapper also has some Python example code.
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/open3d

Thank you very much! I'll have a try!

Hi @weicuiting  Do you require further assistance with this case, please?  Thanks!

Case closed due to no further comments received.

authors: MartyG-RealSense weicuiting

repo: IntelRealSense/librealsense


text:
hardware_reset generates "failed to set power state"  in C++ application

|---------------------------------|------------------------------------------- |
| Camera Model   = D455
| Firmware Version  = 5.13.00.50
| Operating System & Version Linux = Ubuntu 18.04
| Kernel Version (Linux Only)  =  ?
| Platform  = nVidia Jetson Nano
| SDK Version   = ?
| Language = C++                          |
|
Issue Description
My C++ app operates three D455 cameras.  Normally it starts and runs correctly.  I would like to add a feature that monitors some info and then may decide to perform a hardware reset on a single camera (not all three), and then re-enable the steams and re-start the pipeline for that one camera (leaving the other two running as they originally were).
My attempt to do this is not working.  All I did was run my code to determine if a reset is warranted (this part does work), and if it is, perform a hardware reset and then repeat the same code I used to originally (successfully) start up the camera.
When I try the hardware_reset(), the OS throws an exception "failed to set power state" and the app stops.  The reset/restart code I tried using appears below:
// Below, variables g_list_of_cameras, serials, and ctx have been previously defined before this code block executes
// This next block assumes that the devices of g_list_of_cameras are in the order Camera 1, 2, 3.  If not, it won't work.
// Note that each "for" loop should only do anything for 1 device and skip all others:
int cn = 0;
for (auto&& dev : g_list_of_cameras)
{
	cn += 1;
	if (cn != camera) continue;

	cout << "resetting camera #" << camera << ", please wait ..." << endl;
	dev.hardware_reset();
	rs2::device_hub hub(ctx);
	dev = hub.wait_for_device();
	sleep(3);
}

// Re-Start streaming pipe for the reset device
cn = 0;
for (auto&& serial : serials)
{
	cn += 1;
	if (cn != camera) continue;

	cout << serial << "\n\r";
	rs2::pipeline pipe(ctx);
	rs2::config cfg;
	cfg.enable_device(serial);
	cfg.disable_all_streams();
	waitKey(10);

	cfg.enable_stream(RS2_STREAM_COLOR,    _FWIDTH, _FHEIGHT, RS2_FORMAT_BGR8, _CAM_FRAME_RATE);
	cfg.enable_stream(RS2_STREAM_DEPTH,    _FWIDTH, _FHEIGHT, RS2_FORMAT_Z16,  _CAM_FRAME_RATE);
	cfg.enable_stream(RS2_STREAM_INFRARED, _FWIDTH, _FHEIGHT, RS2_FORMAT_Y8,   _CAM_FRAME_RATE);

	pipeline_profile selection = pipe.start(cfg);
}

Should it be possible to use hardware_reset() on a camera more than once after initial powerup?  What might be wrong with what I am doing?

Hi @jpfsaunders  There is not a C++ example of resetting a single specific camera by its serial number, though a RealSense team member provided one for Python at https://github.com/IntelRealSense/librealsense/issues/5428#issuecomment-564482167 that takes the approach of generating a list of all attached cameras with the ctx.query_devices() instruction and then querying a serial number in that list.
There is also a C++ reset script at https://github.com/IntelRealSense/librealsense/issues/9287#issuecomment-867826974 that cycles through all attached cameras.  This script also uses ctx.query_devices()

Hi @MartyG-RealSense ,
Thank you for the quick response.  The Python example is exactly what I am doing in C++;  for me it only works once on powerup and then if I try it a second time after that I get an error.  I will look through the C++ reset script to see what they are doing but it looks more involved so it may take me a bit to figure out what is happening there.

Thanks very much, @jpfsaunders - I look forward to your next report.  Good luck!

Hi @jpfsaunders  Do you have an update about this case that you can provide, please?  Thanks!

Hi @MartyG-RealSense ,
I have not made any progress, and this particular issue has been bumper down on my priority list.  The C++ script does not appear to be doing anything different than what I am already doing.  About the only thing I can think of is to try to reset the USB controller on my hardware (Jetson Nano) separately, either before or at the same time as performing the hardware_reset().  I am not sure how to do that, but I will experiment once I can get back to looking at this.
I would say we can close this issue.  I will open a new one later if I can't figure out a workaround.

Okay, thanks very much @jpfsaunders for the update.

authors: MartyG-RealSense jpfsaunders


text:
python application crashed when import pyrealsense2 on Win7

The device is a D415(Driver verision: 2.30.0.0), and installed SDK2.0 (Intel RealSense SDK - win7 - 2.35.2.1897). The viewer works as expected.
And installed python3.6.10 by miniconda, and "pip install pyrealsense2" successfully.
when i tried to "import pyrealsense2", it crashed. The error is attached.
https://support.intelrealsense.com/hc/user_images/JEkOxjDK-7M-hQ0fmg6Zng.jpeg
thanks,

@liukelinlin, could you please try to build the pyrealsense2 from source for Python3 for Win7?
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python#windows
Building the SDK2 for Win7 on either WIndows 7 or Windows 10 environment:
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_windows.md
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_win7.md#building-from-source
Thank you

Please let us know if further assistance is needed. Thank you.
The ticket will be closed in 7 days if there is no other question on the same topic.


text:
Could not find a model in internlm/internlm-xcomposer-7b-4bit with a name in gptq_model-4bit-128g.safetensors, model.safetensors

I encountered this error trying to run python examples/example_chat_4bit_en.py. Thanks for any help.
 FileNotFoundError: Could not find a model in internlm/internlm-xcomposer-7b-4bit with a name in gptq_model-4bit-128g.safetensors, model.safetensors. Please specify the argument model_basename to use a custom file name.

Same issue here.

check #51 works for me.

repo: InternLM/InternLM-XComposer


text:
[Bug] ImportError: This modeling file requires the following packages that were not found in your environment: configuration_internlm. Run pip install configuration_internlm

Describe the bug
This bug rises recently when running the code provided on huggingface, which was not in previous version.
ImportError: This modeling file requires the following packages that were not found in your environment: configuration_internlm. Run pip install configuration_internlm
Environment
python=3.8
transformers=4.31.0
Other information
No response

Unless I pass revision='' to fix a previous version. So it seems that there is something wrong with the latest version.

同样的问题

authors: QichangZheng fairyshine

repo: InternLM/InternLM


text:
[Bug] 量化glm4-9b-chat模型报错

Checklist

[X] 1. I have searched related issues but cannot get the expected help.
[X] 2. The bug has not been fixed in the latest version.
[X] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug

量化glm4-9b-chat模型报错,量化命令如下:
export HF_MODEL=/sdd/model/lmdeploy/model/glm-4-9b-chat
export HF_MODEL=/sdd/model/lmdeploy/model/glm-4-9b-chat
export trust_remote_code=True
export HF_ENDPOINT=https://hf-mirror.com
lmdeploy lite auto_awq    $HF_MODEL   --calib-dataset 'ptb'   --calib-samples 128   --calib-seqlen 2048   --w-bits 4   --w-group-size 128   --batch-size 1   --search-scale False   --work-dir $WORK_DIR
Reproduction

量化glm4-9b-chat模型报错,量化命令如下:
export HF_MODEL=/sdd/model/lmdeploy/model/glm-4-9b-chat
export HF_MODEL=/sdd/model/lmdeploy/model/glm-4-9b-chat
export trust_remote_code=True
export HF_ENDPOINT=https://hf-mirror.com
lmdeploy lite auto_awq    $HF_MODEL   --calib-dataset 'ptb'   --calib-samples 128   --calib-seqlen 2048   --w-bits 4   --w-group-size 128   --batch-size 1   --search-scale False   --work-dir $WORK_DIR
Environment
(lmdeploy) [root@localhost ~]# lmdeploy check_env
/data/conda/anaconda3/envs/lmdeploy/lib/python3.8/site-packages/transformers/utils/hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
  warnings.warn(
sys.platform: linux
Python: 3.8.19 | packaged by conda-forge | (default, Mar 20 2024, 12:47:35) [GCC 12.3.0]
CUDA available: True
MUSA available: False
numpy_random_seed: 2147483648
GPU 0: NVIDIA GeForce RTX 3060
GPU 1: Tesla T4
CUDA_HOME: /usr/local/cuda-12.2
NVCC: Cuda compilation tools, release 12.2, V12.2.128
GCC: gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
PyTorch: 2.2.2+cu118
PyTorch compiling details: PyTorch built with:
  - GCC 9.3
  - C++ Version: 201703
  - Intel(R) oneAPI Math Kernel Library Version 2022.2-Product Build 20220804 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v3.3.2 (Git Hash 2dc95a2ad0841e29db8b22fbccaf3e5da7992b01)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - LAPACK is enabled (usually provided by MKL)
  - NNPACK is enabled
  - CPU capability usage: AVX512
  - CUDA Runtime 11.8
  - NVCC architecture flags: -gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_90,code=sm_90
  - CuDNN 8.7
  - Magma 2.6.1
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.8, CUDNN_VERSION=8.7.0, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-stringop-overflow -Wsuggest-override -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast -Wno-missing-braces -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.2.2, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=1, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF,

TorchVision: 0.17.2+cu118
LMDeploy: 0.5.2+
transformers: 4.43.3
gradio: Not Found
fastapi: 0.111.1
pydantic: 2.8.2
triton: 2.2.0
NVIDIA Topology:
        GPU0    GPU1    CPU Affinity    NUMA Affinity
GPU0     X      SYS     0-11,24-35      0
GPU1    SYS      X      12-23,36-47     1

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

Error traceback
No response

Please set --search-scale False

我一张T4 一张RTX3060ti 共28G显存,不够量化么,为啥提示显存不足呀  看错误提示并没有用到我的GPU1 进行量化,好像只有GPU0 参与1  然后显存溢出了

量化不支持多卡，设计的时候是逐层，内部按 batch_size 1 跑的，理论上再大的模型，一块卡都够了。

可以试试标定用 --calib-seqlen 512

好像可以了  这个参数是做什么的呢

虽然量化了  但我还是跑不起来  28G显存跑9B量化理论上应该没问题的吧

加一个 --cache-max-entry-count=0.3 试试

加了参数是可以跑起来了,但是我的GPU 0确并没有参与进来，只有gpu1 进行推理，俩个显卡分别为T4和3060ti，这是为什么呢

如果加了--tp=2 参数 那么启动就会报以下错误:

目前的版本 shape 不能被均分到两块卡上，跑不了。

也就是我只能单卡运行了么

对，单卡。要想提高吞吐量，可以启两个服务，做一下负载均衡。https://lmdeploy.readthedocs.io/en/latest/serving/proxy_server.html

那单卡的话 我怎么指定哪个卡运行呢 ？

'CUDA_VISIBLE_DEVICES' 环境变量

好的 那如果只允许单卡的话 那我想跑更大的模型怎么办,比如72b的 ,也没有这么大显存的单卡呀。。。

大部分模型可以被 tp 整除，只是这个模型 shape 不行。

哦哦 好的

authors: AllentDan MdcGIt

repo: InternLM/lmdeploy


text:
🛑 eidum.no is down

In 7e17bdf, eidum.no (https://eidum.no) was down:

HTTP code: 0
Response time: 0 ms

Resolved: eidum.no is back up in d3a67e3 after 25 minutes.

repo: Intus-AS/Types-status


text:
Master -> Main Rename

Part of https://github.com/Islandora/documentation/issues/1595

@Islandora-Devops/committers bump

@rosiel :bowing_man:

repo: Islandora-Devops/ansible-role-matomo


text:
Configuration page WSOD when Tomcat is down

If Tomcat is down when visiting the general configuration page '/admin/config' will WSOD and report to the log GuzzleHttp\Exception\ConnectException: cURL error 7: Failed connect to 127.0.0.1:8080; Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in GuzzleHttp\Handler\CurlFactory::createRejection() (line 185 of /var/www/html/drupal/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php)..
To be honest, I don't know why the general configuration page crashes when Tomcat is down, but it does.
To reproduce:

Spin up a box
Visit `http://localhost:8000/admin/config' which should load fine.
vagrant ssh
sudo systemctl stop tomcat8
Visit `http://localhost:8000/admin/config' which will WSOD.
Visit the recent log messages page (http://localhost:8000/admin/reports/dblog) and see the error listed.

Resolved with https://github.com/Islandora/islandora/commit/2a1024c19a4b495c64fb88d4260e8d7ebea1f9b5

authors: seth-shaw-unlv whikloj

repo: Islandora/documentation


text:
Update travis_setup_drupal.sh

update scripts because of bad update to phpcs.
Require  8.3.13 since 8.3.14 breaks, see https://www.drupal.org/project/coder/issues/3262291

Currently testing via this PR: https://github.com/Islandora/islandora_defaults/pull/64

@Islandora/8-x-committers
This is holding up at least 3 PR's right now:

https://github.com/Islandora/controlled_access_terms/pull/78
https://github.com/Islandora/islandora_defaults/pull/64
https://github.com/Islandora/islandora/pull/862

Using the examples I was able to determine this should work.

authors: DonRichards rosiel


text:
[ANDROID] - Notifications do not trigger onForegroundEvent

Notifications do not trigger onForegroundEvent (Android)
I did several tests, I do not understand how to solve it.
In my project I am using iterable, firebase messaging and notifee.
the question is that when a new notification arrives from iterable I receive it from firebase and it is shown automatically.
In android when I press that notification with the app open, nothing happens, no notifee event is executed where I can give an action in the code, the opposite happens in IOs, if the onForegroundEvent function of notifee is executed.
How can I implement an onPress in android, or how can I solve the problem?
I don't know if this issue should go here or in another of the packages I mentioned.
I am going to show the versions of the libraries and how I implemented it.
    "@iterable/react-native-sdk": "1.3.17",
    "@notifee/react-native": "7.8.2",
    "@react-native-firebase/analytics": "18.7.3",
    "@react-native-firebase/app": "18.7.3",
    "@react-native-firebase/crashlytics": "18.7.3",
    "@react-native-firebase/dynamic-links": "18.7.3",
    "@react-native-firebase/messaging": "18.7.3",
    "@react-native-firebase/perf": "18.7.3",
    "@react-native-firebase/remote-config": "18.7.3"

// Firebase notification events setup
  FirebaseMessaging().setBackgroundMessageHandler(handleRemoteNotification);
  FirebaseMessaging().onMessage(handleRemoteNotification);
  FirebaseMessaging().onTokenRefresh(updatePushNotificationToken);
  FirebaseMessaging().setAutoInitEnabled(true);

// Push android notifications setup
  await notifee.createChannel({
    ...channel,
    vibration: true,
    importance: AndroidImportance.HIGH,
    sound: 'default',
  });

 // Handle onNotificationPress while the app is running
  notifee.onForegroundEvent(({ type, detail }) => {
    console.log('\n\n', '# foreground', type, '\n\n');
    if (!detail.notification) return;

    switch (type) {
      case EventType.PRESS:
      case EventType.ACTION_PRESS:
        handlePushNotificationPressed(detail.notification);
    }
  });

  // Handle onNotificationPress while the app is closed
  notifee.onBackgroundEvent(async ({ type, detail }) => {
    console.log('\n\n', '# background', type, '\n\n');

    if (!detail.notification) return;

    switch (type) {
      case EventType.PRESS:
      case EventType.ACTION_PRESS: {
        handlePushNotificationPressed(detail.notification);

        // Remove the notification
        if (detail.notification?.id) {
          await notifee.cancelNotification(detail.notification.id);
        }
      }
    }
  });

   // Iterable setup
   const config = new IterableConfig();
  config.autoPushRegistration = true;

  const initialized = await Iterable?.initialize(
        env.iterableApiKey,
        config,
      );

    Iterable?.setEmail(user);

the code looks too simple, it is worth noting that when I receive an event from firebase and the notification is iterable I do not show it a second time with notifee

EDIT 1:
to explain a little bit about the execution flow

I send a notification from iterable with the app open but in the background.
Firebase catches it and executes onMessage or the callback of setBackgroundMessageHandler
As it is a notification from iterable, I don't execute any action with Notifee, otherwise it would be duplicated.
Then if I press that notification, it opens the application but nothing happens, no Notifee event is executed.

I was testing and the difference I can find between this notification and the one I launch from notifee is the channelID, which is the firebase default, although I don't think it has any relevance fcm_fallback_notification_channel

Hi @LcsGrz, thanks for reaching out. Can you test extending your Firebase service to the Iterable service so it can forward onMessageReceived and onNewToken calls to IterableFirebaseMessagingService.handleMessageReceived and IterableFirebaseMessagingService.handleTokenRefresh, respectively?
Reference: https://support.iterable.com/hc/en-us/articles/360035019712-Iterable-s-Android-SDK#handling-firebase-push-messages-and-tokens

@jena-chakour
Hi :D , I hope you are doing well, I was testing but I am not so sure how I can debug this in android, what I did was to create the java file in the android folder and in the manifest I added the following line
<service android:name=".MyFirebaseMessagingService" />
package com.p;

import android.util.Log;

import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.iterable.iterableapi.IterableFirebaseMessagingService;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;

public class MyFirebaseMessagingService extends FirebaseMessagingService {
    @Override
    public void onMessageReceived(RemoteMessage remoteMessage) {
        Log.d( "onMessageReceived");
        IterableFirebaseMessagingService.handleMessageReceived(this, remoteMessage);
    }

    @Override
    public void onNewToken(String s) {
         Log.d( "onNewToken");
        IterableFirebaseMessagingService.handleTokenRefresh();
    }
}

and then run npx react-native log-android
but nothing happens :(

authors: LcsGrz jena-chakour

repo: Iterable/react-native-sdk


text:
Run command for generating paylond with bash

This is just for testing to see if the workflows succeed here. It needs to be in a PR because otherwise the workflow isn't trigerred.

works, yey

repo: ItsDrike/mcstatus


text:
to lowercase folder names

all

done

repo: IvanVnucec/cubesat-adcs


text:
Why should I use it very slow？

My data is just a few thousand。

not helpful in any way, no details
plus, performance depends largely on the back-end store you're using

@Ivshti  i use it in electron.
no back-end store。

you can't possibly use it without a back-end store, as linvodb3 cannot be used without a back-end store


text:
Can't extract pretrained models

Hi,
We tried to extract the pretrained models from googledrive but when we are going to open them in both linux and windows, they appear to be corrupted.

Hi, you don't need to extract the checkpoint which can directly loaded by pytorch.

authors: AIprogrammer FabioTarocco


text:
Remove Custom Select Box

http://jdrf.github.io/design-system/dist/components.html#forms

@fuhton PR submitted:
https://github.com/JDRF/design-system/pull/273

authors: RachelRVasquez fuhton

repo: JDRF/design-system


text:
Task_excercise code review request

Modified code to match google standard, added more comments, modified classes and changed main.

Remove files
Then add a git ignore files for the build directory. Exclude something that is not [ cmake, cpp , h or .hpp. ]


text:
TROJ_GEN.R002V01IT23

This is probably a false positive, but since the penultimate version this has been detected in Virustotal

Obviously it's a false positive. Don't know why now it's reporting the app as a malware but it's completely false. The project is open source and everyone can read the code and search malicious behaviors.


text:
Microzed freezes after some hours of operation

This is an unpredictable bug: the server on Microzed looses connection with BLACS worker after some operation time.
I suggest using sipyco, zprocess or  Cap&Proto

Also protobuf could work since it is well maintained.

repo: JQIamo/jane


text:
Possible improvements for library

This PR adds:

Add types for Observable Notification and Network
Add documentation to operators
Change network.connection API to use fromEventPattern
Add errors where approriate

These probably need some test coverage running in a real browser such as Karma tests.

This is amazing! thanks a lot for all the work you put into that! Are you still working on something or can I merge this?

@JWO719 if the tests pass green it's ready to merge :)
At the moment they are highly mocked.  I tried investigating Jest in the browser, I can get puppeteer to work but not webdriver. Also JSDom causes similar issues.
Without figuring out a way to test them natively (and not sure geolocation is possible) this was the best solution I could come up with.

@JWO719 See #2 for more improvements on this branch.  That change has a bigger change in the repo itself (using @nrwl/nx) but now also has the outline of an app that can be used to run in browser, also run E2E tests (as Jest will only ever be mockable)

I'll close this in favor of #2


text:
Operators in Constraints

I would like to know if it was possible to include the option to add up properties of variables in the constraints section. Let's see an example: I have a scenario where a farmer wants to optimise his profits by evaluating the most profitable growing option:
{ 	"name": "Crop Rotation Problem", 	"optimize": "Gross Margin", 	"opType": "max", 	"constraints": { 		"field0": { 			"max": 1 		}, 		"field1": { 			"max": 1 		}, 		"Wheat": { 			"max": 10 		} 	}, 	"variables": { 		"field00": { 			"field0": 1, 			"Wheat": 3.6, 			"Gross Margin": 3052.44 		}, 		"field01": { 			"field0": 1, 			"Summer Wheat": 3.6, 			"Gross Margin": 1787.58 		}, 		"field02": { 			"field0": 1, 			"Summer Barley": 3.6, 			"Gross Margin": 1789.65 		}, 		"field10": { 			"field1": 1, 			"Corn": 11.9, 			"Gross Margin": 7243.830000000001 		}, 		"field11": { 			"field1": 1, 			"Soybeans": 11.9, 			"Gross Margin": 4710.235 		}, 		"field12": { 			"field1": 1, 			"Onions": 11.9, 			"Gross Margin": 46602.325000000004 		}, 	}, 	"ints": { 		"field00": 1, 		"field01": 1, 		"field02": 1, 		"field10": 1, 		"field11": 1, 		"field12": 1, 	} }
Now for example imagine there was a policy restriction only allowing the farmer to grow a maximum of 75% of his entire acerage with the sum of Wheat and Summer Barley. To solve this, it would be nice if the Solver would be able to handle the following:
{ 	"name": "Crop Rotation Problem", 	"optimize": "Gross Margin", 	"opType": "max", 	"constraints": { 		"field0": { 			"max": 1 		}, 		"field1": { 			"max": 1 		}, 		"Wheat" + "Summer Barley": { 			"max": 10 		} 	},...
Maybe there is a nicer and mathematically more appealing way to achieve this, but for now that's the only way I could think of.
Thanks already for the awesome work!

Hi Toffi,
I think that the simplest way would be to add the contribution to a constraint that corresponds to the maximum total area (maxFields here) for all the variables that have an impact on the total area (all the variables in this case):
"constraints": {
   "maxFields": { "max": 10 },
   "field0": { "max": 1 },
   "field1": { "max": 1 },
   "Wheat": { "max": 10 } }
},
"variables": {
   "field00": { "maxFields": 1, "field0": 1, "Wheat": 3.6, "Gross Margin": 3052.44 },  }
   "field01": { "maxFields": 1, "field0": 1, "Summer Wheat": 3.6, "Gross Margin": 1787.58 },
   "field02": { "maxFields": 1, "field0": 1, "Summer Barley": 3.6, "Gross Margin": 1789.65 },
   "field10": { "maxFields": 1, "field1": 1, "Corn": 11.9, "Gross Margin": 7243.83 },
   "field11": { "maxFields": 1, "field1": 1, "Soybeans": 11.9, "Gross Margin": 4710.235 },
   "field12": { "maxFields": 1, "field1": 1, "Onions": 11.9, "Gross Margin": 46602.325 },
}

What do you think?

Nice, that makes a lot of sense! Though I'm still struggling with another concept related to this issue: the policy may force our example farmer to grow a minimum of 2 crops on his farm. In GAMS one could create a variable CropsUsed and check whether the sum of CropsUsed was greater than 2. Now I don't see a way to get this to match the setup above, I was thinking of assigning different values for each crop, but realised that it would not get me any further. Do you probably have an idea? Thanks a lot already!

I am not sure I understand. If you want to force a minimum number of fields, you can achieve it the following way:
"constraints": {
   "cropsUsed": { "min": 2, "max": 10 },
   "field0": { "max": 1 },
   "field1": { "max": 1 },
   "Wheat": { "max": 10 } }
},
"variables": {
   "field00": { "cropsUsed": 1, "field0": 1, "Wheat": 3.6, "Gross Margin": 3052.44 },  }
   "field01": { "cropsUsed": 1, "field0": 1, "Summer Wheat": 3.6, "Gross Margin": 1787.58 },
   "field02": { "cropsUsed": 1, "field0": 1, "Summer Barley": 3.6, "Gross Margin": 1789.65 },
   "field10": { "cropsUsed": 1, "field1": 1, "Corn": 11.9, "Gross Margin": 7243.83 },
   "field11": { "cropsUsed": 1, "field1": 1, "Soybeans": 11.9, "Gross Margin": 4710.235 },
   "field12": { "cropsUsed": 1, "field1": 1, "Onions": 11.9, "Gross Margin": 46602.325 },
}

Notice that I just renamed maxFields into cropsUsed and added a lower bound to the constraint.

Sorry for being unclear, I think the first example is too minified. The farmer can only grow one kind of plant on each of his fields. He has multiple options though, for field0 example he has 9 options (field00 - field 08), for field1 he has only 5 options. He would like to chose the combination of options leading to the highest gross margin, which in this case would be to grow Onions on both field0 and field1. But the policy requires him to grow at least 2 crops on his entire farm (or even 3 if he had more than 2 fields), so any other combination would be acceptable, like field0 Onions and field1 Winter Wheat.
{
"name": "Crop Rotation",
"optimize": "Gross Margin",
"opType": "max",
"constraints": {
"field0": {
"max": 1
},
"feld1": {
"max": 1
},
"Potato": {
"max": 10
}
},
"variables": {
"field00": {
"field": 1,
"Sugar Beets": 11.9,
"Gross Margin": 9915.792
},
"field01": {
"field": 1,
"Greening": 11.9,
"Gross Margin": 11.9
},
"field02": {
"field": 1,
"Winter Wheat": 11.9,
"Gross Margin": 10121.07
},
"field03": {
"field": 1,
"Winter Barley": 11.9,
"Gross Margin": 8123.695000000001
},
"field04": {
"field": 1,
"Winter Rye": 11.9,
"Gross Margin": 6995.218
},
"field05": {
"field": 1,
"Summer Barley": 11.9,
"Gross Margin": 5935.2
},
"field06": {
"field": 1,
"Oats": 11.9,
"Gross Margin": 7517.308
},
"field07": {
"field": 1,
"Triticale": 11.9,
"Gross Margin": 6527.24
},
"field08": {
"field": 1,
"Onions": 11.9,
"Gross Margin": 46494.196
},
"feld10": {
"feld1": 1,
"Summer Wheat": 2.8,
"Gross Margin": 1389.98
},
"feld11": {
"feld1": 1,
"Summer Barley": 2.8,
"Gross Margin": 1391.65
},
"feld12": {
"feld1": 1,
"Winter Rye": 2.8,
"Gross Margin": 1639.4109999999998
},
"feld13": {
"feld1": 1,
"Triticale": 2.8,
"Gross Margin": 1529.98
},
"feld14": {
"feld1": 1,
"Onions": 11.9,
"Gross Margin": 46494.196
}
},
"ints": {
"field0": 1,
"field1": 1,
"field2": 1,
"field3": 1,
"field4": 1,
"field5": 1,
"field6": 1,
"field7": 1,
"field8": 1,
"feld10": 1,
"feld11": 1,
"feld12": 1,
"feld13": 1,
"feld14": 1
}
}
I hope that helps clarifying the issue, I've been thinking about it all day and it's driving me crazy. Thought about assigning prime numbers to each crop and then dividing the sum of them through each individual prime number (if the results was even, then just one crop would be grown), but a) this only works for 2 crops (not 3 or even more) and b) I still can't use operators in the constraint section.
Thanks for helping me out!

Basically you want to get at least n different types of crops. The solution would be to use the "big M" method. In your example, the idea is to force diversity of crops to 2. Let's say there are only 3 types of crops b, r and o (for barley, rye and onion), we can create 3 binary variables y_b, y_r and y_o corresponding to whether each crop is grown or not (binary variable => value either 0 or 1).
Then we can create a constraint y_b + y_r + y_o >= 2 (diversity constraint), that will force our diversity to be at least 2.
Now, we need to force those binary variables to 0 or 1 when the correspond crops are grown. 2 constraints per type of crops are needed: one to restrain the binary variable to 0 and one to force it to 1:

The restrain constraint is quite straightforward: y_o <= nb_onion_fields (can be rewritten 0 <= nb_onion_fields - y_o). This constraint ensures that if no onion field is grown, the associated binary variable will be 0.
The force constraint is a tiny bit more tricky: nb_onion_fields <= y_o * M (can be rewritten nb_onion_fields - y_o * M <= 0). This constraint ensures that if onion is grown, the associated binary variable will be 1. Notice that the value for M should be big enough so that it does not constraint the number of onion fields you can grow.

Here is the json formulation for what I stated above (by the way, the simpler the example the better).
{
    "name": "Crop Rotation",
    "optimize": "Gross Margin",
    "opType": "max",
    "constraints": {
        "field0": {
            "max": 6
        },
        "feld1": {
            "max": 6
        },
        "cropsUsed": {
            "max": 10
        },
        "diversity": {
            "min": 2
        },
        "restrainOnion": {
            "min": 0
        },
        "restrainSummerBarley": {
            "min": 0
        },
        "restrainWinterRye": {
            "min": 0
        },
        "forceOnion": {
            "max": 0
        },
        "forceSummerBarley": {
            "max": 0
        },
        "forceWinterRye": {
            "max": 0
        }
    },
    "variables": {
        "growOnion": {
            "diversity": 1,
            "restrainOnion": -1,
            "forceOnion": -999
        },
        "growSummerBarley": {
            "diversity": 1,
            "restrainSummerBarley": -1,
            "forceSummerBarley": -999
        },
        "growWinterRye": {
            "diversity": 1,
            "restrainWinterRye": -1,
            "forceWinterRye": -999
        },
        "field00": {
            "field0": 1,
            "cropsUsed": 1,
            "Winter Rye": 11.9,
            "Gross Margin": 6995.218,
            "restrainWinterRye": 1,
            "forceWinterRye": 1
        },
        "field01": {
            "field0": 1,
            "cropsUsed": 1,
            "Summer Barley": 11.9,
            "Gross Margin": 5935.2,
            "restrainSummerBarley": 1,
            "forceSummerBarley": 1
        },
        "field02": {
            "field0": 1,
            "cropsUsed": 1,
            "Onions": 11.9,
            "Gross Margin": 46494.196,
            "restrainOnion": 1,
            "forceOnion": 1
        },
        "feld10": {
            "feld1": 1,
            "cropsUsed": 1,
            "Summer Barley": 2.8,
            "Gross Margin": 1391.65,
            "restrainSummerBarley": 1,
            "forceSummerBarley": 1
        },
        "feld11": {
            "feld1": 1,
            "cropsUsed": 1,
            "Winter Rye": 2.8,
            "Gross Margin": 1639.411,
            "restrainWinterRye": 1,
            "forceWinterRye": 1
        },
        "feld12": {
            "feld1": 1,
            "cropsUsed": 1,
            "Onions": 11.9,
            "Gross Margin": 46494.196,
            "restrainOnion": 1,
            "forceOnion": 1
        }
    },
    "ints": {
        "field00": 1,
        "field01": 1,
        "field02": 1,
        "feld10": 1,
        "feld11": 1,
        "feld12": 1,
    },
    "binaries": {
        "growOnion": 1,
        "growSummerBarley": 1,
        "growWinterRye": 1
    }
}

You can see that I decided to set M = 999 but M=10 would have been sufficient since no more than 10 crops can be grown.

Wow that perfectly solves my issue! Thanks so much for your advice, hope farmers will benefit from it someday 👍

no problem, let us know if you need further help

Sorry for coming back at you, but as I was implementing and checking the code I realised it wasn't solving as expected. I attached a MWE for recreating the issue, sorry for that it's so long.
When solving the attached problem, the diversity constraint (diversity > 3) is fulfilled by growPotatoes having a value of 2, and growOnions having a value of 1, despite them being declared as binary variables. It looks like my declaration of these variables as binaries is being ignored somehow. Another constraint that restricts the amount of each pair of crops grown to 95% of the entire acerage also seems to be ignored (as this constraint should also enforce the diversity of crops to a minimum of 3).
Thanks for your help once again in advance!
crop_rotation.txt

Sorry for the delay,
One possible reason why it won't solve for particular problem configurations is because the solver can be numerically unstable (and loop forever) but it's rare. It is a work in progress to make it stable but it takes a consequent amount of time. If that is the reason, you might just have to wait for the update (a reasonable ETA may be not before 3 months).
Is it important for that configuration to work? Does your work relying on the solver need to be ready soon?

Well thanks for having a look once again!
The solver is used (as you already figured I guess) to optimize crop rotations for farmers considering different aspects. It's a university project, so it will be free of charge when available. Right now, I'm hoping to get it online some time next year, also releasing it on github then. If you're interested in the project or the way the tableau is created just drop me an email, as I don't feel the code is ready to be published yet.

Without digging too deep into it, what about something like this:

You have a farm that has 4 fields on it. You can only grow 1 crop per field. Your crop choices are:

Barley (not available in field 4 because ...)
Wheat
Summer Wheat
Soy (not available for field 3 because of ...)
Onions

You can only have 1 crop / field.

{
    name: "problem_2",
    opType: "max",
    optimize: "profit",
    constraints: {
        acres: {max: 100},
        a_limiter: {max: 75},
        f1: {max: 1},
        f2: {max: 1},
        f3: {max: 1},
        f4: {max: 1}
    },
    variables: {
        // Field 1 can grow these crops
        f1_barley: {acres: 1, a_limiter: 1, f1: 1, profit: ?},
        f1_wheat: {acres: 1, a_limiter: 1, f1: 1, profit: ?},
        f1_summer_wheat: {acres: 1, f1: 1, profit: ?},
        f1_soy: {acres: 1, profit: f1: 1, profit: ?},
        f1_onions: {acres: 1, f1: 1, profit: ?},

        // Field 2 can grow these crops
        f2_barley: {acres: 1, a_limiter: 1, f2: 1, profit: ?},
        f2_wheat: {acres: 1, a_limiter: 1, f2: 1, profit: ?},
        f2_summer_wheat: {acres: 1, f2: 1, profit: ?},
        f2_soy: {acres: 1, f1: 1, f2: 1, profit: ?},
        f2_onions: {acres: 1, f2: 1, profit: ?},

        // Field 3 can grow these crops...Notice Soy is Gone
        f3_barley: {acres: 1, a_limiter: 1, f3: 1,profit: ?},
        f3_wheat: {acres: 1, a_limiter: 1, f3: 1,profit: ?},
        f3_summer_wheat: {acres: 1, f3: 1, profit: ?},
        f3_onions: {acres: 1, f3: 1, profit: ?},

        // Field 4 can grow these crops...Notice Barley is Gone
        f4_wheat: {acres: 1, a_limiter: 1, f4: 1,profit: ?},
        f4_summer_wheat: {acres: 1, f4: 1, profit: ?},
        f4_soy: {acres: 1, f4: 1, profit: ?},
        f4_onions: {acres: 1, f4: 1, profit: ?},

    },
    ints: {
        f1_barley: 1,
        f2_barley: 1,
        ...
        ..
        .
        f4_onions: 1
    }
}

Thanks for the contribution! Being new to GitHub I just realized that I should close this issue, as the original question was resolved by bchevalier's answer (using the big M-Method).
The setup currently used is working similar to your approach, with some differences in the constraints to fulfill the requirements of the Common Agricultural Policy of the EU. The first issue is that each field is different in size, so restricting each crop production area to 75% of the total has to be done through the actual crop area grown. Assuming the total area would be 100, then
Wheat: 75 Soy: 75 ...
and in the variable
field1_option1: {field1: 1,  Wheat: 5.6, Profit: ?} field1_option2: {field1: 1, Soy: 5.6, Profit: ?}
Then, each combination of crops cannot exceed 95% of the cropping area, therefore the following is added to the constraints
WheatBarley: 95 WheatSoy: 95 ...
and in the variables
field1_option1: {field1: 1,  Wheat: 5.6, WheatBarley: 5.6, WheatSoy: 5.6, ..., Profit: ?} field1_option2: {field1: 1, Soy: 5.6, WheatSoy: 5.6, SoyOnions: 5.6, ..., Profit: ?}
As you can already see, the more growing options there are, the longer the constraints are going to be for each field.
Right now, as described above, this seems to be the source of the issues whith really long solve times for problems where this 95% constraints become binding.
To get a little closer to reality, even more constraints will be added, like available work hours during different times of the year, available machine hours and others. It would be perfect to achieve all this within JavaScript, as the available options for including GAMS are not as promising.

authors: JWally Toffi-123 bchevalier

repo: JWally/jsLPSolver

license: unlicense


text:
🛑 Glitch is down

In 64c1de5, Glitch ($GLITCH) was down:

HTTP code: 503
Response time: 244 ms

Resolved: Glitch is back up in 3adf780 after 26 minutes.

repo: JYFUX/upptime


text:
ci: Adjust size label thresholds for pull requests

Pull Request

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

#211  👈
main

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

Join @JackPlowman and the rest of your teammates on  Graphite

Merge activity

Oct 27, 11:19 AM EDT: A user merged this pull request with Graphite.

repo: JackPlowman/github-stats


text:
custom_commands.json, command groups, and aliases

still need to work on:
custom_commands system,
command groups (secondary/main),
command aliases,
parameters

Command Group: Ready
Custom Commands: Ready
Command aliases/parameters: Not Ready
Still need to move some of my custom commnds, doing it later

repo: Jackzmc/JackzCo-Bot


text:
计算机学院：请求完成通信工程2019级部分

[ ]  Update more experimental reports

[ ]  Update more notes

[ ]  Much more professional evaluations

Add "TODO-List heading" and thanks for your future contributions!


text:
Bullets within a bullet

Currently unable to list bullets within a bullet.
Jingwei

This is solved in my newest version. I'll close the issue once I merge my branch.

I've merged branches, this is now implemented.

authors: Sodaaaa szymczdm


text:
Add main.py to make package executable

This is convenient for running repository version with python -m psdash

Thanks!

authors: Jahaja techtonik

repo: Jahaja/psdash


text:
RxBinding need a new action for every click

I found I cannot use it to manager all my click code together. I alway setOnClickListenr for the same one ,and than I can create less OnClickListener object.

This is not a problem since these objects are so small. You would need to be allocating thousands of click listeners per second before it started to matter. No plans to change this.

thx. #close

thx.

authors: JakeWharton zouzhenglu

repo: JakeWharton/RxBinding


text:
Type '{ participants: true; }' is not assignable to type 'never'.ts(2322) (property) include: never

Type '{ participants: true; }' is not assignable to type 'never'.ts(2322)
(property) include: never

Thank you for reporting this issue, and for providing the screenshot. To help me understand and resolve the problem, could you please provide more details?

What were you doing when this issue occurred?
Can you provide any error messages or logs?
What browser and operating system are you using?
Are there specific steps I can follow to reproduce the issue?

Any additional information you can provide will be very helpful.

This happened from a fresh installation, just after I setup the database then I tried to run it, it happened.
Commands I used on setting up prisma;

yarn
yarn prisma init
yarn prisma migrate
yarn prisma migrate dev
yarn prisma db pull
npm run build && npm start

The error is likely happening because the Prisma Client that's being used to run the code doesn't match the Prisma schema. This can happen if the Prisma Client hasn't been regenerated after making changes to the schema.
Since you did a fresh clone and ran the Prisma setup commands, it's possible that the Prisma Client was not regenerated after running the migrations.
Here's what you can do to try and fix the issue:

You need to regenerate the Prisma Client to ensure that it matches the schema. You can do this by running the following command:

npx prisma generate

After regenerating the Prisma Client, you should rebuild the project to make sure that the newly generated client is being used. You can do this by running:

yarn build

Restart your development server to make sure that the changes are picked up.:

yarn dev

Also, based on the commands you listed, it seems you are using both npm and yarn at the same time, which I would recommend you not doing.

authors: JaleelB rodrigoricky

repo: JaleelB/callsquare


text:
Add support for Google Secure Scaffold

Its being every time more common the need of work on top of that scaffold.
https://github.com/google/gae-secure-scaffold-python
It would be great to have it as an option in the generator.
Is it doable?

Definitely is doable, but I think we should wait until we have a viable angular project for the generator as there isn't really a point to setting up the google scaffold for a react project.


text:
Add status command to bot

Might require some further formatting and code quality fixes but making the initial PR for now if anyone wants to have a look at it.
Fixes #2

Happy enough that the feature works and no compromising information is revealed from the status command, only things revealed are:
Instance name:
Instance State:
Public IP Address: (Should not be compromising assuming server network traffic rules are correctly configured, plus bot hoster can remove this line if they wish)
Last startup time:

May be worth moving the status lines messaged out to the config.json file but this will be under another issue if I decide it's worthwhile

repo: JamesMatchett/AWS-Discord-Bot


text:
Add more tests

For example to make sure that positional and keyword only identifiers are parsed correctly. *args and **kwargs.

Plucking some docstring_parser test holes here: https://github.com/JanEricNitschke/pymend/pull/69

repo: JanEricNitschke/pymend


text:
Statistics pages sorting

https://eoa.ee/?kool=true and https://eoa.ee/?hof=true are not sorted properly.
https://eoa.ee/?kool=true is not sorted at all.
https://eoa.ee/?hof=true seems to be sorted by "1. KOHTI" but secont sorting parameter is random.

What would be good criteria for sorting these tables? First places, then second places, then third places? Total of the count of the first three places?

I think overall participation might be the most relevant. For example, a student that has participated in 7 competitions but does not have any high places should be higher on the list than a person who has participated in one olympiad and achieved the third place there.

In that case, should all people who have participated in at least one contest be shown in the hall of fame? Currently, only students with at least one placement 1st-3rd are shown (source).

I prefer sorting based on participation. But I think that we have to decide how many participations are required to get there.  Some statistics (participation-how many students):
25-1   24-1    23-2    22-1    21-4
20-3   19-1   18-3     17-6    16-3
15-5   14-11  13-10  12-13  11-23
10-16  9-24   8-26    7-55     6-95
5-110  4-238  3-362  2-599  1-1729
So I think we should include everyone who has got TOP3 or at least 8 participations (This is open for discussion).

Note that there are currently 450 people with at least one top 3 placement in the database (502 in total when also counting others with >= 8 participations). Should the hall of fame display be based on how many people would be shown?

authors: JarlPatrick kaarelkivisalu marko213

repo: JarlPatrick/eoa


text:
Adding Shaders

Adding the Shaders.hx file

This is part 1 of it. I'll do the PlayState next.


text:
Refactoring for Binary Number Literals, Constants, etc.

If this exists in code:
private const int MaximumSize = 80000000;

var maximumSize = 80000000;

Offer a refactoring to reformat it like this:
private const int MaximumSize = 80_000_000;

var maximumSize = 80_000_000;

I personally find that much easier to read.

Note that VS has a "Separate thousands" refactoring:

However, I'd like this to be solution-wide, so I'll still do this as an interested reader looking for exercise :)

repo: JasonBock/Transpire


text:
Throwing Exception in validation flow

Hello, I inspect the repository and I got an issue about the validation way in the application layer.
According to following link, there is a RequestValidationBehavior to validate input data by using FluentValidation that is similar to ValidatorBehavior in eShopOnContainers. One of the issue is throwing exception in the code below.
https://github.com/JasonGT/NorthwindTraders/blob/c942193b02762561968c3981d9172e6e6fc6d274/Northwind.Application/Infrastructure/RequestValidationBehavior.cs#L33
I like ValidatorBehavior that MediatR  have provided for us, but if throwing exception is used in handling validation there could be a big problem by using it. The problem is controlling the flow of business by exceptions that is wrong. I have thought about modifying this line of code to avoid throwing exception, but I couldn't come up with an idea.

Hi @A-Soltani - thanks for your feedback. I think about this approach sometimes too. Perhaps a better approach would be to use a RequestResult. This could include properties such as Succeeded (was the request successful) and Errors[] (if not successful, what were the errors).
In this way, we have a consistent approach to return results, errors or otherwise.
What do you think - do you like this approach better?
Feedback from everyone else welcome.

As an example:
    public class RequestResult<T>
    {
        public bool Succeeded { get; set; }

        public IEnumerable<RequestError> Errors { get; set; }

        public T Result { get; set; }
    }

    public class RequestError
    {
        public string Code { get; set; }

        public string Description { get; set; }
    }

    public class GetCustomerDetailQuery : IRequest<RequestResult<CustomerDetailVm>>
    {
        public string Id { get; set; }
    }

The problem with this approach, is that the RequestError is quite generic in nature. An error type might be required to differentiate between authorisation, validation, not found and so on. Different types will be handled differently by an API client, 401, 400, 404, etc.
Thoughts?

Just reviewing eShopOnContainers, and they take the same ValidationException approach:
if (failures.Any())
{
    _logger.LogWarning("Validation errors - {CommandType} - Command: {@Command} - Errors: {@ValidationErrors}", typeName, request, failures);

    throw new OrderingDomainException($"Command Validation Errors for type {typeof(TRequest).Name}",
        new ValidationException("Validation exception", failures));
}

The goal should be to find the simplest approach. In this case, we could state that the initial responsibility is with the client to validate the request. If the client fails to do so, then this is an exceptional circumstance - hence the ValidationException is thrown. This is therefore the simplest approach.
Thoughts?

No feedback so I am going to close this issue.
If you're interested in an alternative approach take a look at the new implementation for the UserManagerService which returns a Result type; https://github.com/JasonGT/NorthwindTraders/blob/master/Src/Infrastructure/Identity/UserManagerService.cs

authors: A-Soltani JasonGT

repo: JasonGT/NorthwindTraders


text:
[BUG] Sensitivity

When setting the sensitivity of L2, R2, LS, RS to 0.8 there is always this error on editing the profile and editing is not possible:
System.ArgumentOutOfRangeException: Der Wert 0 ist für Value ungültig. Value sollte zwischen 'Minimum' und 'Maximum' liegen.
Parametername: Value
bei System.Windows.Forms.NumericUpDown.set_Value(Decimal value)
bei DS4Windows.Options.Reload(Int32 deviceNum, String name)
bei DS4Windows.DS4Form.ShowOptions(Int32 devID, String profile)
bei DS4Windows.DS4Form.tsBNEditProfile_Click(Object sender, EventArgs e)
bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

#102 fixes this.


text:
A lot of "Something went very wrong errors"

Hello Jean :D. Good to see this repository is doing well. I'm here because I decided to mess around with my MacOS Rice a little. I decided to reinstall your version of simple-bar rather than a friend's take on it. I see that on the usage of the command
git clone https://github.com/Jean-Tinland/simple-bar $HOME/Library/Application\ Support/Übersicht/widgets/simple-bar

This freaks simple-bar out and I don't know how to solve it

Thanks in advance for any help you can provide!

Also, I can't interact with the bar like I did the first time. It should be also be worth noting that yabai isn't installed. Is it a requirement?

Actually, installing Yabai fixed the issue. I'm just a idiot xd.

Hi, I was indeed thinking about that since the 2 widgets which weren't working were depending on yabai to get their data.
No problem, I think I need to cleanup the readme because the "Compatibility & requirements" is a bit lost in the middle of everything.
Glad it is working now!

This happened to me, but I had yabai installed. I managed to fix it by entering the right yabai path in the cmd + , settings, and upgrading/reinstalling yabai. Works beautifully now. Just wanted to say it for anyone that is having the same problem

This happened to me, but I had yabai installed. I managed to fix it by entering the right yabai path in the cmd + , settings, and upgrading/reinstalling yabai. Works beautifully now. Just wanted to say it for anyone that is having the same problem

authors: Jean-Tinland Obl1que WarpWing

repo: Jean-Tinland/simple-bar


text:
Is it possible to only retrieve information about a specific flight by searching for the flight number?

Por exemplo, apenas retornar as informações do voo LA3467 da LATAM

Unfortunately, no. You can only retrive by its airline or its registration.


text:
Syntax errors in bloblang expressions not checked by linter

The linter assumes that every bloblang expression is valid, this can cause invalid bloblang expressions anywhere in your configuration to prevent benthos from starting, despite the lint passing.
Expected behaviour: Linter flags all syntax errors in all bloblang expressions (including interpolated expressions).

This is done and will be in the next release: https://github.com/Jeffail/benthos/commit/cd97a28ab8d87c95fd07029309d92136d28bf5a0

authors: Jeffail nicktelford

repo: Jeffail/benthos


text:
Want to differentiate between retweets and "normal" tweets

Is there a way to differentiate between retweets, and normal tweets? I am scraping tweets from a set of usernames, eg. tweetCriteria = got.manager.TweetCriteria().setUsername('barackobama').
Using this criteria I get both normal tweets and retweets, however they are not differentiated.
Any advice on making adjustments to the script is welcome.

This would be very useful, and I too would like this feature.

There are several ways, try following in Python if you want to modify code and do it

Search for div with class "QuoteTweet u-block js-tweet-details-fixer". If this div exist that means it's a retweet.

Check if div with class "js-tweet-text-container" has  or plain text. If it has Plain text, its not Retweet, if it has  then it is

You can get the details of Retweeted data by looking into <'div class="QuoteTweet u-block js-tweet-details-fixer"><'div class="QuoteTweet-container">...

you can also search for text " Retweeted " in entire json response. If it exists, it is a Retweet.

authors: bellwolf rahulha rax87

repo: Jefferson-Henrique/GetOldTweets-python


text:
Super Large Sourcemap

Related to #108, but thought this would warrant it's own possible discussion thread.
As you can see in the output below the app.js.map file is 12.4mb. What would cause a sourcemap file to grow so large? Anything I'm possibly doing wrong?
> cross-env NODE_ENV=production webpack --progress --hide-modules

 DONE  Compiled successfully in 34886ms

                                             Asset       Size  Chunks                    Chunk Names
                                           /app.js    2.53 MB       1  [emitted]  [big]  app
  fonts/icons.eot?25a32416abee198dd821b0b17a198a8f    76.5 kB          [emitted]
  fonts/icons.ttf?1dc35d25e61d819a9c357074014867ab     153 kB          [emitted]
 fonts/icons.woff?c8ddf1e5e5bf3682bc7bebf30f394148    90.4 kB          [emitted]
fonts/icons.woff2?e6cf7c6ec7c2d6f670ae9d762604cb0b    71.9 kB          [emitted]
                                             /0.js    65.3 kB       0  [emitted]
  fonts/icons.svg?d7c639084f684d66a1bc66855d193ed8     392 kB          [emitted]  [big]
                                       /styles.css     496 kB       1  [emitted]  [big]  app
                                         /0.js.map     470 kB       0  [emitted]
                                       /app.js.map    12.4 MB       1  [emitted]         app
                                   /styles.css.map   88 bytes       1  [emitted]         app
                                     manifest.json  539 bytes          [emitted]

Here are my config files
Any ideas?
Thanks again!

Your app.js is very large too. As far as I know, sourcemaps are often 5 to 10 times larger that the source file itself. But the browser doesn't download the sourcemaps, if they are not needed.
But I think 2.53 MB after minification is your bigger problem.

I've got it down to 1.1mb now after a few other optimizations, but still getting 10mb+ sourcemaps. You're saying that's to be expected?

I think you're talking about these?
new webpack.optimize.UglifyJsPlugin({
      sourceMap: true,
      compress: {
        warnings: false,
        screw_ie8: true,
        conditionals: true,
        unused: true,
        comparisons: true,
        sequences: true,
        dead_code: true,
        evaluate: true,
        if_return: true,
        join_vars: true,
      },
      output: {
        comments: false
      },
    })

I was curious and tried that too. My output was exactly the same size. Only the the output.comments = false saved 1 KB on one file (from 280KB to 279KB).
I have no idea why that saved so much in your situation.
But I also don't see the mix-manifest.json in your output. Do you use the current laravel-mix version?
Here my output to compare:
> cross-env NODE_ENV=production webpack --progress --hide-modules

 DONE  Compiled successfully in 40789ms

                                   Asset       Size  Chunks                    Chunk Names
       /js/0.e97fe5c0195b81c24655.js.map    5.48 MB    0, 6  [emitted]
           /js/0.e97fe5c0195b81c24655.js     600 kB    0, 6  [emitted]  [big]
           /js/2.e1d5ef9a8751c57c2226.js    5.17 kB    2, 6  [emitted]
      /js/vendor.75c7220f46ad969b6a63.js     280 kB    3, 6  [emitted]  [big]  vendor
    /js/frontend.c5d9b369644b972943d0.js    50.7 kB    4, 6  [emitted]         frontend
     /js/backend.2aef4bf88b748fd757aa.js    6.05 kB    5, 6  [emitted]         backend
    /js/manifest.d41d8cd98f00b204e980.js    1.59 kB       6  [emitted]         manifest
       /css/app.1842a9963041feec44c9.css     159 kB    4, 6  [emitted]         frontend
           /js/1.f1f62619ad496dab1015.js    13.9 kB    1, 6  [emitted]
       /js/1.f1f62619ad496dab1015.js.map    73.8 kB    1, 6  [emitted]
       /js/2.e1d5ef9a8751c57c2226.js.map    37.5 kB    2, 6  [emitted]
  /js/vendor.75c7220f46ad969b6a63.js.map    2.05 MB    3, 6  [emitted]         vendor
/js/frontend.c5d9b369644b972943d0.js.map     337 kB    4, 6  [emitted]         frontend
   /css/app.1842a9963041feec44c9.css.map  110 bytes    4, 6  [emitted]         frontend
 /js/backend.2aef4bf88b748fd757aa.js.map    41.7 kB    5, 6  [emitted]         backend
/js/manifest.d41d8cd98f00b204e980.js.map    14.4 kB       6  [emitted]         manifest
                       mix-manifest.json  628 bytes          [emitted]

As you can see my souremaps are also ~10 times as large as my source files are. I think thats normal. The same is true if I look out the output from vue.js project which was generated with the vue-cli.
Did you look at your app.js without your UglifyJsPlugin modifications? Was is minified etc?

Does your app.js contain the sourcemap?
Some configurations inline the sourcemaps to your .js file - which creates a massive .js file

Yeah the sourcemaps will be large for an app that big. It shouldn't affect your production deploy.

authors: JeffreyWay OwenMelbz jkudish strebl

repo: JeffreyWay/laravel-mix


text:
Just a question. What is the reasoning behind this vue loader config?

Why does laravel-mix set esModule to false?
vue: {
    preLoaders: {},
    postLoaders: {},
    esModule: false
},

I'm asking because setups provided by vue-cli have this set to true. I tend to use require().default in specific situations, and using it becomes inconsistent for laravel-mix because this config makes me drop .default.

esModule: false option is no longer available in vue-loader v14+, laravel mix is using v13.
It has been set to false to keep mix behaviour non breaking

Of course


text:
Doesn't compile both less and sass files

I have following configuration:
mix.js('resources/assets/js/app.js', 'public/js').extract(['vue'])
.less('resources/assets/less/theme.less', 'public/css')
.sass('resources/assets/sass/app.scss', 'public/css');
However less files are not compiled, it works fine if I comment out .sass line.

Support for this was added just recently. Update your laravel-mix dependency to 0.6.0

authors: adriaanzon vedmant