Skip to content

Engine.run make input data optional #2354

@vfdev-5

Description

@vfdev-5

🚀 Feature

In certain use-cases, for example in RL or multi-data cases, it does not make much sense to call engine.run with an artificial data that only defines epoch lenght:

trainer.run(data, max_epochs=100)

For example,

timesteps = list(range(10000))

trainer.run(timesteps, max_epochs=args.max_episodes)

The idea is to make data argument optional. Proposed API

trainer.run(max_epochs=100, epoch_length=10_000)

In this case, training_step(engine, batch) will receive None as batch value.

cc @sdesrozis

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions