text:
ValueError: Configurable 'BatchGaussianRandomFieldModule' doesn't have a parameter named 'n_fixed_fields'

Hi Stephan & Janni,
I read the NeuralGCM-precipitation paper and would like to run the model. But when I tried to open the checkpoint file of models_v1_precip_stochastic_precip_2_8_deg.pkl. I was told that Configurable 'BatchGaussianRandomFieldModule' doesn't have a parameter named 'n_fixed_fields'.
I printed the information of checkpoint file and found that n_fixed_fields was none.
Here is my code which can load the checkpoint files of deterministic models of NeuralGCM successfully before:
import gcsfs
import jax
import numpy as np
import pickle
import xarray
import gc
import pprint
from netCDF4 import Dataset
import time
from datetime import datetime, timedelta
from netCDF4 import num2date, date2num
from dinosaur import horizontal_interpolation
from dinosaur import spherical_harmonic
from dinosaur import xarray_utils
import neuralgcm
test whether jax could identify and find out GPU
jax.devices()
use downloaded weights
model_name = 'models_v1_precip_stochastic_precip_2_8_deg.pkl'
s_DirRead = ''
open the weights file
with open( s_DirRead + model_name, 'rb' ) as f:
ckpt = pickle.load(f)
print(ckpt.keys())
print(ckpt['model_config_str'])
model = neuralgcm.PressureLevelModel.from_checkpoint(ckpt)
Below are the error info:
ValueError                                Traceback (most recent call last)
Cell In[3], line 11
7     ckpt = pickle.load(f)
8 #     print(ckpt.keys())
9 #     print(ckpt['model_config_str'])
---> 11 model = neuralgcm.PressureLevelModel.from_checkpoint(ckpt)
14 # units_mapping = {
15 #     'u': 'meter / second',
16 #     'v': 'meter / second',
(...)
30 #     'PrecipitationMinusEvaporationDiagnostics.moisture_species =  ("specific_humidity", "specific_cloud_liquid_water_content", "specific_cloud_ice_water_content")',
31 # ])
File ~/.conda/envs/py_ai/lib/python3.12/site-packages/neuralgcm/api.py:572, in PressureLevelModel.from_checkpoint(cls, checkpoint)
559 @classmethod
560 def from_checkpoint(cls, checkpoint: Any) -> PressureLevelModel:
561   """Creates a PressureLevelModel from a checkpoint.
562
563   Args:
(...)
570     specified by the checkpoint.
571   """
--> 572   with gin_utils.specific_config(checkpoint['model_config_str']):
573     physics_specs = physics_specifications.get_physics_specs()
...
922   err_str = "Configurable '{}' doesn't include kwarg '{}' in its allowlist."
ValueError: Configurable 'BatchGaussianRandomFieldModule' doesn't have a parameter named 'n_fixed_fields'.
In bindings string line 82
BatchGaussianRandomFieldModule.n_fixed_fields = None
Thanks so much!
Sincerely,
Ziming

I had to update neuralgcm to version 1.1.0 and dinosaur to version 1.1.2 to resolve this issue

repo: neuralgcm/neuralgcm


text:
Mark recently intermittent tests as flaky

In order to prevent any transient network issues from showing false failures in our standard test runs, the tests that recently intermittently failed have been decorated as @flaky(max_runs=3).
ℹ Note: This required adding flaky as a new dev dependency to the repo.

@bfineran
LGTM, but wondering any reason 3 is chosen? If we are only looking to ignore transient failures, shouldn't 1/2 be enough?

@bfineran Good question. This was the suggested amount during the discussion with @markurtz @kazukageorge and @dhuangnm. Mark or others, please correct me if misremembered.

@bfineran
LGTM, but wondering any reason 3 is chosen? If we are only looking to ignore transient failures, shouldn't 1/2 be enough?

@bfineran Good question. This was the suggested amount during the discussion with @markurtz @kazukageorge and @dhuangnm. Mark or others, please correct me if misremembered.

I guess we can set it to 2 for now since it's likely to pass the second time.

source: gharchive/pull-request

authors: dbarbuzzi dhuangnm

repo: neuralmagic/sparsezoo

license_type: permissive

license_source: github-api


text:
copy zijieli-Jlee's fix for attention kernel layer test

Quick fix to #251

Thanks @dhpitt - this fixes the tests, merging.

authors: JeanKossaifi dhpitt

repo: neuraloperator/neuraloperator

license: MIT


text:
Make tests on matplotlib pass

Test: https://github.com/neuromation/template-base-image/blob/master/testing/recipes/commands/matplotlib__custom
Ignored in: https://github.com/neuromation/template-base-image/blob/master/testing/recipes-ignore/commands/matplotlib__custom

not actual

source: gharchive/issue

authors: YevheniiSemendiak artemlops

repo: neuro-inc/neuro-base-environment


text:
Repo structural refactor

This PR is a large structural refactoring of the project, mostly around factoring the utils_mod/utils into utils/.

Hi @niksirbi thanks a lot for your review, the changes are implemented in #81. If you are happy and can approve that would be great,cheers!

repo: neuroinformatics-unit/datashuttle


text:
ERROR: no curved landmarks constructed...

version: 2.2.2
data: sct_example_data
sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -l labels.nii.gz -param step=1,type=seg,algo=slicereg,metric=MeanSquares:step=2,type=seg,algo=bsplinesyn,iter=3,shrink=1,metric=MeanSquares:step=3,type=im,algo=syn,metric=CC,iter=1 -r 0

Check template files...
  OK: /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_T2.nii.gz
  OK: /Users/julien/code/spinalcordtoolbox/data/template/landmarks_center.nii.gz
  OK: /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_cord.nii.gz

Check parameters:
.. Data:                 t2.nii.gz
.. Landmarks:            labels.nii.gz
.. Segmentation:         t2_seg.nii.gz
.. Path template:        /Users/julien/code/spinalcordtoolbox/data/template
.. Path output:
.. Output type:          1
.. Remove temp files:    0

Parameters for registration:
Step #1
.. Type #seg
.. Algorithm................ slicereg
.. Metric................... MeanSquares
.. Number of iterations..... 10
.. Shrink factor............ 1
.. Smoothing factor......... 0
.. Gradient step............ 0.5
.. Degree of polynomial..... 3
Step #2
.. Type #seg
.. Algorithm................ bsplinesyn
.. Metric................... MeanSquares
.. Number of iterations..... 3
.. Shrink factor............ 1
.. Smoothing factor......... 1
.. Gradient step............ 0.5
.. Degree of polynomial..... 3
Step #3
.. Type #im
.. Algorithm................ syn
.. Metric................... CC
.. Number of iterations..... 1
.. Shrink factor............ 1
.. Smoothing factor......... 0
.. Gradient step............ 0.5
.. Degree of polynomial..... 3

Check input labels...

Create temporary folder...
mkdir tmp.160131174836_949683/

Copying input data to tmp folder and convert to nii...
sct_convert -i t2.nii.gz -o tmp.160131174836_949683/data.nii
sct_convert -i t2_seg.nii.gz -o tmp.160131174836_949683/seg.nii.gz
sct_convert -i labels.nii.gz -o tmp.160131174836_949683/label.nii.gz
sct_convert -i /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_T2.nii.gz -o tmp.160131174836_949683/template.nii
sct_convert -i /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_cord.nii.gz -o tmp.160131174836_949683/template_seg.nii.gz
sct_convert -i /Users/julien/code/spinalcordtoolbox/data/template/landmarks_center.nii.gz -o tmp.160131174836_949683/template_label.nii.gz

Smooth segmentation...
sct_maths -i seg.nii.gz -smooth 1.5 -o seg_smooth.nii.gz

Resample data to 1mm isotropic...
sct_resample -i data.nii -mm 1.0x1.0x1.0 -x linear -o data_1mm.nii
sct_resample -i seg_smooth.nii.gz -mm 1.0x1.0x1.0 -x linear -o seg_smooth_1mm.nii.gz
Position=(210,179,26) -- Value= 2
Position=(238,67,27) -- Value= 9
Useful notation:
210,179,26,2:238,67,27,9
sct_label_utils -i data_1mm.nii -p create -coord 210,179,26,2:238,67,27,9 -v 1 -o label_1mm.nii.gz

Change orientation of input images to RPI...
sct_image -i data_1mm.nii -setorient RPI -o data_1mm_rpi.nii
sct_image -i seg_smooth_1mm.nii.gz -setorient RPI -o seg_smooth_1mm_rpi.nii.gz
sct_image -i label_1mm.nii.gz -setorient RPI -o label_1mm_rpi.nii.gz
sct_crop_image -i seg_smooth_1mm_rpi.nii.gz -o seg_smooth_1mm_rpi_crop.nii.gz -dim 2 -bzmax

Straighten the spinal cord using centerline/segmentation...
sct_straighten_spinalcord -i seg_smooth_1mm_rpi_crop.nii.gz -s seg_smooth_1mm_rpi_crop.nii.gz -o seg_smooth_1mm_rpi_crop_straight.nii.gz -qc 0 -r 0 -v 1
/Users/julien/code/spinalcordtoolbox

Check input arguments:
  Input volume ...................... seg_smooth_1mm_rpi_crop.nii.gz
  Centerline ........................ seg_smooth_1mm_rpi_crop.nii.gz
  Final interpolation ............... spline
  Verbose ........................... 1

Create temporary folder...
mkdir tmp.160131174846_778885/

Copy files to tmp folder...
sct_convert -i seg_smooth_1mm_rpi_crop.nii.gz -o tmp.160131174846_778885/data.nii
sct_convert -i seg_smooth_1mm_rpi_crop.nii.gz -o tmp.160131174846_778885/centerline.nii.gz
cp data.nii data_1mm.nii
cp centerline.nii.gz centerline_1mm.nii.gz

Orient centerline to RPI orientation...
sct_image -i centerline_1mm.nii.gz -setorient RPI -o centerline_1mm_rpi.nii.gz

Get dimensions...
.. matrix size: 52 x 384 x 185
.. voxel size:  1.0mm x 1.0mm x 1.0mm

Smooth centerline/segmentation...
.. Get center of mass of the centerline/segmentation...
.. Smoothing algo = hanning
.. Windows length = 50

Get coordinates of landmarks along curved centerline...
Error during straightening on line 577
ERROR: no curved landmarks constructed...
/Users/julien/code/spinalcordtoolbox/scripts/sct_utils.py, line 98

strange, when running sct_straighten_spinalcord within the tmp folder, it works.
julien-macbook:~/sct_example_data/t2/tmp.160131174836_949683 $ sct_straighten_spinalcord -i seg_smooth_1mm_rpi_crop.nii.gz -s seg_smooth_1mm_rpi_crop.nii.gz -o seg_smooth_1mm_rpi_crop_straight.nii.gz -qc 0 -r 0 -v 1
/Users/julien/code/spinalcordtoolbox

Check input arguments:
  Input volume ...................... seg_smooth_1mm_rpi_crop.nii.gz
  Centerline ........................ seg_smooth_1mm_rpi_crop.nii.gz
  Final interpolation ............... spline
  Verbose ........................... 1

Create temporary folder...
mkdir tmp.160131175125_461092/

Copy files to tmp folder...
sct_convert -i seg_smooth_1mm_rpi_crop.nii.gz -o tmp.160131175125_461092/data.nii
sct_convert -i seg_smooth_1mm_rpi_crop.nii.gz -o tmp.160131175125_461092/centerline.nii.gz
cp data.nii data_1mm.nii
cp centerline.nii.gz centerline_1mm.nii.gz

Orient centerline to RPI orientation...
sct_image -i centerline_1mm.nii.gz -setorient RPI -o centerline_1mm_rpi.nii.gz

Get dimensions...
.. matrix size: 52 x 384 x 185
.. voxel size:  1.0mm x 1.0mm x 1.0mm

Smooth centerline/segmentation...
.. Get center of mass of the centerline/segmentation...
.. Smoothing algo = hanning
.. Windows length = 50

Get coordinates of landmarks along curved centerline...

Get coordinates of landmarks along straight centerline...

Pad input volume to account for landmarks that fall outside the FOV...
sct_image -i centerline_1mm_rpi.nii.gz -o tmp.centerline_pad.nii.gz -pad 68,30,30

Open padded centerline for reading...

Write NIFTI volumes...
.. File created: tmp.landmarks_curved.nii.gz
.. File created: tmp.landmarks_straight.nii.gz
cp tmp.landmarks_curved.nii.gz tmp.landmarks_curved_crop.nii.gz
cp tmp.landmarks_straight.nii.gz tmp.landmarks_straight_crop.nii.gz

