Skip to content

Cache runs for later upload #219

Closed
Closed

Description

@joaquinvanschoren

On some computing clusters, worker nodes don't have internet access. Hence, we need to store openml runs to disk and upload them later by a separate process.

This basically means separating run_task and publish_run, but we do lack code to dump runs to disk and to retrieve them later.

Activity

  1. mfeurer commented on Mar 28, 2017

    @mfeurer
    Collaborator

    I had this issue as well. In my opinion it's easier to tunnel the connection to the server via SSH instead of writing lots of python code to accomplish this. What do you think?

  2. rhiever commented on Mar 28, 2017

    @rhiever
    Contributor

    In my specific case, the worker nodes don't have access to the internet but the head node (which connects to the same hard drive) does. If there were separate run_task and publish_run functions, then that would be perfect---as long as the run_task function provided me an ID to pass to publish_run.

  3. janvanrijn commented on Mar 28, 2017

    @janvanrijn
    Member

    Seems easy and straightforward. Run task and run publish are two separate functions right now. However, run task should also save all it's outputs to a folder on the file system (in case of a cached run). A node with internet access can later upload these runs.

    Only complication is the flows. There must be some caching directory that contains all concerning flows beforehand (the algorithm, but not the hyperparameter settings). This seems doable in the auto-sklearn world; what about TPOT?

  4. rhiever commented on Mar 28, 2017

    @rhiever
    Contributor

    Only complication is the flows. There must be some caching directory that contains all concerning flows beforehand (the algorithm, but not the hyperparameter settings). This seems doable in the auto-sklearn world; what about TPOT?

    I'm not sure I understand. Why would there need to be a directory containing all of the flows beforehand? Aren't the sklearn pipeline --> flows conversions done locally?

  5. joaquinvanschoren commented on Mar 28, 2017

    @joaquinvanschoren
    ContributorAuthor
  6. rhiever commented on Mar 28, 2017

    @rhiever
    Contributor

    Aren't they uploaded together? Or can they?

  7. janvanrijn commented on Mar 28, 2017

    @janvanrijn
    Member
  8. joaquinvanschoren commented on Mar 29, 2017

    @joaquinvanschoren
    ContributorAuthor
  9. mfeurer commented on May 18, 2017

    @mfeurer
    Collaborator

    The merge of PR #253 should allow for running the task on a downloaded flow object. @joaquinvanschoren could you please check for this?

  10. rhiever commented on May 18, 2017

    @rhiever
    Contributor

    Awesome. Has the API changed at all to accommodate caches? If not, I will test this on our HPC soon.

  11. mfeurer commented on May 18, 2017

    @mfeurer
    Collaborator

    Could you please be more specific in what you mean with:

    Has the API changed at all to accommodate caches?

    Disclaimer: this feature is a by-product of fixing a different issue. I have not tested whether it works for the usecase at hand, but it should.

  12. rhiever commented on May 18, 2017

    @rhiever
    Contributor

    Sure! What I mean is: If I want to run a task on a HPC that has nodes with no internet connection, currently I run a script like:

    task_id = 123
    print('Running task {}...'.format(task_id))
    task = tasks.get_task(task_id)
    clf = pipeline.make_pipeline(decomposition.PCA(), ensemble.RandomForestClassifier(n_estimators=500))
    run = runs.run_task(task, clf)
    run.publish()
    print('Successfully submitted task {}'.format(task_id))

    But of course that script fails because the HPC nodes do not have an internet connection. How does that code change now that OpenML supports caching? I assume there will be two different scripts now: one to run the task and cache it, and one to publish all the cached tasks.

  13. mfeurer commented on May 22, 2017

    @mfeurer
    Collaborator

    I just wanted to write a few short snippets on how this works, but found out that there is no way to store a flow offline. Once this part is there, we should be able to provide you with an example.

  14. rhiever commented on May 22, 2017

    @rhiever
    Contributor

    Thank you @mfeurer, it's much appreciated. I will keep an eye on this issue in the meantime.

  15. PGijsbers commented on Mar 6, 2019

    @PGijsbers
    Collaborator

    Done via #516.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions