Skip to content

TypeError: __init__() missing 2 required positional arguments: 'instance' and 'token' #790

Open
@devVipin01

Description

I want to load Parquet row groups into batches. below code working fine on my local system-

# dbfs:/output/scaled.parquet
batch_size=2
with make_batch_reader('file:/dbfs:/output/scaled.parquet', num_epochs=1,shuffle_row_groups=False) as train_reader:
    train_ds = make_petastorm_dataset(train_reader).unbatch().map(lambda x: (tf.convert_to_tensor(x))).batch(batch_size)
    for batch in train_ds:
        X_train = tf.reshape(batch,(2,1,15))
        model.fit(X_train,X_train)

But when i am trying on DataBricks it return given error TypeError: init() missing 2 required positional arguments: 'instance' and 'token'

  • So i give the instance and token in make_batch_reader but know it's given TypeError: make_batch_reader() got an unexpected keyword argument 'instance'

Help to resolve the issue

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions