Questions tagged [batching]

193 questions
2
votes
0 answers

How to change batch size of batchblock dynamically during runtime?

I have a batch block in tpl dataflow and have several target blocks linked to the batch block. However, the number of target blocks changes dynamically and thus the size of the batches. Problem is that the batch size must be supplied at the…
Matt
  • 7,004
  • 11
  • 71
  • 117
1
vote
1 answer

Is batching animation sprites more efficient with a single sprite? (cocos2d)

In the cocos2d programming guide there is the following code: CGSize s = [[CCDirector sharedDirector] winSize]; CCSprite *sprite = [CCSprite spriteWithSpriteFrameName:@"grossini_dance_01.png"]; sprite.position = ccp( s.width/2-80, s.height/2);…
Aram Kocharyan
  • 20,165
  • 11
  • 81
  • 96
1
vote
1 answer

Change color without breaking batching Unity3D

I have a high number of objects in Unity, and I need to change their colors in real time (and several times). However, this breaks Unity batching, leading to very bad results in terms of performances. I am currently using the Standard pipeline. I…
alirek
  • 177
  • 3
  • 14
1
vote
2 answers

Attaching two parts of a pandas data frame in a Tensor of type tensorflow.python.data.ops.dataset_ops.PrefetchDataset

I want to run a Neural Network on my data and for preprocessing I want to create tensor including two element: The first element including inputs in the form of a array of shape (100,4) and the other one of shape of (100,1): I have created these two…
1
vote
1 answer

Simulation of servers processing batches with interrupting set-up/switch-on times

I would like to create a system with servers that need time to set up before being ready to serve. The system starts to set up whenever enough M (2, 3,...) customers are in the queue. If the number of customers in the system reaches the maximum…
Julian
  • 15
  • 6
1
vote
1 answer

Batch processing mongodb documents

I am trying to figure out a way to process documents such that I can add documents until a certain count (say 100). Once that 100th document is inserted, Mongodb should fire an event so that I can read all 100 records and batch process them in JS. I…
Skelli
  • 283
  • 2
  • 10
1
vote
1 answer

How to properly batch insert using Quarkus reactive hibernate with panache

How to properly batch insert using Quarkus reactive hibernate with panache? I haven't found any proper documentations, here is my failed attempt: @ReactiveTransactional public Uni> persistAll(List klines) { …
1
vote
1 answer

What is the optimal way to generate a set of integers, each as close as possible to Y, whose sum is X?

X can be a positive decimal or integer and Y is a positive integer. X >= 2 * Y. What is the optimal way (in terms of code performance) to accomplish this? Context I am creating a damage over time (DoT) batching algorithm for a game. X is the total…
synthc
  • 25
  • 5
1
vote
1 answer

How to batch a nested list of graphs in pytorch geometric

I am currently training a model which is a mix of graph neural networks and LSTM. However that means for each of my training sample, I need to pass in a list of graphs. The current batch class in torch_geometric supports batching with…
tangolin
  • 434
  • 5
  • 15
1
vote
1 answer

airflow tasks in specific batches

I want to run a set of tasks like this: a >> [b,c,d] >> [e,f,g] >> [h,i,j,k,l,m] First run task a, when that is done, run b,c,d in parallel, then when the last of b,c,d is done. start running e,f,g in parallel etc. But i'm getting an error with…
Mike Tang
  • 13
  • 2
1
vote
1 answer

How to batch process incoming tasks into 10 task in celery?

App1: sends the communications (eg: email) App2: gets webhook parse the JSON and update DB records When I trigger for example 10k communications from App1, I will receive webhooks based on the events on App2 so far so good... Now as I receive…
Tarun kumar
  • 141
  • 5
1
vote
1 answer

how to count a "batch" every 15 minutes

1 2021-01-01 12:59:38 2 2021-01-01 14:08:59 3 2021-01-01 14:09:08 4 2021-01-01 14:11:30 5 2021-01-01 14:22:19 6 2021-01-01 14:41:07 I want to be able to count the number of entries every 15 minutes but on a rolling basis. E.g 12:59 would be 1…
OliverB
  • 25
  • 4
1
vote
1 answer

AWS Kinesis batching based on shards

I have two types of events that I plan to put in kinesis. Event A has high frequency so I need the batch-size as 100 and maxRecordAge as 1 minute. Event B is less often and I would like to keep the batch-size as 1 as I want to process event as soon…
1
vote
2 answers

How to segmentate an IList to segments of N size, without creating copies and without memory allocations?

I have a very large collection that implements the generic IList interface and contains tens of millions of elements, and I would like to process them in parallel using PLINQ. I noticed that the overhead of parallelism is quite significant…
Theodor Zoulias
  • 34,835
  • 7
  • 69
  • 104
1
vote
2 answers

Batching only reading/saving last image in folder

I am trying to add batching to a OpenCV python script I am making and I cannot for the life of me see what I am doing wrong. I am a beginner at this so its probably something stupid. In the end I want the script to read every image file in the…