Estimate b-spline transformation: curve --> straight...
isct_ANTSLandmarksBSplineTransform tmp.landmarks_straight.nii.gz tmp.landmarks_curved.nii.gz tmp.curve2straight_rigid.txt tmp.warp_curve2straight.nii.gz 5x5x10 3 LandmarksRealCurve.txt LandmarksRealStraight.txt 3 0
crop
isct_crop_image -i tmp.landmarks_straight.nii.gz -o tmp.landmarks_straight_crop.nii.gz -dim 0,1,2 -bmax
Cropping the following region:
Dimension 0: 63 125
Dimension 1: 191 253
Dimension 2: 23 221

Done! To view results, type:
fslview tmp.landmarks_straight_crop.nii.gz &

Concatenate rigid and non-linear transformations...
sct_concat_transfo -w tmp.curve2straight_rigid.txt,tmp.warp_curve2straight.nii.gz -d tmp.landmarks_straight_crop.nii.gz -o tmp.curve2straight.nii.gz

Estimate b-spline transformation: straight --> curve...
isct_ANTSLandmarksBSplineTransform tmp.landmarks_curved.nii.gz tmp.landmarks_straight.nii.gz tmp.straight2curve_rigid.txt tmp.warp_straight2curve.nii.gz 5x5x10 3 LandmarksRealStraight.txt LandmarksRealCurve.txt 3 0

Concatenate rigid and non-linear transformations...
sct_concat_transfo -w tmp.straight2curve_rigid.txt,tmp.warp_straight2curve.nii.gz -d data.nii -o tmp.straight2curve.nii.gz

Apply transformation to input image...
sct_apply_transfo -i data.nii -d tmp.landmarks_straight_crop.nii.gz -o tmp.anat_rigid_warp.nii.gz -w tmp.curve2straight.nii.gz -x spline

Apply transformation to centerline image...

Parse list of warping fields...
  Transfo #0: tmp.curve2straight.nii.gz

Check file existence...
  OK: centerline.nii.gz
  OK: tmp.landmarks_straight_crop.nii.gz
  OK: tmp.curve2straight.nii.gz

Get dimensions of data...
  52 x 384 x 185 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i centerline.nii.gz -o tmp.centerline_straight.nii.gz -t tmp.curve2straight.nii.gz -r tmp.landmarks_straight_crop.nii.gz -n NearestNeighbor

Done! To view results, type:
fslview tmp.landmarks_straight_crop.nii.gz tmp.centerline_straight.nii.gz &

Generate output file (in current folder)...
  File created: warp_curve2straight.nii.gz
  File created: warp_straight2curve.nii.gz
  File created: seg_smooth_1mm_rpi_crop_straight.nii.gz

Done!

Maximum x-y error = 1.11 mm
Accuracy of straightening (MSE) = 0.74 mm

Finished! Elapsed time: 76s

To view results, type:
fslview seg_smooth_1mm_rpi_crop_straight.nii.gz &

I could not reproduce the issue. I've replicated what you did:

download sct_example_data with release 2.2.2 from release branch
run the first few lines from batch_processing
run the command you provided and the result is great.

Did you downloaded the sct_example_data again? Maybe the t2 image has been corrupted or changed.

I've downloaded sct_example_data again and the issue is gone. It works perfectly fine on 2.2_dev and 2.2.2. Indeed, maybe the T2 was corrupted.
Let's close it then :-)

Issue reappeared when running batch_processing from scratch. Might be related to files that were not closed at previous step.

The issue seems to happen only when fslview opens the results of the segmentation at the previous step. I've added a "-nodisplay" argument to batch_processing, which then runs without error: a7ce207657094da6fd5696d9c678ce6d900bdc64

I've re-run the batch_processing several times without the display, and unfortunately the bug is still there from time to time.
So it is likely caused by an instability in sct_straighten_spinalcord

Tried running the following command several times:
sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -l labels.nii.gz -param step=1,type=seg,algo=slicereg,metric=MeanSquares:step=2,type=seg,algo=bsplinesyn,iter=3,shrink=1,metric=MeanSquares:step=3,type=im,algo=syn,metric=CC,iter=1

Pass/Fail: 2/0

I have also a set of data with which I got the same error. It failed 2 times and passed once when I changed -p for -param (deprecated argument).
I gathered the 3 command lines I tried and their outputs in a text file in folder_shared/sct_issues/20160202_722_no_curved_landmarks_constructed. I also added the data.
In case it could help you to find where the problem comes from...

Thank you very much Simon! it does help.

In the meantime, I found a bug in sct_register_to_template, that prevented to set cpu-nb flag. Fixed in: 375af639b06d228a2ffb1c1c9a07ad45577a40a9

Bug seems to be related to an exception raised in:

    def worker_landmarks_curved(self, arguments_worker):
        """Define landmarks along the centerline. Here, landmarks are densely defined along the centerline, and every
        gapxy, a cross of 16 landmarks is created (small square and big square = 8+8).
        """
        try:
            iz = arguments_worker[0]
            iz_curved, x_centerline_deriv, y_centerline_deriv, z_centerline_deriv, x_centerline_fit, y_centerline_fit, \
                z_centerline = arguments_worker[1]

            temp_results = []

            if iz in iz_curved:
                # at a junction (gapxy): set coordinates for landmarks at the center of the cross
                coord = Coordinate([0, 0, 0, 0])
                coord.x, coord.y, coord.z = x_centerline_fit[iz], y_centerline_fit[iz], z_centerline[iz]
                deriv = Coordinate([0, 0, 0, 0])
                deriv.x, deriv.y, deriv.z = x_centerline_deriv[iz], y_centerline_deriv[iz], z_centerline_deriv[iz]
                temp_results.append(coord)

                cross_coordinates = compute_cross_centerline(coord, deriv, self.gapxy)
                print iz
                print cross_coordinates

                for coord in cross_coordinates:
                    # check if all coordinates are real (jcohenadad, see issue #584)
                    if not (is_number(coord.x) and is_number(coord.y) and is_number(coord.z)):
                        sct.printv('WARNING: Coordinates have complex values at iz='+str(iz)+': '+str(coord), 1, 'warning')
                        # set wrong coordinates that will be removed later on
                        coord.x, coord.y, coord.z = 99999, 99999, 99999
                    temp_results.append(coord)
            else:
                # not a junction: do not create the cross.
                if self.all_labels >= 1:
                    temp_results.append(Coordinate([x_centerline_fit[iz], y_centerline_fit[iz],
                                                    z_centerline[iz], 0], mode='continuous'))

            return iz, temp_results

        except KeyboardInterrupt:
            return

        except Exception as e:
            raise e

When outputing cross_coordinates (lines print cross_coordinates added for debugging), values seem OK:
...
115
[(55.7058397276517, 168.837903872, 113.953628491620, 1), (-4.25765272121928, 168.837903872, 116.046371508380, 2), (25.7240935032, 197.820309134409, 107.252730467119, 3), (25.7240935032, 139.855498609923, 122.747269532881, 4), (54.3366440732511, 198.837903872, 105.982131633407, 5), (-3.44752658129133, 198.837903872, 107.998815696958, 6), (54.8957135877237, 138.837903872, 122.001184303042, 7), (-2.88845706681867, 138.837903872, 124.017868366593, 8), (40.7149666154339, 168.837903872, 114.476814245810, 9), (10.7332203909985, 168.837903872, 115.523185754190, 10), (25.7240935032, 183.329106503287, 111.126365233559, 11), (25.7240935032, 154.346701241045, 118.873634766441, 12), (40.0303687882336, 183.837903872, 110.491065816704, 13), (11.1382834609624, 183.837903872, 111.499407848479, 14), (40.3099035454700, 153.837903872, 118.500592151521, 15), (11.4178182181988, 153.837903872, 119.508934183296, 16)]
130
[(56.0787954040747, 171.574440618, 129.705734490269, 1), (-3.91831812015352, 171.574440618, 130.294265509731, 2), (26.080238642, 201.386379724035, 126.646153440464, 3), (26.080238642, 141.762501512195, 133.353846559536, 4), (55.8552709891369, 201.574440618, 126.332923681650, 5), (-3.76100032700918, 201.574440618, 126.917718897174, 6), (55.9214776109304, 141.574440618, 133.082281102826, 7), (-3.69479370521566, 141.574440618, 133.667076318351, 8), (41.0795170230177, 171.574440618, 129.852867245134, 9), (11.0809602609035, 171.574440618, 130.147132754866, 10), (26.080238642, 186.480410171075, 128.323076720232, 11), (26.080238642, 156.668471065155, 131.676923279768, 12), (40.9677548155487, 186.574440618, 128.166461840825, 13), (11.1596191574757, 186.574440618, 128.458859448587, 14), (41.0008581264455, 156.574440618, 131.541140551413, 15), (11.1927224683725, 156.574440618, 131.833538159175, 16)]
145
[(56.0320903675827, 172.648041447, 145.426555663496, 1), (-3.96184433471667, 172.648041447, 144.573444336504, 2), (26.0351230164, 202.623269500493, 143.781105769502, 3), (26.0351230164, 142.672813393643, 146.218894230498, 4), (56.0246284132299, 202.648041447, 144.206548013115, 5), (-3.91969549305553, 202.648041447, 143.354142149636, 6), (55.9899415259215, 142.648041447, 146.645857850363, 7), (-3.95438238036386, 142.648041447, 145.793451986885, 8), (41.0336066920078, 172.648041447, 145.213277831748, 9), (11.0366393408582, 172.648041447, 144.786722168252, 10), (26.0351230164, 187.635655473781, 144.390552884751, 11), (26.0351230164, 157.660427420355, 145.609447115249, 12), (41.0298757148314, 187.648041447, 144.603274006557, 13), (11.0577137616887, 187.648041447, 144.177071074818, 14), (41.0125322711773, 157.648041447, 145.822928925182, 15), (11.0403703180346, 157.648041447, 145.396725993443, 16)]
WARNING: Exception during Straightening:
Error on line 590
need more than 0 values to unpack

Tried removing the "try/except" in the worker_landmarks_curved to always return an output:
Pass/Fail: 1/

So, this is NOT a problem related to multithreading. Maybe the "solve" of sympy.

Thoughts based on the error you provided just above (Error on line 588):
When Python says "need more than 0 values to unpack", generally it means that we try to iterate on a vector that is empty. It means that the following line (line 588 in sct_straighten_spinalcord.py) produces something that is empty, meaning that min(iz_curved) and max(iz_curved) are somewhat equal.
range(min(iz_curved), max(iz_curved) + 1, 1)

I couldn't reproduce the issue so far.
By the way, there is no way to interrupt the batch_processing script using Ctrl+C and that's the real pain...

N.B.: to interrupt batch_processing more easily now you can run: batch_processing.sh -nodisplay
there will no be fslview interruption, therefore easier to interrupt each bash processes.

FOUND THE BUG!
It is caused by the function solve, which fails and does not output a result. As a consequence an exception is raised because the two variables could not be attributed.
range :  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184]
[-11.6482616746123, 47.9986575027285]
[-10.1763542141227, 49.5885755343343]
[-9.00947672536885, 50.8159520240425]
[-7.85402216043869, 51.9333829844813]
[-6.79309979101478, 53.0624150511464]
[-5.97868812110498, 53.9380910214098]
[-5.33271162936171, 54.6144979171037]
[-4.80789467969575, 55.1530316835406]
[-4.25765272121928, 55.7058397276517]
[-3.91831812015352, 56.0787954040747]
[-3.96184433471667, 56.0320903675827]
[]
Error on line 242
need more than 0 values to unpack
Error on line 397
WARNING: Exception during Straightening:
Error on line 603
need more than 0 values to unpack

Now working on a solution to replace solve with an analytical solution.

Fixed in branch jca_issue722:
Comparative results:
# ====================================================================================
# 2016-02-03
# commit: abfb85cc68e0cb0a90bb787abbfe9af54e4628e9
isct_test_function -f sct_straighten_spinalcord -d /Volumes/data_raid/data_shared/sct_testing_small/ -p "-i t2/t2.nii.gz -s t2/t2_seg_manual.nii.gz"
# ====================================================================================
Results for "sct_straighten_spinalcord -i t2/t2.nii.gz -s t2/t2_seg_manual.nii.gz":
Dataset: /Volumes/data_raid/data_shared/sct_testing_small/
             subject      dice  dist_max    duration       mse     status
