question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dallinger deploy from zip file: 5pt

See original GitHub issue

The Dallinger CLI provides two pairs of functions that are theoretically rather powerful: hibernate/awaken and export/load. The documentation is as follows:

hibernate

Temporarily scales down the specified app to save money. All dynos are removed and so are many of the add-ons. Hibernating apps are non-functional. It is likely that the app will not be entirely free while hibernating. To restore the app use awaken. A required --app <app> parameter specifies the experiment by its id.

awaken

Restore a hibernating app. A required --app <app> parameter specifies the experiment by its id.

export

Download the database and partial server logs to a zipped folder within the data directory of the experimental folder. Databases are stored in CSV format. A required --app <app> parameter specifies the experiment by its id. Use the optional --local flag if exporting a local experiment data. An optional --no-scrub flag will stop the scrubbing of personally identifiable information in the export. The scrubbing of PII is enabled by default.

load

Import database state from an exported zip file and leave the server running until stopping the process with <control>-c. A required --app <app> parameter specifies the experiment by its id. An optional --verbose flag prints more detailed logs to the command line. Use the optional --replay flag to start the experiment locally in replay mode after loading the data into the local database.

These functions currently work for the current use cases:

  • Finalising an experiment and exporting the resulting data (export).
  • Freezing a Heroku-deployed experiment so that you can reinstantiate it later for debugging (hibernate/awaken).
  • Loading an exported experiment from its exported zip file so you can explore the networks as if you were a participant (export/load).

However, they do not work for the following use case: taking a snapshot of an experiment, shutting down the deployment, and subsequently continuing the experiment by redeploying from the snapshot. As far as we can see, the main issue standing in the way is that dallinger awaken does not create a new recruiter, so no new participants will be recruited.

Clearly there are two ways that we could redeploy an experiment to collect more data:

  • Redeploy by scaling up a hibernated Heroku app (similar to the awaken function)
  • Redeploy from an exported zip file (similar to the load function).

In my opinion we should focus on the second route (zip file). I see no application except for debugging where the first route would be preferable. The advantages of the second route are that a) it’s easy to backup multiple zip files as snapshots, and b) it’s easy to edit the zip files.

Following this logic, we would therefore propose the following:

Add an optional argument to dallinger deploy that allows the user to specify a zip file to load the experiment from. This zip file should take the format as created by dallinger export. Applying this option means that the zip file will be used to populate the database, similar to dallinger load.

In order to prevent the same participant from taking the experiment twice, we should tell the experimenter to have a config.txt like this:

group_name = myexp
assign_qualifications = true
qualification_blacklist = myexp

If we’ve thought through this correctly, this should allows us to redeploy experiments from arbitrary snapshots, as desired.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
pmcharrisoncommented, Aug 18, 2020

Thanks @jessesnyder , my bad, your advice fixed it!

0reactions
pmcharrisoncommented, Aug 18, 2020

I did struggle to login to the dashboard after dallinger load, so it’s maybe worth checking that the dashboard still works after you implement this updated dallinger deploy (not sure whether you want to generate a new password or keep the old one)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploy ZIP vs. EAR| JBoss.org Content Archive (Read Only)
Deploying the components one by one works, so I pack them all in a ZIP file which will be deployed. So, is there...
Read more >
Deploy files to App Service - Azure App Service | Microsoft Learn
Deploy a ZIP package to your web app by using the az webapp deploy command. The CLI command uses the Kudu publish API...
Read more >
Deploying from a zip file or url · projectkudu/kudu Wiki - GitHub
Kudu's zip API is an effective way to move multiple files to your site, but zipdeploy is preferable for deployments for a number...
Read more >
ZIP File Deployment - Product Documentation - Ivanti
To deploy the received IWC.Azure.UserSettings ZIP file, follow these steps: From the left-side navigation menu, go to Development Tools > Advanced Tools and ......
Read more >
Deploying Lambda functions as .zip file archives
Learn how to use the Lambda console and the Lambda API to create and configure a function defined with a .zip file archive....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found