question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Length of stream does not match given range

See original GitHub issue

Facts:

  1. The following code fails with
Neptune server returned status 400.
{"code":400,"title":"Length of stream does not match given range","errorType":"BAD_REQUEST"}
  1. if I set n_jobs=1 it doesn’t fail anymore
  2. if I decrease the path length in HERE it doesn’t fail anymore even with n_jobs>1
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from time import time, sleep

import neptune.new as neptune
import ray


@ray.remote
def f(x, run_id):
    run = neptune.init('XXX', run=run_id,
                       monitoring_namespace=f'monitoring/{x}')
    run[f'params/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/{x}/var'] = {'gags': 3}  # <------------- HERE
    sleep(2)


def main():
    n_jobs = 2
    run = neptune.init(
        'XXX',
        name='name',
        description='',
        source_files=[],
        flush_period=10,
        mode='async',
        monitoring_namespace='monitoring/main'
    )

    rid = run['sys/id'].fetch()
    run['params/main'] = {'asdf': 2}

    ray.init()
    ray.get([f.remote(i, rid) for i in range(n_jobs)])


if __name__ == '__main__':
    main()

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
HubertJaworskicommented, May 24, 2021

We tracked down what was happening, we created https://github.com/neptune-ai/neptune-client/pull/573 that should fix it.

Resumes tried to upload the sourcefiles again by default - we’re changing this to make resume not upload any sources by default.

Once this fix is released we’ll update docs to reflect this

0reactions
aniezurawskicommented, May 26, 2021

Should not occur anymore in 0.9.15.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - How to solve error: "Length of values does not match ...
I am using Google Maps API to collect distance data and most probably not all locations can retrieve distance information, so I get...
Read more >
IntStream (Java SE 17 & JDK 17) - Oracle Help Center
Returns a stream consisting of the elements of this stream, truncated to be no longer than maxSize in length. IntStream. map(IntUnaryOperator mapper). Returns...
Read more >
4. Pattern Matching with Regular Expressions - Java ... - O'Reilly
You're ready to get started using regular expression processing to beef up your Java code by testing to see if a given pattern...
Read more >
HTTP range requests - MDN Web Docs - Mozilla
An HTTP range request asks the server to send only a portion of an HTTP message back to a client. Range requests are...
Read more >
How to use Stream.filter method in Java 8? Example Tutorial
I mean for even number x%2 == 0 and we are checking for x%2 !=0 so they didn't pass the condition and hence...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found