0         100_004_s1  0.976176  1.410000  127.860137  0.720000   0.000000
1         200_005_s2  0.969072  1.530000  200.115950  0.770000   0.000000
2    20150910_joshua  0.975742  0.840000   83.738272  0.470000   0.000000
3      20151025_emil  0.976413  0.360000  135.089394  0.220000   0.000000
4       20151025_max  0.980482  1.260000  135.530449  0.740000   0.000000
5             e25428  0.970905  2.410000  118.113098  0.650000   0.000000
6           errsm_40  0.974875  1.500000  201.529225  0.860000   0.000000
7           errsm_42  0.976250  1.770000  196.346473  0.770000   0.000000
8            sct_002  0.964649  1.400000  157.393522  0.770000   0.000000
9   sct_example_data  0.772341  1.170000  101.124114  0.630000  99.000000
10     vanderbilt_05  0.969028  1.580000   84.948703  0.720000   0.000000
11              Mean  0.955085  1.384545  140.162667  0.665455   9.000000
12               STD  0.060777  0.517829   43.880300  0.178962  29.849623
Passed: 10/11

# ====================================================================================
# 2016-02-03
# commit: cd5a3c7c3fcacfd3ac3c0ddb4f78e3fb591dd3ad
isct_test_function -f sct_straighten_spinalcord -d /Volumes/data_raid/data_shared/sct_testing_small/ -p "-i t2/t2.nii.gz -s t2/t2_seg_manual.nii.gz"
# ====================================================================================

Results for "sct_straighten_spinalcord -i t2/t2.nii.gz -s t2/t2_seg_manual.nii.gz":
Dataset: /Volumes/data_raid/data_shared/sct_testing_small/
             subject      dice  dist_max    duration       mse     status
0         100_004_s1  0.956846  1.120000  163.191365  0.700000   0.000000
1         200_005_s2  0.970180  1.600000  246.217484  0.780000   0.000000
2    20150910_joshua  0.945589  0.900000  117.843979  0.510000  99.000000
3      20151025_emil  0.858958  1.170000  172.469985  0.380000  99.000000
4       20151025_max  0.935496  1.220000  179.034716  0.740000  99.000000
5             e25428  0.929668  2.900000  153.112982  0.670000  99.000000
6           errsm_40  0.957569  1.330000  247.201897  0.840000   0.000000
7           errsm_42  0.974663  1.850000  245.169056  0.810000   0.000000
8            sct_002  0.963804  1.340000  169.929566  0.760000   0.000000
9   sct_example_data  0.892490  1.140000  116.666484  0.720000  99.000000
10     vanderbilt_05  0.965213  1.300000   90.459352  0.640000   0.000000
11              Mean  0.940952  1.442727  172.845170  0.686364  45.000000
12               STD  0.035889  0.545181   54.443796  0.135888  51.701064
Passed: 6/11

There is another issue raised by the new implementation, when checking label_vertebrae. The inside of the cord does not seem to be properly registered. Below switching between previous and new implementation:

OK, there is a labeling problem. See below:

checked labels-- they seem fine

OK, the problem arises when estimating rigid transformation: for some reasons, this step rotates the volume by 90deg.

straight2curve_affine --> OK

curve2straight_affine --> NOT OK!!!

I already had this issue. It was an issue in the numbering of labels. In my case, that was the ordering of labelling when creating the labels in straight and curved space that was different.

that's what i though, but the generated labels (in nifti format) seem to be ok. See below: curved, curved_affine,  straight.
The rigid and straight seem fine, but the curved_affine is rotated. So it seems like the affine transformation introduces a problem.
This observation is supported by the fact that the straight2curve transformation is correct (see result above). I guess if the labels were wrong, then we should observe a problem in both cases.

When running sct_straighten_spinalcord on sct_testing_data, the result is correct, again suggesting that labels are fine:

Mmm I see. That could be related to the affine transformation that is computed before the bspline transform, probably due to some instability. But that is weird because normally there are no instability with this pattern of labels.

ok, some additional elements: I increased the gapxy from 30 to 40, and results is now correct:

So it's pretty clear that this is an instability of the affine transfo. I should mention that I've simplified the cross: it is no more a cross+square, but only a cross (so only 8 labels instead of 16). I will add the square like you did, maybe this will increase the stability.

by the way: now the routine to generate crosses is the same for the curved and the straight. I think you will like the new implementation ;-)

Yes the square is quite important, because the bspline transform we compute is only interpolation. So, with only a cross, it does not know what to do at the edges of the images. Providing a square, and even better, a double square (16 points), increases the stability a lot!
Is the implementation in the branch jca_issue722. I already like what I see there.

yes it,s there. I'm currently adding the square.

OK it solved the problem!!

Great!

fixed in https://github.com/neuropoly/spinalcordtoolbox/pull/726

repo: neuropoly/spinalcordtoolbox

license: mit

license_source: bigquery


text:
Append the top 3 words across topics of the LDA annotation

Closes None. This PR addresses the TODO:
https://github.com/neurostuff/NiMARE/blob/a4a7d1672f901ff5fca4cfdc91bfb829e0a00071/nimare/annotate/lda.py#L103-L104

Changes proposed in this pull request:

Append the top 3 weighted words from each topic name in the LDA annotation: LDA50__1_word1_word2_word3.

Thanks!
I was wondering if the title of this PR looks good. I'm not sure if this title really reflects what the PR is adding.

The new title is great. Thanks!

repo: neurostuff/NiMARE


text:
Make xrdp.ini to be dynamic for each operating system

Mac OS needs libraries to be .dylib instead of .so. By using the same logic available in docs/man/Makefile.am this commit makes the xrdp/xrdp.ini file to depend on the operating system and replace the libraries extensions where necessary

Good work! Related to this, pulse script path in sesman.ini should refer @sysconfdir@.
[SessionVariables]
PULSE_SCRIPT=/etc/xrdp/pulse/default.pa

ping

I'm testing this.

authors: Vraiment metalefty

repo: neutrinolabs/xrdp


text:
翻页页脚问题

往后翻页，再往前翻页会有页展示问题，往前翻页后，再往后翻页有同样的效果问题.

往后翻页，再往前翻页会有页展示问题，会出现上下对角，改了一处，感觉还不太好体验....

我也发现了这个问题，现在还没能解决

authors: MrBoudar huangkaisihuo


text:
[1.19.2]: Nourishment/Comfort overlay does not follow HUD safe area

Nourishment/Comfort overlay does not check where the Hunger bar really is, so it looks out of place.
The safe area / UI padding is added by Bedrockify in this case, but it can be added by any mod.
It looks like this is not the only problem related to this overlay (e.g. the Vampirism one).
Farmer's Delight might have a hardcoded position instead of actually overlaying the Hunger/Health Bar.

To Reproduce:

With Farmer's Delight installed Install Bedrockify and enable Safe Area.
Have the Nourishment/Comfort effect on you.

Related mods:

Bedrockify (provides screen safe area)
Farmer's Delight
AppleSkin (saturation, exhaustion overlay)

Tested on minimal environment.

Hello @Dekamir,
I've no entry point to know the value of the config set by Bedrockify for "Safe Area". Multiple solution, developers of Bedrockify add a "Shared object" that I can check and get while the config of "Safe Area" is set/changed or he create a Mixin to add compatibility with Farmer's Delight (exactly like they do for others mods).

authors: Dekamir Zifiv

repo: newhoryzon/farmers-delight-fabric


text:
NR-67849 Always show install now CTA

https://issues.newrelic.com/browse/NR-67849

Since quickstarts should always have data sources, closing and ticket blocked until discussion with Becky

repo: newrelic/instant-observability-website


text:
[Patch] Remove unwrapping of global api & handlers on abort NEWRELIC-7013

Overview
The previous PR had attempted to revert browser agent wrappings if and when its loading of components encounter exceptions, for example during import. The method in which that was done is simply restoring a copy of the global API or handler that existed immediately preceding the agent initialization.
However, this can cause an integration issue with other third party libraries and code that follows which wrap or references our wrapper functions because they also replaces or modify the globals with their internals, and our "global restores" that happen after that would effectively overwrite their wrapping.
With this patch, we will leave our wrappings in place to not break the integrations. Instead, we'll attempt to do our best to make them become a dummy code layer that does nothing if our agent aborts (already factored into current code).
Related Issue(s)
NEWRELIC-7013
Following #391
Testing
Regression

Did you mean to leave in all the commented out code

Did you mean to leave in all the commented out code

I did, but should I remove them? Are they for sure worthless at this point?

Did you mean to leave in all the commented out code

I did, but should I remove them? Are they for sure worthless at this point? @metal-messiah did say we could leave the abort handlers sys in place, so wasn't sure.

It's forever enshrined in the git repo so if we ever want to pull it back up, we can. I would delete it. There is no need in keeping commented code around with git.

This is trivial and inconsequential, and more-so commenting for posterity, but do we/should we still increment a counter on these if we do not need to unwrap anymore? Approved with addition of changelog item
https://github.com/newrelic/newrelic-browser-agent/pull/417/files#diff-44610b3a5e0a1556ad22b44d1d2bff702a2ca7125d84335c716eeaecd3ee2702L23

authors: cwli24 metal-messiah patrickhousley

repo: newrelic/newrelic-browser-agent


text:
feat: new quickstart for Resmo integration

Summary
Doc only quickstart for Resmo. Integration pulls data from NR into Resmo for asset management.

Pre merge checklist

[ ] Did you check you NRQL syntax? - Does it work?
[ ] Did you include an InstallPlan and Documentation reference?
[x] Are all documentation links publically accessible?
[x] Did you check your descriptive content for voice and tone?
[x] Did you check your descriptive content for spelling and grammar errors?
[x] Did you review your content with a subject matter expert? (e.g. a Browser agent quickstart is reviewed with a member of the Browser Agent team)

Dashboards

[ ] Does the PR contain a screenshot for each of your dashboards?
[ ] Do your screenshots show data?
[ ] Has the sanitization script been run on each dashboard?

Alerts

[ ] Did you check that your alerts actually work?

To see the specific tasks where the Asana app for GitHub is being used, see below:

https://app.asana.com/0/0/1203898677880871

jenkins please

Hello! Seems like you are missing some important features of a quickstart.

Dashboard(s)
Data source(s)
Alert(s)

Please update your config to reference them. Here is a contributor guide to help you get started

@brammerl , there are no dashboards, alerts, or data sources here. The integration is in the other direction, where they compile assets on their site of other SaaS platforms. Here is the blog that they have around it. This is documentation only, just showing that it exists and customers can use it.

authors: brammerl jcountsNR

repo: newrelic/newrelic-quickstarts


text:
Investigate: Observe Sidekiq 7 metrics

Sidekiq 7 (currently in beta) will have built-in support for metrics reporting, viewable via Sidekiq's own web UI.
It's possible that New Relic customers would like to have these metrics collected by the Ruby agent to some degree. We should investigate.
https://github.com/mperham/sidekiq/wiki/Metrics

https://www.mikeperham.com/2022/10/27/introducing-sidekiq-7.0/

Sidekiq metrics display time info related to the jobs and number of success/failures for each job.
Since we already are recording time related information, there isn't anything new for us to gain with those metrics.
For the success and failures, we aren't directly recording number of failures or successes for jobs. However, jobs seem to only be considered failures when an error occurs, which is something the agent keeps track of.
If we wanted to add specific success/failure data, we could create some metrics for each job to record the number of failures and successes. The way the sidekiq metrics gets the success/fail info looks to be by querying the job results when loading up the metrics page, so it doesn't seem like there is anything new for us to hook into specific to success or failure, but we could record after the job is done each time and increment the appropriate metric.

@tannalynn  - Thanks for taking a closer look!
Users! If you use New Relic and are interested in the specific success/failure metrics available in Sidekiq 7, please give us some sort of feedback on this issue (emoji response, comment, etc.)

Internal FR link: https://issues.newrelic.com/browse/NR-138200

Blocked; may not be appropriate for the Ruby Agent to implement

This is better suited to using an OHI and has been transferred to another team. Review the internal ticket for details.

authors: elucus fallwith kaylareopelle kford-newrelic tannalynn

repo: newrelic/newrelic-ruby-agent


text:
ETCD metrics for clusters in Rancher

Is your feature request related to a problem? Please describe.
Extra steps required to scrape etcd metrics for k8s clusters  in Rancher (static endpoints).
Feature Description
We have been able to scrape the control plane components metrics, including etcd by having something like this.
    config:
      etcd:
        enabled: true
        staticEndpoint:
          url: https://localhost:2379
          insecureSkipVerify: true
          auth:
            type: mTLS
            mtls:
              secretName: nri-bundle-etcd-cert
              secretNamespace: newrelic
      scheduler:
        enabled: true
        staticEndpoint:
          url: http://localhost:10251
          insecureSkipVerify: true
          auth:
            type: bearer
      controllerManager:
        enabled: true
        staticEndpoint:
          url: http://localhost:10252
          insecureSkipVerify: true
          auth:
            type: bearer
      apiServer:
        enabled: true
        staticEndpoint:
          url: https://localhost:6443
          insecureSkipVerify: true
          auth:
            type: bearer

