Questions tagged [eager]

eager database fetching: efficiently load related objects along with the objects being queried.

(contrast with lazy fetching or lazy loading)

Related tags

134 questions
3
votes
1 answer

NHibernate iStatelessSession returns duplicate parent instances on eager fetch

I'm trying to get a root entity and eager fetch it's child entities. But because I'm using the IStatelessSession of NHibernate, it returns duplicates of the root entity for each child. Using an ISession, it would be solved with .TransformUsing(new…
3
votes
0 answers

OrmLite - Change the eager level dynamically

Currently I am setting the eager level of a foreign collection statically for all queries, by setting an annotation in my object. @ForeignCollectionField(eager=true) private Collection teams = new ArrayList(); Is there a way to set this…
styssi
  • 200
  • 2
  • 10
3
votes
6 answers

eagerly evaluating boolean expressions in Python

Is there a way (using eval or whatever) to evaluate eagerly boolean expressions in python? Let's see this: >>> x = 3 >>> 5 < x < y False Yikes! That's very nice, because this will be false regardless of y's value. The thing is, y can be even…
Manuel Araoz
  • 15,962
  • 24
  • 71
  • 95
3
votes
0 answers

Entity Framework: Eager loading for properties of subclass type for TPT

I use Table per Type I have something like this class A { //some properties } class B : A { //some properties } class C : A { //some properties public virtual D D; } class D { //some properties } class E { …
Daniil Grankin
  • 3,841
  • 2
  • 29
  • 39
2
votes
1 answer

grails, disable eager fetching when render a domain list as JSON

model: class Author{ String name static hasMany = [books: Book] } class Book{ String name Author author static belongsTo = Author } Then i have a controller class MyController{ def authors{ def authors = Author.getAll() …
user711189
  • 4,383
  • 4
  • 30
  • 48
2
votes
1 answer

Laravel - Eager loaded model function

I am trying to build some chat system using Laravel and i have these 2 models: User and Thread The User model has Messagable Trait where you can get all the threads with $user->threads(); I am trying to eager load additional data to the threads…
Nenad Kaevik
  • 177
  • 1
  • 4
  • 19
2
votes
1 answer

Fluent NHibernate Linq Complex Component Eager Loading

We are using Fluent NHibernate LINQ in our project with legacy database. Our scenario is that we have a table with Customer information with address. We have created Customer and Address as separate entities in C#. Address again references zip code…
user842684
  • 21
  • 3
2
votes
1 answer

Select specific column on lazy eager loading query Laravel

I am using Laravel 8. Assume the show() function is called in a Controller, providing me with a specific Location. The goal is to return a view with that location, but adding relation data to the $location variable beforehand. Since there already is…
2
votes
1 answer

Why am I getting a cast error when trying to use Simpson's rule in Clojure?

I'm trying to work through some of the exercises in SICP using Clojure, but am getting an error with my current method of executing Simpson's rule (ex. 1-29). Does this have to do with lazy/eager evalution? Any ideas on how to fix this? Error and…
Fred Hsu
  • 108
  • 1
  • 4
2
votes
1 answer

TF 2.0 W Operation was changed ... when disabling eager mode and using a callback

I'm using some LSTM layers from TF2.0. For training purpose I'm using the callback LearningRateScheduler, and for speed purpose I disable the eager mode of Tensorflow (disable_eager_execution). But when I am using both of these functions, tensorflow…
Valentin Vignal
  • 6,151
  • 2
  • 33
  • 73
2
votes
1 answer

Train complicated nn models with tf.eager (better with TF2 symbolic support)

Is there (more or less) simple way to write a complicated NN model so it will be trainable in the eager mode? Are there examples of a such code? For example, I want to use the InceptionResnetV2. I have the code created with tf.contrib.slim.…
ckorzhik
  • 758
  • 2
  • 7
  • 21
2
votes
2 answers

Rails eager loading and kaminari

How to use eager loading while paginating with kaminari? I know that kaminari needs Relation object to work, how to retrieve models with :include and return Relation object? And second question, why :include creates sql query for evry defined model…
methyl
  • 3,272
  • 2
  • 25
  • 34
2
votes
1 answer

Tensorflow Eager Execution on Colab

I'm trying to enable eager execution with Tensorflow on a Colab notebook but I get an error message: import tensorflow as tf import tensorflow.contrib.eager as tfe tf.enable_eager_execution() ValueError: tf.enable_eager_execution must be called…
Guy
  • 169
  • 12
2
votes
1 answer

The execution plan for this query contains the Eager operator, which forces all dependent data to be materialized in main memory before proceeding

I am running this code in Neo4j: //Creates an edge labeled "Mentioned". LOAD CSV FROM "file:///datafile.csv" AS row MERGE (u:ChatItem {id: toInteger(row[0])}) MERGE (t:User {id: toInteger(row[1])}) MERGE (u)-[:Mentioned{timeStamp:…
De Gninou
  • 257
  • 3
  • 13
2
votes
1 answer

Gradient error occurred when calculate two embeddings on eager mode

When I tried to rewrite a dynet project with tensorflow on eager mode, the following error occurred: tensorflow.python.framework.errors_impl.InvalidArgumentError: cannot compute ConcatV2 as input #1 was expected to be a float tensor but is a int32…
Hugo
  • 23
  • 2
1 2
3
8 9