Skip to content

Set workdir just as sampling pool parameter  #194

Description

@jbrezmorf

Goal: unify pool workdir and directory and file name of the HDF file of the storage.
Proposal:
Pass to the Sampler a factory to produce the storage.
Sampler then call this factory with the workdir taken from the SamplingPool.

Basic usage is that the factory is the constructor of the storage, e.g.

class StorageHDF:
    def __intit__(filename, options=None, ...)

Sampler(storage=StorageHDF)

storage=fntools.partial(StorgageHDF(options=123)
Sampler(storage=storage)

storage=lambda f: StorgageHDF(f, options=123)
Sampler(storage=storage)

def storage(f:str):
    return StorgageHDF(f, options=123)
Sampler(storage=storage)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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