What I am looking for is to simplify the process to create the secret with the cert and key for etcd to work. Currently we manually create the secret, but we have several clusters which would require too many manual steps to get this done.
I would like to know if there is any alternative, like mounting a host path (/etc/kubernetes/ssl/) to avoid manual steps and make the installation process as simple as possible.
Describe Alternatives
Manually create and deploy the secret for every k8s cluster you have.
Priority
Really Want
Thank you very much!!!

We appreciate you taking the time to bring this to our attention. I add this to our backlog.

Moreover, I checked and as a workaround in our test-cluster there is also the secret etcd-tls in the kube-system namespace with a working certificate.
If you need to you can point to any secret in the cluster https://github.com/newrelic/nri-kubernetes/blob/e1cbd0007575f47296afe88534fc924c5e9bdd60/charts/newrelic-infrastructure/values.yaml#L287

Thanks @paologallinaharbur , sadly I think this is not consistent, some clusters do not create the secret.
As a workaround we ended up running a pod that will get the cert and key files from the etcd node and create the secret. This is based on rancher pushprox that runs an init container to do something similar https://github.com/rancher/charts/blob/dev-v2.7/charts/rancher-pushprox/100.0.1/templates/pushprox-clients.yaml#L86

repo: newrelic/nri-kubernetes


text:
go make issue

Hello,
I'm having the following issue.
$ go version
go version go1.13.7 linux/amd64
$ pwd
/home/centos/go/src/github.com/newrelic/nri-network-telemetry
$ make

Please tell me how to make.
Thank you

This should now be resolved.

repo: newrelic/nri-network-telemetry


text:
Support for http/socks proxy

Currently we do not exclusively support http proxy because of using svn to fetch git tags. Though, it is possible to configure the svn binary to use proxied settings, it is not the best approach.
Possible fixes:

Ship with a local svn binary and allow explicit http_proxy in the config file (.env) and use it project wide
Somehow use both svn and github api to fetch the tags in suitable situations
Implement basic svn client protocol in python
??

Related: https://github.com/nexB/vulnerablecode/issues/554, #556

I think we should stop using SVN for git tags and always require an API token for GitHub access... otherwise things are really unstable at times.

We may need still to have proxy support irrespective of using SVN.
@tardyp I recall that's something that was a need for you... do you think we are all good otherwise?

hi @pombredanne we have now deployed vulnerablecode in our intranet, and I think we upstreamed all of our fixes.
We'll do a rebase shortly and make sure of it.

authors: Hritik14 pombredanne tardyp

repo: nexB/vulnerablecode


text:
🚀 3단계 - 지하철 구간 관리

부득이하게 중요한 일정과 겹치는 바람에 미션 수행이 늦어졌습니다 😢
그리고 section을 추가하려니 복잡해지는 부분들을 해결하는데 시간이 오래걸렸습니다....
오늘부터 다시 부지런히 따라가 보겠습니다!

기존 인수테스트 격리를 직접 repository의 deleteAllInBatch를 사용했는데 그럼 cascade 에러로 문제가 생겨서 EntityManager 사용하는 것으로 수정했습니다.

@pch8388 코멘트에 대한 추가적인 질문 외 리뷰 적용했습니다!

repo: next-step/atdd-subway-map


text:
Renaming this project? Please give me your vote ...

Before I chose the name WinBox I made some search, but probably not good enough. I've never heard about the router manufacture which uses the same name for one of their toolkit. Personally I'm totally fine with it. But there was another naming candidate for this window manager called "Scalebox" which I did not picked.
Which one would you choose:

are you fine with the current name?
do you prefer the name "Scalebox"?
do you have another suggestion?

Thanks a lot.

window.js

I actively dislike Scalebox.
I'm fine with the current name despite the conflict... though I'd offer a few suggestions: WebWindow, Aperture, Subview.  I see @FishOrBear 's suggestion of window.js, and that's not bad, but I tend to think there's too many *.js projects already, so for me it wouldn't be my first choice.

"winbox" it is a nice name!

searching "winbox.js" immediately brings up the github pages site... maybe we should use that!

how about js-winbox.js or winbox-js.js

@andisfar why we need two js

window.js on npm is already taken
So is WindowJS on GitHub
I wouldn't choose that. I personally like the current name.

I contact the npm support and asking for the window.js package name. They had answered me that they actually work on a new policy, so I have to wait. But the chances are low, because another policy did not allow similar names of existing packages and there is also a package name "window" which will be blocking the "window.js" package name by sure.
I will keep that name. I read some negative responses about the naming, and I just wand to check if I can something improve. But it looks that isn't a really big problem with the current name.
Thanks a lot!

authors: DmitriyWebDev FishOrBear Pustur andisfar fzammetti stopmotio ts-thomas

repo: nextapps-de/winbox


text:
made Memory property of Collections, not Butler

This PR addresses #173.  Switches over from butler.memory to butler.algorithms.memory and butler.experiment.memory, etc.  Basically every collection gets its own "bucket" in the RedisDB (by automatically prepending the key with the collection name + exp_uid).
I wasn't sure if anyone else is using butler.memory at the moment, so I left it in there, but it prints a deprecation warning and this will be removed in the future.

Note there's a one-liner conflict with #174 because I randomly changed an == None to an is None ... once that PR is merged I'll fix the conflict.

repo: nextml/NEXT


text:
[Feature Request] Some Components Feature Suggestions

Is your feature request related to a problem? Please describe.
Our project is preparing to migrate to nextUI, but these components are not included here. Therefore, I have compiled some common components, hoping to extend them to the nextUI component library for more people to choose and use. Here are some feature suggestions and screenshots:
Describe the solution you'd like

DatePicker and TimePicker. such as:

Reference link: https://ant.design/components/date-picker
Mentions,When you need to mention someone or something. such as:

Reference link: https://ant.design/components/mentions
Transfer,It is a select control essentially which can be use for selecting multiple items. such as:

Reference link: https://ant.design/components/transfer
Layout, Expand layout usage scenarios. such as:

Reference link: https://ant.design/components/layout
Timeline, such as:

Drawer, such as:

Tree, such as:

Upload, Image or File Upload feats. such as:

Describe alternatives you've considered
I'm sorry for raising so many component functional requirements, but I was mainly conquered by the beauty of nextUI, so I hope it becomes more perfect and convenient. Finally, I suggest that the nextUI team add a roadmap so that everyone can see the development path of nextUI. Thank you to the nextUI team!
Screenshots or Videos
No response

I don't think some of these components should belong in the core library. Like timeline, for example

toasts should be implemented

Awesome!
I think drawer should be implemented. Reference https://ui.shadcn.com/docs/components/drawer
ShadCn ui is also a great component library based on radix-ui

Hey guys, is there any documentation where I can get specifications for developing components? I currently have time to contribute something.
At present, I have completed the development of the Drawer component locally.

authors: 1111mp Emestry meimosor siddiquiaffan ssijak

repo: nextui-org/nextui


text:
Variant calling isn't run when using --skip_asciigenome with metagenomic data

Description of the bug
When I run the pipeline with the param --skip_asciigenome, variant calling steps won't be performed.
Command used and terminal output
# Command used:
nextflow run /scratch/bi/pipelines/nf-core-viralrecon-2.4.1/workflow/main.nf \
          -c ../../DOC/viralrecon_metagenomic.config \
          --input samplesheet_MW536483.1.csv \
          --outdir MW536483.1_20220712_viralrecon \
          --platform illumina \
          --protocol metagenomic \
          --variant_caller ivar \
          --consensus_caller bcftools \
          --fasta /data/bi/references/virus/herpesviridae/MW536483.1.fasta \
          --gff /data/bi/references/virus/herpesviridae/MW536483.1.gff \
          --kraken2_db "/data/bi/references/eukaria/homo_sapiens/hg38/UCSC/kraken2/kraken2_human.tar.gz" \
          --skip_pangolin \
          --skip_nextclade \
          --skip_plasmidid \
          --skip_asciigenome \
          --min_mapped_reads 500 \
          -resume

# Terminal Output seems to be fine:
-[nf-core/viralrecon] 3/10 samples passed Bowtie2 500 mapped read threshold:
    4378: DTA2
    939: DTA5
    555: H62
-
-[nf-core/viralrecon] 7 samples skipped since they failed Bowtie2 500 mapped read threshold:
    20: DTA1
    231: DTA3
    277: DTA4
    27: H61
    36: H64
    50: H63
    186: H65
-
-[nf-core/viralrecon] Pipeline completed successfully-
Completed at: 12-Jul-2022 17:11:31
Duration    : 56m 21s
CPU hours   : 13.9
Succeeded   : 182

# Folder content misses ivar:
$ ls MW536483.1_20220712_viralrecon/variants/

bowtie2

Relevant files
Custom config file: viralrecon_metagenomic.config
singularity {
	enabled = true
	autoMounts = true
}

process {
	executor = 'slurm'
	queue = 'middle_idx'
	withName: 'FASTP' {
            ext.args = '--cut_front --cut_tail --trim_poly_x --cut_mean_quality 20 --qualified_quality_phred 20 --unqualified_percent_limit 10 --length_required 50'
        }
}

params {
	max_memory = 376.GB
	max_cpus = 32
	max_time = '48.h'
}

.nextflow.log file
nextflow.log
System information

Nextflow version 21.10.6
Hardware HPC
Executor Slurm
Container engine and version: Singularity v3.7.1
OS and version: CentOS 8

We've just detected that with this fix it breaks again the issue #286 when --skip-asciigenome or protocol=metagenomic
We think the process GET_CHROMSIZES can be run always, not only when the protocol is amplicon or the asciigenome process is run, what do you think @drpatelh, if you agree we can prepare a small PR with some minor bug fixes on the ivar_variants_to_vcf script we've already detected and fixed.

CUSTOM_GETCHROMSIZES will always be run now as added in https://github.com/nf-core/viralrecon/pull/360/commits/f7f99f7b88cf277e92c4b6dc8124eda42ab98899

authors: drpatelh saramonzon svarona

repo: nf-core/viralrecon


text:
Combo 1

This concept is currently being used out in the wild, but there is no data associated with it, and it’s completely uninformative/unnecessary. Note: Seems to be investigator-added term.
Recommendation: terminate existence out in the wild

Terminated

repo: nf-osi/nf-metadata-dictionary


text:
deadline-balancernone SyntaxWarning

deadline-balancernone:99: SyntaxWarning: "is" with a literal. Did you mean "=="?
https://github.com/nfa-vfxim/deadline-balancer/blob/f29f564f353a245ff9f2a338f9e798212c004c70/deadline-balancer.py#L99
proposing the change,
if math.ceil(percent * workers_amount) is 0:
to
if math.ceil(percent * workers_amount) == 0:

After the proposed fix for our environment loading the event plugin results in the below error:
Event plugin 'deadline-balancer' could not be loaded from the repository because: Error executing event plugin script "\\deadlinesrv\DeadlineRepository10\custom\events\deadline-balancer\deadline-balancer.py": name 'DeadlineEventListener' is not defined (Deadline.Events.DeadlineEventPluginException)

repo: nfa-vfxim/deadline-balancer


text:
Logfile

Hello,
according to the guide here
https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi
is described that with
tail -f /var/log/homebridge.log
can look at the log file. This directory but is no logfile.
How can I activate it?
Thanks
Andy

Are you running it manually from the command line or starting it with the init.d script?  I believe it is the init.d script that sets up the logging output of the program.  It's not within the app itself.

I running with DEBUG=* homebridge -D but no /var/log/homebridge.log created indeed.

Did you start from command line or via systemd service file? In case of the latter you need to access the log with sudo journalctl

I start from command line

Are you sure your output will not simply appear in the terminal ? If you just start it the standard out and standard error targets are the console. So no file gets created.
You might want to route them to the file by appending &>/var/log/homebridge.log to your command.

Yes, that makes sense

repo: nfarina/homebridge


text:
Free control-plane servers for neon-kube cloud clusters?

The AWS, Azure, and Google cloud-based offering all include free control-plane support.  This is significant cost advantage to users because this means that all clusters will effectively have free redundant control-plane.  neonkube users would need to pay for least three control-plane VMs to have the same capability.  I've seen that even DigitalOcean is offering this.
https://kubernetes.io/docs/concepts/architecture/control-plane-node-communication/
We'll probably need to offer this as well.
Here's how we'd probably approach something like this:

Deploy one or more internal neonkube clusters to the cloud regions where we'd offer this service
Deploy 3 API server pods for each user cluster (backed by MayaStor for performance)
Instead of deploying control-plane nodes for users, we'd reference the API server pods
Traffic from nodes --> API servers:

This can simply be routed to our cluster through its load balancer
Looks like we'll need to route though a tunnel because the API server doesn't verify the Kubelet's certificate or we can use the --kubelet-certificate-authority flag

Traffic from API servers --> nodes: link:

Scenarios:

Fetching logs from pods
Attaching to running pods for exec or port-forwarding

This will be trickier:

One approach could be to configure port forwarding from the user's LB to each node

LB NAT rule limits are lower than possible cluster sizes and we already need SSH NAT rules
Super messy for users
Won't work for non-public clusters

We could link our cluster VPC with user cluster VPC

What about subnet collisions?
Seems like a really bad security gap: I wouldn't like this,

Reverse proxy ?

User nodes would connect to proxy in our cluster and wait for and dispatch traffic to Kubelet
Seems like the best approach
But will take some work
Also implies that logs and exec commands will be routing through our cluster

This will have load and cost implications

I believe we had an issue open for this in the past but I couldn't find it after a quick search.

Ah, it looks like this Konnectivity service might already be the solution.  I wouldn't be surprised if the cloud providers are using this:
https://kubernetes.io/docs/tasks/extend-kubernetes/setup-konnectivity/

repo: nforgeio/neonKUBE


text:
Istio is running wherever it feels like

Need to figure out how to make Istio listen to taints

This is good enough for now. I added an istio node label, but by default Istio will be placed on the workers. Init jobs still seem to run wherever they feel like. It's not a big deal though since they just run once and can be deleted after completion.


text:
Geowave building and install provisioning not working as expected

After updating the Java version and Maven wget path I am still having problems getting the vagrant provisioning to run without error.  Before I can provide a possible solution I needed a little more feedback as to the underlying geowave project.
The building of the geowave jar in the provision.sh script may need updating.  It looks like the GeoWaveDemoApp was moved from the deploy/ path to the examples/ path:
https://github.com/ngageoint/geowave/pull/671
Possibly the right profile to activate is now "examples-singlejar" instead of "geowave-tools-singlejar" in the maven build command?
Also, the override of the tools.finalName properties does not seem to be working as the resulting target jar after modifying the profile is "geowave-example-0.9.3-SNAPSHOT.jar".  This causes the PATH_TO_JAR variable in geowave.sh script to not exist.   CLASS_TO_RUN is also now in the "examples" package rather than the "datastore" package?

I think the geowave-tools-singlejar profile used to be in the parent pom at the root of the underlying geowave project, which is the inconsistency causing the problem here.
The right thing to do is probably just use examples-singlejar, and maybe expose a variable like examples.finalName within the examples-singlejar profile.

authors: jgornowich rfecher

repo: ngageoint/geowave-vagrant


text:
Update request: libeufin 0.9.3-dev.33 → 0.10.1

Looks like libeufin is a bit outdated compared to the other components: https://taler.net/en/news/2024-06.html

@alejandrosame could you please provide @wegank with a few pointers how to update the Maven dependencies? You were the last one touching that code. Maybe we'll get a bit of orientation for where to find the relevant documentation out of this.

Hi!
Hopefully, Gradle support has improved since last time I tried this. If that is not the case, the way to manually fix the dependencies with the current package.nix is:

Change version and src as usual. Then the dependencies are prefetched in the line deps = callPackage ./deps {inherit gradle patches pname src version;}; (no need to change anything here).
After that, potentially there will be issues for gradle to find the Maven dependencies. If that's the case, they'll have to be patched manually like it was done with use-maven-deps.patch.

For reference, here's https://github.com/raphiz/buildGradleApplication by @raphiz who I met yesterday at #ZurichZHF. We briefly discussed this particular instance, which probably can't be helped by throwing more code at it, and what @alejandrosame proposes seems to be the most pragmatic solution, however hacky, short of fixing upstream following the suggestions in buildGradleApplication.

authors: alejandrosame fricklerhandwerk wegank

repo: ngi-nix/ngipkgs


text:
LDAP  Filter memberOf not working

As soon as I put a memberOf filter to LDAP_FILTER attribute, no user is found anymore. If guess there is something missing in regarding e.g. "member attribute" or group naming attribute. Can you confirm this is a bug?
I used:
 26 # LDAP CONFIG
 27 LDAP_TYPE = 'ldap' # use 'ad' for MS Active Directory
 28 LDAP_URI = 'ldaps://ldap:636'
 29 LDAP_USERNAME = 'cn=admin,dc=my,dc=company
 30 LDAP_PASSWORD = '***'
 31 LDAP_SEARCH_BASE = 'ou=people,dc=my,dc=company'
 32 # Additional options only if LDAP_TYPE=ldap
 33 LDAP_USERNAMEFIELD = 'uid'
 34 LDAP_FILTER = '(memberof=cn=domains,ou=groups,dc=my,dc=company)'

Log Output:
[INFO] Ldap searchFilter "(&(uid=USER)(memberOf=cn=domains,ou=groups,dc=my,dc=company))"
[WARNING] User "USER" does not exist

After leaving out the ou=people in LDAP_SEARCH_BASE it worked. Sorry, my mistake!

repo: ngoduykhanh/PowerDNS-Admin


text:
Use webassets

This removes all bundled frontend libraries and replaces them with a yarn + webassets workflow.
The docker configuration has been adapted accordingly.
Note that this does increase the initial boot-up time of the application considerably, which is why we generate the assets before launching the application on the docker image.

Nice work @kaechele . Merged your PR.
For non-docker running, we should generate the assets before launching the PowerDNS-Application right? If so, I will update the wiki pages for the instruction.

Good Idea @ngoduykhanh
While Flask-Asssets will build the assets on demand it will take about a minute for the first page to load if the assets are not built beforehand. That might irritate users.
So a flask assets build is advisable.
Either way, the user will need to run yarn before he's able to use the tool at all without docker. I guess at least that should be documented, also since it requires yarn to be installed.

authors: kaechele ngoduykhanh


text:
jquery.browser is deprecated

Any ideas regarding this error?

Sorry, not a huge problem, I just noticed that the VRML component was linking to an older A-Frame version. Linking it to a more recent one also raises a few other warnings but manageable ones.

repo: ngokevin/aframe-vrml-component


text:
Use tap-spec 4.0.2

tap-spec 3.0 had some rendering issues when tests failed. 4.0 fixes a lot of these issues and cleans up the output a bit more.

@scottcorgan thanks!

:+1: Thanks!

authors: bcomnes ngoldman scottcorgan

repo: ngoldman/module-init

license: isc


text:
[Request] Component w/ ngrx interactions example unit tests

Hi I've been using ngrx and this example app has been a huge help, but I'd love it if there were some unit tests for a couple components. I'm having some problems providing the store during TestBed configuration, and an example spec file for this component would be perfect to follow along to. Thanks!

+1

+1

Also comment on openDB$ Effect states that:
Wrapping the database open call in defer makes effect easier to test.
But there's no actual example how to test that so we can see the difference.

Yes would love to see some examples on component testing in combination with store dispatching. Like the container components: https://github.com/ngrx/example-app/tree/master/src/app/containers

i've resorted to not actually not mocking the store. probably won't work for every single use-case but might give you some ideas:
import { NO_ERRORS_SCHEMA } from '@angular/core'
import { async, ComponentFixture, TestBed } from '@angular/core/testing'

import { StoreModule, Store } from '@ngrx/store'
import { initialState, productsReducer, FETCH_PRODUCTS_SUCCESS } from '../product.redux'

import { ProductListContainer } from './product-list.container'

describe('ProductListContainer', () => {
  let component: ProductListContainer
  let fixture: ComponentFixture<ProductListContainer>
  let store: Store<any>

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [ StoreModule.provideStore({ products: productsReducer }) ],
      declarations: [ ProductListContainer ],
      schemas: [ NO_ERRORS_SCHEMA ]
    })
    .compileComponents()
  }))

  beforeEach(() => {
    fixture = TestBed.createComponent(ProductListContainer)
    component = fixture.componentInstance
    store = fixture.debugElement.injector.get(Store)
    fixture.detectChanges()
  })

  it('should create', () => {
    expect(component).toBeTruthy()
  })

  it('should render a loading indicator as long as products are fetched from the API', () => {
    expect(component.loading).toBe(true)
    expect(component.products.length).toBe(0)
  })

  it('should display products and hide the loading indicator once the data has been successfully fetched', () => {
    expect(component.loading).toBe(true)
    expect(component.products.length).toBe(0)

    const productsFixture = [
      { id: 1, name: 'iPhone 8' }
    ]
    store.dispatch({ type: FETCH_PRODUCTS_SUCCESS, payload: productsFixture })

    expect(component.loading).toBe(false)
    expect(component.products.length).toBe(productsFixture.length)
  })
})

And in case you do want to mock the store, this blog post explains pretty well how to do it:

@chapati23 I tried you code (replacing StoreModule.provideStore({ products: productsReducer }) with StoreModule.forRoot(reducers)), and I was getting missing provider errors for ReducerManager and ReducerManagerDispatcher. After adding them to the providers list, I get below error:
No provider for InjectionToken @ngrx/store Initial State!

@jaichandra Did you eventually fix the error? I'm having the same issue.

Faced the same issue as @jaichandra.

I'm still on the hunt for examples of Component spec tests in projects utilising ngrx, specifically those that call the store.dispatch functions directly, if anyone can point me in the right direction please?

authors: BartDeCaluwe Uriziel chapati23 ciesielskico exk0730 fulltilt glebcha jaichandra wyrdathru xtreemrage

repo: ngrx/example-app


text:
Problem by projecting the state

Hi,
I am developing a feature module for account management. This module has several components (login, registration, password recovery ... etc).
Each component has a state that will expand the overall status of application.
This is the state of the login component:
export interface ILoginState {
  token: string,
  user: any,
  hasError: boolean,
  isLoading: boolean,
};

export const initialState: ILoginState = {
  token: null,
  user: {},
  hasError: false,
  isLoading: false,
};

To observe this state each component has an object that encapsulates consultations.
that looks like this:
import '@ngrx/core/add/operator/select';
import 'rxjs/add/operator/let';
import { Observable } from 'rxjs/Observable';
import { ILoginState } from './login.state';
import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store';
import { IAppState } from '../../app.state';

@Injectable()
export class SessionSelectors {

  constructor(private store: Store<any>){}

  private getSessionState$(state$: Observable<IAppState>): Observable<ILoginState>{
    return state$.select(s => s.accounts.session);
  }

  public isLoading$(): Observable<boolean> {
    return this.store.let(this.getSessionState$).let((state$: Observable<ILoginState>): Observable<boolean> => state$.select(s => s.isLoading));
  }

  public hasError$(): Observable<boolean> {
      return this.store.let(this.getSessionState$).let((state$: Observable<ILoginState>): Observable<boolean> => state$.select(s => s.hasError));
  }
}

I use this object in component as follows:
export class LoginComponent{

  public form: FormGroup;
  public email: FormControl;
  public password: FormControl;

  isLoading$: Observable<boolean>;
  hasError$: Observable<boolean>;

