Comments (3)
Hey,
Sorry for the slow response!
I'm afraid that there currently isn't any timeout support in the writer. We have a backlog entry for the feature but haven't gotten around to implementing it yet as this isn't much of an issue for our own experiments where failing tasks are automatically restarted (and thus the blocking makes sense as the call eventually succeeds).
I'll bump up the priority on this feature but if this is causing you a lot of pain then maybe you could try offloading the call to a threadpool? You could then apply a timeout on the future instead.
Something along these lines maybe:
import concurrent.futures
import reverb
_TIMEOUT = 10 # Seconds.
def main():
client = reverb.Client('localhost:8000')
executor = futures.ThreadPoolExecutor(max_workers=1)
with client.writer(max_sequence_length=2) as writer:
for i in range(1000):
try:
# In general writer.append can also block due to communication.
executor.submit(writer.append, tf.constant([1.]).result(_TIMEOUT)
if i > 0:
print(f'creating item for i={i}')
executor.submit(writer.create_item, 'my_table', 2, 1.0).result(_TIMEOUT)
print(f'wrote item for i={i}')
time.sleep(0.5)
except futures.TimeoutError:
print('closing')
from reverb.
Okay, thanks! That might be a reasonable work around for now
from reverb.
This is fixed in the new TrajectoryWriter
flush call (create_item is now asynchronous in the new API).
from reverb.
Related Issues (20)
- Error in `SampleToInsertRatio` docstring HOT 3
- table signature (shapes) must be same for each field of structured data? HOT 2
- Sampling from a loaded replay checkpoint HOT 4
- TensorFlow ROCm support? HOT 1
- Maintaining episode-level priority while sampling individual transitions from a replay buffer with MinHeap remover
- TFclient Error Message about data loss HOT 1
- import reverb error,raise TypeError, 'Regexp cannot be negated' HOT 2
- print samples with high priority HOT 6
- Access to keys? HOT 1
- Initialize or Clean memory for on-policy HOT 1
- c++ use python to import reverb error
- Use With Vectorized Environments HOT 6
- C++ Documentation
- [Conceptual Question] Item creation and sampling trajectories with specified period HOT 1
- Can I change the rate limiter after I have created the table HOT 2
- Unnecessary assert in prioritized selector HOT 1
- How to change Table max_time_sampled param when reloading ?
- How to use multiple clients - for multiple envs in parallel settings ?
- How to interpret warning on Table access with/without gRPC HOT 2
- Reverb fails to install HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reverb.