  constructor(
    private formBuilder: FormBuilder,
    private loginActions: LoginActions,
    private sessionSelectors: SessionSelectors
  ){
    this.email = new FormControl("", Validators.required);
    this.password = new FormControl("", Validators.required);
    this.form = this.formBuilder.group({
      "email": this.email,
      "password": this.password
    });
    this.isLoading$ = sessionSelectors.isLoading$();
    this.hasError$ = sessionSelectors.hasError$();

  }

The problem I have is that when the state changes, nothing happens.
This alert in the login template component never appears:
  <alert type="danger" *ngIf="hasError$ | async">{{ 'LOGIN_FAILED' | translate }}</alert>
I am using Angular2 2.0.0 final release and the following ngrx dependencies:
"@ngrx/core": "^1.2.0",
"@ngrx/effects": "^2.0.0-beta.3",
"@ngrx/store": "^2.1.2",
"@ngrx/store-devtools": "^3.1.0",
"@ngrx/store-log-monitor": "^3.0.2",

Thanks and best regards

show reducer

The reducer looks like this:
import { Action } from '@ngrx/store';
import { initialState, ILoginState } from './login.state';
import { LoginActions } from './login.actions';

export function loginReducer(state: ILoginState = initialState, action: Action): ILoginState {

  switch (action.type) {
    case LoginActions.SIGNIN:
      return (<any>Object).assign(state, {
        token: null,
        user: {},
        hasError: false,
        isLoading: true
      });
    case LoginActions.SIGNIN_SUCCESS:
      return (<any>Object).assign(state, {
        token: action.payload.token,
        //user: UserRecord(action.payload.profile),
        user: {},
        hasError: false,
        isLoading: false,
      });
    case LoginActions.SIGNIN_ERROR:
      return (<any>Object).assign(state, {
        token: null,
        user: {},
        hasError: true,
        isLoading: false,
      });
    case LoginActions.LOGOUT_USER:
      return initialState;
    default:
      return state;
  }
}

Reducer looks good.
Try to change selector
public hasError$(): Observable<boolean> {
      return this.store.select(state => state.session.hasError);
  }

cool, it works.
You know if this is the best way to organize the selectors?
that is to say, SessionSelectors class methods do not know the full path to the state that they manage.
thank for answering. Greetings.

@sergio11 I find this way to organise selectors very clean ;) be proud!

@sergio11 btw, I take the scoped state in another way, I find it more readable:
import { AppState } from '../app.state'
import { State } from './list.state'

@Injectable()
export class ListSelector {

  constructor( private store: Store<AppState> ) {}

  private getState() {
    return this.store.select((state: AppState) => state.lists)
  }

  public getListIds() {
    return this.getState().map(state => state.ids)
  }

  public getListEntities() {
    return this.getState().map(state => state.entities)
  }
}

I think it is a very elegant way to organize selectors, but what I do not like is having to refer to AppState because it is out from my module.
@alexjoverm what do you think about this?

@sergio11 What do you mean exactly?

@alexjoverm   I mean that the selector must not know the AppState neither the exact path where it has placed the module status.
For example, I have a module with components for account management.
The state of this module is joined to the application (AppState). Then from the selector I should know the exact path where the module state is placed
private getState() {
    return this.store.select((state: AppState) => state.modules.accounts.session)
 }

I think this can be a problem for create reusable modules

Seems like this has been resolved. Please reopen and leave a comment if it is not.
As for reusable modules, they are coming in v3.0.0.

repo: ngrx/store


text:
Driver for Owon XDM meters.

Hi Andrew,
A small one to add support for Owon XDM 1000 and 2000 meter series support.
A create for the doc update comes with it.
Best,
Frederic.

Is there any reason for the RemoveCR function when we have Trim() in scopehal.cpp? Were you unaware of this due to our lack of proper dev docs?

No reason, just missed that one...

authors: azonenberg fredzo

repo: ngscopeclient/scopehal


text:
Field calculation

I had an idea of how to use python magic to allow calculation and display of fields in a easy and intuitive way. something like:
reflectivity *= 2

Just wanted to register it here so I don't forget.

Interesting idea!

I have it here [https://github.com/gamaanderson/artview/tree/radar_terminal]
I made a small (sound less video) to show the idea
https://www.youtube.com/watch?v=jXVg3g8cnck

That is pretty neat and seems like it could be relatively easy to implement?

it use pretty depp python magic, but it is easy. The only thing I don't like is that we still depend on the system terminal, emulating one is more complicated.

I agree it's not perfect, but better than nothing for the time being. I guess the argument could be made either way: If the tools are in place, porting may be simpler OR if we get too many tools in place, then porting is going to be a pain. Hmmm.

this was closed by PR #175

authors: gamaanderson nguy

repo: nguy/artview


text:
onChange on input type file return field and not the file [regression]

Hello, I was using version 5.6.2, since the last update, the function:
change: (field, file) => {console.log (file);}
No longer returns the file, but the field

That was a regression which has been fixed later in 5.9.3 version.

authors: aitboudad mickael-poulachon

repo: ngx-formly/ngx-formly


text:
[REQUEST] Add Nebular Support

Firstly, congratulations developers by this great job.
Would be possible to add support for Nebular framework?
Thanks in advance!

Thanks for the suggestion, you may subscribe to our release to get notified once done so now close in favor of #2557.

Thanks for the suggestion, you may subscribe to our release to get notified once done so now close in favor of #2557.


text:
Repeated messages not read correctly

It seems that repeated messages are not handled correctly. (Or I am doing something wrong :smile: )
Example code:
My .proto file:
service TodoService {
    rpc FindAll (TodoListRequest) returns (TodoList) {}
}

message TodoList {
    repeated Todo todos = 1;
}

I'm getting the correct response from the server (tested with BloomRPC):
{
    "todos": [
        {"id": 1, "name": "Buy Milk"},
        {"id": 2, "name": "Pay Bills"},
        {"id": 3, "name": "Play Games"}
    ]
}

However, I am getting this response from the TodoServiceClient:

It looks as though it adds (and overwrites) the properties of the items to the array itself, and not to the individual items.
Any idea what might be going wrong / how to fix this?

Hi there, we noticed the same today 🙂 please use the latest protocol plugin, it also contains a fix for the bytes fields. Please let me know if you still experience this behavior

Yeah, saw the fix today actually, thanks!
Closing 🙂

authors: mareksl smnbbrv

repo: ngx-grpc/core


text:
plugin: @toast-ui/editor-plugin-color-syntax --button‘s tooltip didn't use i18n

Describe the bug
when i apply this plugin,as well apply chiness language
this plugin's button's tooltip didn't  chinalize

it should be "字体颜色"

@destiny4
Oh.. Thanks for reporting!


text:
How to handle Crop Event?

Version

@toast-ui/vue-image-editor@1.0.2
tui-image-editor@3.5.2

Development Environment

Chrome/74.0.3729.131
Vue-Cli3
MacOS

Current Behavior

All API methods/events could be achieved in my Vue page.
Currently, there is no way for handling Crop event down.
I tried to modify vue-image-editor.js about CropAction function, but it isn't worked. It couldn't pass variable or vue-methods to Vue page.

Expected Behavior

I want to do something to server after Cropping image, how to handle Crop Event?

@rChinnnn Currently no way to handle crop event. I'll add this to issue #136. Thanks.

All API methods/events could be achieved in my Vue page.

All API methods/events could be achieved in “my Vue page”. Hello, Do u know how to or where to save that , and save in where? What is "my Vue page"? Or where can I find this , which Class which method? Thank u!

authors: junghwan-park rChinnnn zhangran25


text:
Please add support for AJV validator.

Hello Sir,
Please add support for AJV validator. I have some api that use AJV validator and I want to migrate to Nhttp but make change to use Zod is difficult.
Thanks

Support in middleware.
const app = nhttp();
const ajv = new Ajv();

// ajv validate middleware
const validate = (schema) => (rev, next) => {
  const valid = ajv.validate(schema, rev.body);
  if (valid) return next();
  throw new HttpError(422, valid.errors);
}

const foobarSchema = {
  type: "object",
  properties: {
    foo: {type: "integer"},
    bar: {type: "string"}
  },
  required: ["foo"],
  additionalProperties: false
}

app.post("/save", validate(foobarSchema), () => "success save foobar");

authors: francelwebdev herudi

repo: nhttp/nhttp


text:
Unclear error message when auto-detecting a module that does not support SLSC Switch in its NVMEM

Describe the bug
While configuring an SLSC Switch Module, we would like to be able to click on the Autodetect button in order to query the SLSC Switch module for its properties (Model, Resource, and Topology), and list of endpoints.  However, not all modules define the /switches area (or information in the legacy /capabilities format) in their NVMEM. For these modules, it is unclear how to proceed.
To Reproduce
Steps to reproduce the behavior:

Open a System Explorer session in Veristand, add an SLSC Chassis with a valid IP address.
In the Modules section, select the SLSC Switch for one slot that you know is populated with an SLSC Switch module that does not contain the /switches area, e.g. the first revision of the 1225x modules.
Select the newly-configured Slot # (SLSC Switch) in the left tree within the System Explorer.
Click on the Autodect button at the top and note the resulting error.

Expected behavior
On step 4, we expect the fields to be populated (Model Number, Resource Name, and Topology) to match the module in that slot. If it cannot be automatically populated, we expect a more helpful error message indicating how to proceed.
Screenshots

Desktop (please complete the following information):

OS: Windows 10
Veristand 2017+, with the Routing and Faulting as well as the SLSC Switch custom devices installed.

Additional context
Add any other context about the problem here.

If we detect the module is present, we could potentially provide some enhanced workflows to help the user. For example, if we detect a 1225x module that is incompatible with SLSC Switch, we could offer to (or automatically) load the offline definition from disk.

authors: mdcerna rtzoeller


text:
get_ prefix unnecessary in exposed APIs

The following APIs currently have get_ prefixed in their names. This is both inconsistent with psutil and with rest of the APIs. Consider renaming.
Process *get_process(unsigned int);
unsigned long int get_boot_time();
UsersInfo *get_users();

This needs elimination/replacement of variables of the same name as the desired API names without the 'get_'  part. Important to do this change on both linux and osx port together.

repo: nibrahim/cpslib


text:
Source file changes not reflected in test run

Reported by @DaniTheLion

This needs to be configured in app. Added a warning in f6b611c0.

repo: nicholasdower/rspec-interactive


text:
Password entry animation with San-Serif

The password entry animation works well with the default, monospace, typeface. However, if switch it to san-serif, so it matches my other EditTexts, the animation doesn't work because the dot doesn't take up the same width as a character. How would I modify the draw method so it draws it correctly with san-serif?

You'll have to modify the PasswordCharacter class to work for non-monospace fonts. Specifically you can't use the index to calculate the x position. You'll likely have to track the x position of each character in each state.
Good luck, i'm closing this bug as it's not an issue with Plaid.

repo: nickbutcher/plaid


text:
SQL server create database script

Hello Nick,
can you include an SQL server create-script for the database ? Can't restore the back file.
thanks in advance
Frank

I got the create statements below from SQL Server Studio Manager, using the .bak from GpsTracker v4.0.3.  I haven't tested them...
USE [GPSTracker]
GO

/****** Object:  Table [dbo].[gpslocations]    Script Date: 9/24/2015 8:47:24 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[gpslocations](
	[GPSLocationID] [int] IDENTITY(1,1) NOT NULL,
	[lastUpdate] [datetime] NOT NULL CONSTRAINT [DF_gpslocations_LastUpdate]  DEFAULT (getdate()),
	[latitude] [decimal](10, 7) NOT NULL CONSTRAINT [DF_gpslocations_latitude]  DEFAULT ((0.0)),
	[longitude] [decimal](10, 7) NOT NULL CONSTRAINT [DF_gpslocations_longitude]  DEFAULT ((0.0)),
	[phoneNumber] [nvarchar](50) NOT NULL CONSTRAINT [DF_gpslocations_phoneNumber]  DEFAULT (''),
	[userName] [nvarchar](50) NOT NULL CONSTRAINT [DF_gpslocations_userName]  DEFAULT (''),
	[sessionID] [nvarchar](50) NOT NULL CONSTRAINT [DF_gpslocations_sessionID]  DEFAULT (''),
	[speed] [int] NOT NULL CONSTRAINT [DF_gpslocations_speed]  DEFAULT ((0)),
	[direction] [int] NOT NULL CONSTRAINT [DF_gpslocations_direction]  DEFAULT ((0)),
	[distance] [decimal](10, 1) NOT NULL CONSTRAINT [DF_gpslocations_distance]  DEFAULT ((0.0)),
	[gpsTime] [datetime] NOT NULL CONSTRAINT [DF_gpslocations_gpsTime]  DEFAULT ('1900-01-01 00:00:00.000'),
	[locationMethod] [nvarchar](100) NOT NULL CONSTRAINT [DF_gpslocations_locationMethod]  DEFAULT (''),
	[accuracy] [int] NOT NULL CONSTRAINT [DF_gpslocations_accuracy]  DEFAULT ((0)),
	[eventType] [nvarchar](50) NOT NULL CONSTRAINT [DF_gpslocations_eventType]  DEFAULT (''),
	[extraInfo] [nvarchar](255) NOT NULL CONSTRAINT [DF_gpslocations_extraInfo]  DEFAULT (''),
 CONSTRAINT [PK_gpslocations] PRIMARY KEY CLUSTERED
(
	[GPSLocationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

USE [GPSTracker]
GO

/****** Object:  StoredProcedure [dbo].[prcDeleteRoute]    Script Date: 9/24/2015 8:48:21 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[prcDeleteRoute]
@sessionID NVARCHAR(50)
AS

SET NOCOUNT ON

DELETE FROM gpslocations
WHERE sessionID = @sessionID
GO

USE [GPSTracker]
GO

/****** Object:  StoredProcedure [dbo].[prcGetAllRoutesForMap]    Script Date: 9/24/2015 8:48:41 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[prcGetAllRoutesForMap]
AS

SET NOCOUNT ON

SELECT
'{ "latitude": "' + CAST(latitude AS NVARCHAR(15))
+ '", "longitude": "' + CAST(longitude AS NVARCHAR(15))
+ '", "speed": "' + CAST(speed AS NVARCHAR(4))
+ '", "direction": "' + CAST(direction AS NVARCHAR(3))
+ '", "distance": "' + CAST(distance AS NVARCHAR(5))
+ '", "locationMethod": "' + locationMethod
+ '", "gpsTime": "' + CONVERT(NVARCHAR(25), gpsTime, 100)
+ '", "phoneNumber": "' + phoneNumber
+ '", "userName": "' + userName
+ '", "sessionID": "' + sessionID
+ '", "accuracy": "' + CAST(accuracy AS NVARCHAR(4))
+ '", "eventType": "' + eventType
+ '", "extrainfo": "' + extraInfo + '" }' json
FROM (SELECT MAX(GPSLocationID) ID
      FROM gpslocations
      WHERE sessionID != '0'
      GROUP BY sessionID) AS MaxID
JOIN gpslocations ON gpslocations.GPSLocationID = MaxID.ID
ORDER BY gpsTime

GO

USE [GPSTracker]
GO

/****** Object:  StoredProcedure [dbo].[prcGetRouteForMap]    Script Date: 9/24/2015 8:49:11 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[prcGetRouteForMap]
@sessionID NVARCHAR(50)
AS

SET NOCOUNT ON

SELECT '{ "latitude": "' + CAST(latitude AS NVARCHAR(15))
+ '", "longitude": "' + CAST(longitude AS NVARCHAR(15))
+ '", "speed": "' + CAST(speed AS NVARCHAR(4))
+ '", "direction": "' + CAST(direction AS NVARCHAR(3))
+ '", "distance": "' + CAST(distance AS NVARCHAR(5))
+ '", "locationMethod": "' + locationMethod
+ '", "gpsTime": "' + CONVERT(NVARCHAR(50), gpsTime, 100)
+ '", "phoneNumber": "' + phoneNumber
+ '", "userName": "' + userName
+ '", "sessionID": "' + sessionID
+ '", "accuracy": "' + CAST(accuracy AS NVARCHAR(4))
+ '", "eventType": "' + eventType
+ '", "extrainfo": "' + extraInfo + '" }' json
  FROM gpslocations
	WHERE sessionID = @sessionID
	ORDER BY lastupdate

GO

USE [GPSTracker]
GO

/****** Object:  StoredProcedure [dbo].[prcGetRoutes]    Script Date: 9/24/2015 8:49:45 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[prcGetRoutes]
AS

SET NOCOUNT ON

CREATE TABLE #tempRoutes
(
    sessionID NVARCHAR(50) NULL,
    userName NVARCHAR(50) NULL,
    startTime DATETIME NULL,
	endTime DATETIME NULL
)

-- get the distinct routes
INSERT #tempRoutes (sessionID, userName)
SELECT DISTINCT sessionID, userName
FROM gpslocations

-- get the route start times
UPDATE #tempRoutes
SET startTime = (SELECT MIN(gpsTime) FROM gpslocations gl
WHERE gl.sessionID = tr.sessionID
AND gl.userName = tr.userName)
FROM #tempRoutes tr

-- get the route end times
UPDATE #tempRoutes
SET endTime = (SELECT MAX(gpsTime) FROM gpslocations gl
WHERE gl.sessionID = tr.sessionID
AND gl.userName = tr.userName)
FROM #tempRoutes tr

-- format dates and then send it out as json

SELECT '{ "sessionID": "' + CAST(sessionID AS NVARCHAR(50))
+ '", "userName": "' + userName
+  '", "times": "(' + CONVERT(NVARCHAR(25), startTime, 100)
+ ' - ' + CONVERT(NVARCHAR(25), endTime, 100) + ')" }' json
FROM #tempRoutes
ORDER BY startTime DESC

DROP TABLE #tempRoutes

GO

USE [GPSTracker]
GO

/****** Object:  StoredProcedure [dbo].[prcSaveGpsLocation]    Script Date: 9/24/2015 8:50:15 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[prcSaveGpsLocation]
@latitude          DECIMAL(10,7),
@longitude         DECIMAL(10,7),
@speed             INT,
@direction         INT,
@distance          DECIMAL(10,1),
@date              DATETIME,
@locationMethod    NVARCHAR(100),
@phoneNumber	   NVARCHAR(50),
@userName		   NVARCHAR(50),
@sessionID		   NVARCHAR(50),
@accuracy		   INT,
@eventType         NVARCHAR(50),
@extraInfo		   NVARCHAR(255)

AS

SET NOCOUNT ON
  INSERT INTO gpslocations (Latitude, Longitude, speed, direction, distance, gpsTime, locationMethod,
                            phoneNumber, userName,  sessionID, accuracy, eventType, extraInfo)
  VALUES (@latitude, @longitude, @speed, @direction, @distance, @date, @locationMethod,
					@phoneNumber, @userName, @sessionID, @accuracy, @eventType, @extraInfo)

  SELECT CAST(GetDate() AS NVARCHAR(50))

GO

Thanks !! I'll give it a try.
And is there any default data stored in the database ?

Here's a dump of the schema AND data (if you need just the data you should be able to clip out the insert statements and run them separately).
USE [master]
GO
/****** Object:  Database [GPSTracker]    Script Date: 9/24/2015 9:09:50 AM ******/
CREATE DATABASE [GPSTracker]
 CONTAINMENT = NONE
 ON  PRIMARY
( NAME = N'GPSTracker', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\GPSTracker.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON
( NAME = N'GPSTracker_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\GPSTracker_log.ldf' , SIZE = 6272KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [GPSTracker] SET COMPATIBILITY_LEVEL = 100
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [GPSTracker].[dbo].[sp_fulltext_database] @action = 'disable'
end
GO
ALTER DATABASE [GPSTracker] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [GPSTracker] SET ANSI_NULLS OFF
GO
ALTER DATABASE [GPSTracker] SET ANSI_PADDING OFF
GO
ALTER DATABASE [GPSTracker] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [GPSTracker] SET ARITHABORT OFF
GO
ALTER DATABASE [GPSTracker] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [GPSTracker] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [GPSTracker] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [GPSTracker] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [GPSTracker] SET CURSOR_DEFAULT  GLOBAL
GO
ALTER DATABASE [GPSTracker] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [GPSTracker] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [GPSTracker] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [GPSTracker] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [GPSTracker] SET  DISABLE_BROKER
GO
ALTER DATABASE [GPSTracker] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [GPSTracker] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [GPSTracker] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [GPSTracker] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [GPSTracker] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [GPSTracker] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [GPSTracker] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [GPSTracker] SET RECOVERY FULL
GO
ALTER DATABASE [GPSTracker] SET  MULTI_USER
GO
ALTER DATABASE [GPSTracker] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [GPSTracker] SET DB_CHAINING OFF
GO
ALTER DATABASE [GPSTracker] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
GO
ALTER DATABASE [GPSTracker] SET TARGET_RECOVERY_TIME = 0 SECONDS
GO
ALTER DATABASE [GPSTracker] SET DELAYED_DURABILITY = DISABLED
GO
USE [GPSTracker]
GO
/****** Object:  Table [dbo].[gpslocations]    Script Date: 9/24/2015 9:09:50 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[gpslocations](
	[GPSLocationID] [int] IDENTITY(1,1) NOT NULL,
	[lastUpdate] [datetime] NOT NULL CONSTRAINT [DF_gpslocations_LastUpdate]  DEFAULT (getdate()),
	[latitude] [decimal](10, 7) NOT NULL CONSTRAINT [DF_gpslocations_latitude]  DEFAULT ((0.0)),
	[longitude] [decimal](10, 7) NOT NULL CONSTRAINT [DF_gpslocations_longitude]  DEFAULT ((0.0)),
	[phoneNumber] [nvarchar](50) NOT NULL CONSTRAINT [DF_gpslocations_phoneNumber]  DEFAULT (''),
	[userName] [nvarchar](50) NOT NULL CONSTRAINT [DF_gpslocations_userName]  DEFAULT (''),
	[sessionID] [nvarchar](50) NOT NULL CONSTRAINT [DF_gpslocations_sessionID]  DEFAULT (''),
	[speed] [int] NOT NULL CONSTRAINT [DF_gpslocations_speed]  DEFAULT ((0)),
	[direction] [int] NOT NULL CONSTRAINT [DF_gpslocations_direction]  DEFAULT ((0)),
	[distance] [decimal](10, 1) NOT NULL CONSTRAINT [DF_gpslocations_distance]  DEFAULT ((0.0)),
	[gpsTime] [datetime] NOT NULL CONSTRAINT [DF_gpslocations_gpsTime]  DEFAULT ('1900-01-01 00:00:00.000'),
	[locationMethod] [nvarchar](100) NOT NULL CONSTRAINT [DF_gpslocations_locationMethod]  DEFAULT (''),
	[accuracy] [int] NOT NULL CONSTRAINT [DF_gpslocations_accuracy]  DEFAULT ((0)),
	[eventType] [nvarchar](50) NOT NULL CONSTRAINT [DF_gpslocations_eventType]  DEFAULT (''),
	[extraInfo] [nvarchar](255) NOT NULL CONSTRAINT [DF_gpslocations_extraInfo]  DEFAULT (''),
 CONSTRAINT [PK_gpslocations] PRIMARY KEY CLUSTERED
(
	[GPSLocationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET IDENTITY_INSERT [dbo].[gpslocations] ON

INSERT [dbo].[gpslocations] ([GPSLocationID], [lastUpdate], [latitude], [longitude], [phoneNumber], [userName], [sessionID], [speed], [direction], [distance], [gpsTime], [locationMethod], [accuracy], [eventType], [extraInfo]) VALUES (1, CAST(N'2014-04-17 13:37:16.747' AS DateTime), CAST(47.6273270 AS Decimal(10, 7)), CAST(-122.3256910 AS Decimal(10, 7)), N'dotNetUser1', N'dotNetUser1', N'8BA21D90-3F90-407F-BAAE-800B04B1F5EB', 10, 0, CAST(5.0 AS Decimal(10, 1)), CAST(N'2014-07-17 13:37:37.000' AS DateTime), N'fused', 80, N'dotNet', N'Valid Location.')
INSERT [dbo].[gpslocations] ([GPSLocationID], [lastUpdate], [latitude], [longitude], [phoneNumber], [userName], [sessionID], [speed], [direction], [distance], [gpsTime], [locationMethod], [accuracy], [eventType], [extraInfo]) VALUES (2, CAST(N'2014-04-17 13:38:20.200' AS DateTime), CAST(47.6072580 AS Decimal(10, 7)), CAST(-122.3300770 AS Decimal(10, 7)), N'dotNetUser1', N'dotNetUser1', N'8BA21D90-3F90-407F-BAAE-800B04B1F5EB', 25, 184, CAST(10.0 AS Decimal(10, 1)), CAST(N'2014-07-17 13:38:37.000' AS DateTime), N'fused', 70, N'dotNet', N'Valid Location.')
INSERT [dbo].[gpslocations] ([GPSLocationID], [lastUpdate], [latitude], [longitude], [phoneNumber], [userName], [sessionID], [speed], [direction], [distance], [gpsTime], [locationMethod], [accuracy], [eventType], [extraInfo]) VALUES (3, CAST(N'2014-04-17 13:39:33.310' AS DateTime), CAST(47.6017030 AS Decimal(10, 7)), CAST(-122.3246700 AS Decimal(10, 7)), N'dotNetUser1', N'dotNetUser1', N'8BA21D90-3F90-407F-BAAE-800B04B1F5EB', 35, 220, CAST(12.0 AS Decimal(10, 1)), CAST(N'2014-07-17 13:39:37.000' AS DateTime), N'fused', 91, N'dotNet', N'Valid Location.')
INSERT [dbo].[gpslocations] ([GPSLocationID], [lastUpdate], [latitude], [longitude], [phoneNumber], [userName], [sessionID], [speed], [direction], [distance], [gpsTime], [locationMethod], [accuracy], [eventType], [extraInfo]) VALUES (4, CAST(N'2014-04-17 13:47:16.747' AS DateTime), CAST(47.5937570 AS Decimal(10, 7)), CAST(-122.1950740 AS Decimal(10, 7)), N'dotNetUser2', N'dotNetUser2', N'8BA21D90-3F90-407F-BAAE-800B04B1F5EC', 10, 0, CAST(5.0 AS Decimal(10, 1)), CAST(N'2014-07-17 13:47:37.000' AS DateTime), N'fused', 80, N'dotNet', N'Valid Location.')
INSERT [dbo].[gpslocations] ([GPSLocationID], [lastUpdate], [latitude], [longitude], [phoneNumber], [userName], [sessionID], [speed], [direction], [distance], [gpsTime], [locationMethod], [accuracy], [eventType], [extraInfo]) VALUES (5, CAST(N'2014-04-17 13:48:20.200' AS DateTime), CAST(47.6013970 AS Decimal(10, 7)), CAST(-122.1903530 AS Decimal(10, 7)), N'dotNetUser2', N'dotNetUser2', N'8BA21D90-3F90-407F-BAAE-800B04B1F5EC', 25, 184, CAST(10.0 AS Decimal(10, 1)), CAST(N'2014-07-17 13:48:37.000' AS DateTime), N'fused', 70, N'dotNet', N'Valid Location.')
INSERT [dbo].[gpslocations] ([GPSLocationID], [lastUpdate], [latitude], [longitude], [phoneNumber], [userName], [sessionID], [speed], [direction], [distance], [gpsTime], [locationMethod], [accuracy], [eventType], [extraInfo]) VALUES (6, CAST(N'2014-04-17 13:49:33.310' AS DateTime), CAST(47.6100200 AS Decimal(10, 7)), CAST(-122.1906970 AS Decimal(10, 7)), N'dotNetUser2', N'dotNetUser2', N'8BA21D90-3F90-407F-BAAE-800B04B1F5EC', 35, 220, CAST(12.0 AS Decimal(10, 1)), CAST(N'2014-07-17 13:49:37.000' AS DateTime), N'fused', 91, N'dotNet', N'Valid Location.')
INSERT [dbo].[gpslocations] ([GPSLocationID], [lastUpdate], [latitude], [longitude], [phoneNumber], [userName], [sessionID], [speed], [direction], [distance], [gpsTime], [locationMethod], [accuracy], [eventType], [extraInfo]) VALUES (7, CAST(N'2014-04-17 13:57:16.747' AS DateTime), CAST(47.6366310 AS Decimal(10, 7)), CAST(-122.2145580 AS Decimal(10, 7)), N'dotNetUser3', N'dotNetUser3', N'8BA21D90-3F90-407F-BAAE-800B04B1F5ED', 10, 0, CAST(5.0 AS Decimal(10, 1)), CAST(N'2014-07-17 13:57:37.000' AS DateTime), N'fused', 80, N'dotNet', N'Valid Location.')
INSERT [dbo].[gpslocations] ([GPSLocationID], [lastUpdate], [latitude], [longitude], [phoneNumber], [userName], [sessionID], [speed], [direction], [distance], [gpsTime], [locationMethod], [accuracy], [eventType], [extraInfo]) VALUES (8, CAST(N'2014-04-17 13:58:20.200' AS DateTime), CAST(47.6379610 AS Decimal(10, 7)), CAST(-122.2017690 AS Decimal(10, 7)), N'dotNetUser3', N'dotNetUser3', N'8BA21D90-3F90-407F-BAAE-800B04B1F5ED', 25, 184, CAST(10.0 AS Decimal(10, 1)), CAST(N'2014-07-17 13:58:37.000' AS DateTime), N'fused', 70, N'dotNet', N'Valid Location.')
INSERT [dbo].[gpslocations] ([GPSLocationID], [lastUpdate], [latitude], [longitude], [phoneNumber], [userName], [sessionID], [speed], [direction], [distance], [gpsTime], [locationMethod], [accuracy], [eventType], [extraInfo]) VALUES (9, CAST(N'2014-04-17 13:59:33.310' AS DateTime), CAST(47.6429350 AS Decimal(10, 7)), CAST(-122.2095790 AS Decimal(10, 7)), N'dotNetUser3', N'dotNetUser3', N'8BA21D90-3F90-407F-BAAE-800B04B1F5ED', 35, 220, CAST(12.0 AS Decimal(10, 1)), CAST(N'2014-07-17 13:59:37.000' AS DateTime), N'fused', 91, N'dotNet', N'Valid Location.')
SET IDENTITY_INSERT [dbo].[gpslocations] OFF
/****** Object:  StoredProcedure [dbo].[prcDeleteRoute]    Script Date: 9/24/2015 9:09:50 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[prcDeleteRoute]
@sessionID NVARCHAR(50)
AS

SET NOCOUNT ON

DELETE FROM gpslocations
WHERE sessionID = @sessionID
GO
/****** Object:  StoredProcedure [dbo].[prcGetAllRoutesForMap]    Script Date: 9/24/2015 9:09:50 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[prcGetAllRoutesForMap]
AS

SET NOCOUNT ON

SELECT
'{ "latitude": "' + CAST(latitude AS NVARCHAR(15))
+ '", "longitude": "' + CAST(longitude AS NVARCHAR(15))
+ '", "speed": "' + CAST(speed AS NVARCHAR(4))
+ '", "direction": "' + CAST(direction AS NVARCHAR(3))
+ '", "distance": "' + CAST(distance AS NVARCHAR(5))
+ '", "locationMethod": "' + locationMethod
+ '", "gpsTime": "' + CONVERT(NVARCHAR(25), gpsTime, 100)
+ '", "phoneNumber": "' + phoneNumber
+ '", "userName": "' + userName
+ '", "sessionID": "' + sessionID
+ '", "accuracy": "' + CAST(accuracy AS NVARCHAR(4))
+ '", "eventType": "' + eventType
+ '", "extrainfo": "' + extraInfo + '" }' json
FROM (SELECT MAX(GPSLocationID) ID
      FROM gpslocations
      WHERE sessionID != '0'
      GROUP BY sessionID) AS MaxID
JOIN gpslocations ON gpslocations.GPSLocationID = MaxID.ID
ORDER BY gpsTime

GO
/****** Object:  StoredProcedure [dbo].[prcGetRouteForMap]    Script Date: 9/24/2015 9:09:50 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[prcGetRouteForMap]
@sessionID NVARCHAR(50)
AS

SET NOCOUNT ON

SELECT '{ "latitude": "' + CAST(latitude AS NVARCHAR(15))
+ '", "longitude": "' + CAST(longitude AS NVARCHAR(15))
+ '", "speed": "' + CAST(speed AS NVARCHAR(4))
+ '", "direction": "' + CAST(direction AS NVARCHAR(3))
+ '", "distance": "' + CAST(distance AS NVARCHAR(5))
+ '", "locationMethod": "' + locationMethod
+ '", "gpsTime": "' + CONVERT(NVARCHAR(50), gpsTime, 100)
+ '", "phoneNumber": "' + phoneNumber
+ '", "userName": "' + userName
+ '", "sessionID": "' + sessionID
+ '", "accuracy": "' + CAST(accuracy AS NVARCHAR(4))
+ '", "eventType": "' + eventType
+ '", "extrainfo": "' + extraInfo + '" }' json
  FROM gpslocations
	WHERE sessionID = @sessionID
	ORDER BY lastupdate

GO
/****** Object:  StoredProcedure [dbo].[prcGetRoutes]    Script Date: 9/24/2015 9:09:50 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[prcGetRoutes]
AS

SET NOCOUNT ON

CREATE TABLE #tempRoutes
(
    sessionID NVARCHAR(50) NULL,
    userName NVARCHAR(50) NULL,
    startTime DATETIME NULL,
	endTime DATETIME NULL
)

-- get the distinct routes
INSERT #tempRoutes (sessionID, userName)
SELECT DISTINCT sessionID, userName
FROM gpslocations

-- get the route start times
UPDATE #tempRoutes
SET startTime = (SELECT MIN(gpsTime) FROM gpslocations gl
WHERE gl.sessionID = tr.sessionID
AND gl.userName = tr.userName)
FROM #tempRoutes tr

-- get the route end times
UPDATE #tempRoutes
SET endTime = (SELECT MAX(gpsTime) FROM gpslocations gl
WHERE gl.sessionID = tr.sessionID
AND gl.userName = tr.userName)
FROM #tempRoutes tr

-- format dates and then send it out as json

SELECT '{ "sessionID": "' + CAST(sessionID AS NVARCHAR(50))
+ '", "userName": "' + userName
+  '", "times": "(' + CONVERT(NVARCHAR(25), startTime, 100)
+ ' - ' + CONVERT(NVARCHAR(25), endTime, 100) + ')" }' json
FROM #tempRoutes
ORDER BY startTime DESC

DROP TABLE #tempRoutes

GO
/****** Object:  StoredProcedure [dbo].[prcSaveGpsLocation]    Script Date: 9/24/2015 9:09:50 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[prcSaveGpsLocation]
@latitude          DECIMAL(10,7),
@longitude         DECIMAL(10,7),
@speed             INT,
@direction         INT,
@distance          DECIMAL(10,1),
@date              DATETIME,
@locationMethod    NVARCHAR(100),
@phoneNumber	   NVARCHAR(50),
@userName		   NVARCHAR(50),
@sessionID		   NVARCHAR(50),
@accuracy		   INT,
@eventType         NVARCHAR(50),
@extraInfo		   NVARCHAR(255)

AS

SET NOCOUNT ON
  INSERT INTO gpslocations (Latitude, Longitude, speed, direction, distance, gpsTime, locationMethod,
                            phoneNumber, userName,  sessionID, accuracy, eventType, extraInfo)
  VALUES (@latitude, @longitude, @speed, @direction, @distance, @date, @locationMethod,
					@phoneNumber, @userName, @sessionID, @accuracy, @eventType, @extraInfo)

  SELECT CAST(GetDate() AS NVARCHAR(50))

GO
USE [master]
GO
ALTER DATABASE [GPSTracker] SET  READ_WRITE
GO

Thank you for your help
Frank

authors: brentfraser fvvliet

repo: nickfox/GpsTracker


text:
Two questions about simulator training details and realistic data preprocessing

Hi, dear authors, thanks a lot for releasing your excellent work. Now, I mainly have two questions needing your help:

When training on simulated scenes, both CALVIN and RLBench, I found that the used GPU memory are dynamicly changing in a large range. Is this normal? I used one single V100 with 80GB, and adjusted the total iters correspondingly. Will this have a big influence on the  final results?
In real robot experiments, I should firstly prepare and preprocess the test data into the format used during training. For the 3D point clouds inputs (in format [batch_size, num_cameras, 3, H, W]), they are already well-prepared by simulator PyRep. My question is how can we obtain the same 3D point clouds as in the benchmark RLBench? As far as I konw, the captured 3D point clouds by hardwares are all dense ones with million points. And the used 3D point clouds in each frame have H*W (e.g., 256*256=65536) points which are relatively sparse. They are quite differenet. Actually, I found the scirpts in pyrep - vision_sensor for lifting 2D RGB-D input into 3D point clouds. Can I use these scirpts for data preprocessing? Or you have any other ways when operating this step?

I'm looking forward for your reply. Best regrads~

Hi, thanks for your interest in our work.
1a. Dynamically changing GPU memory: yes this is normal, because not all episodes have the same length and we concatenate them (no padding).
1b. Influence of hyperparameters: lowering batch size could affect the iterations needed for convergence. On CALVIN this may have significant influence on the results, but we cannot be sure for all possible hyperparameter values.

We convert depth maps to point clouds using the camera parameters. This is the function we use on CALVIN for example https://github.com/nickgkan/3d_diffuser_actor/blob/master/utils/utils_with_calvin.py#L208.

I hope this helps!

Hi, thanks for your interest in our work.
1a. Dynamically changing GPU memory: yes this is normal, because not all episodes have the same length and we concatenate them (no padding). 1b. Influence of hyperparameters: lowering batch size could affect the iterations needed for convergence. On CALVIN this may have significant influence on the results, but we cannot be sure for all possible hyperparameter values.

We convert depth maps to point clouds using the camera parameters. This is the function we use on CALVIN for example https://github.com/nickgkan/3d_diffuser_actor/blob/master/utils/utils_with_calvin.py#L208.

I hope this helps!

OK. Thank you very much for your helpful reply. I will try the answer 2 in my real robot tests.

authors: hnuzhy nickgkan