Comments (7)
I found this resource about zipping a database and tried that: https://dev.to/lucis/setting-up-a-mongodb-backup-on-google-drive-3bbe
mongodump -d DB_NAME --archive=DB_save_8-5-2022.gz --gzip
Then tried using mongorestore
on another computer:
mongorestore --gzip --archive=DB_save_8-5-2022.gz
When I run mongosh
I can see the restored database, I think:
test> show dbs
admin 40.00 KiB
config 108.00 KiB
local 72.00 KiB
DB_NAME 10.64 GiB
sacred 40.00 KiB
However, when I try to view the database in omniboard like I used to it is unfortunately entirely blank.
omniboard localhost:27017:DB_NAME
(node:28895) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
Omniboard is listening on port 9000!
Connection to sacred at mongodb://localhost:27017 established successfully!
Any tips welcome, I'm also still unclear how one would go merging experiments run on different computers.
from sacred.
I had a dumb typo,
omniboard localhost:27017:DB_NAME
Should instead have been
omniboard -m localhost:27017:DB_NAME
So the process above worked for zipping a database, restoring it on another computer, and reconnecting to it. If anyone has thoughts on combining experiment results from Computer A and B as mentioned in the original question that would still be valuable!
from sacred.
Hi @FranzEricSchneider, great that you found a solution! Other than that, you could use the FileStorageObserver
, which stores the logs in JSON files that can easily be copied between machines. It doesn't support omniboard or other related tools, though.
from sacred.
Hi @thequilo , do you know if it is possible to convert the data stored from a Mongo observer into this file storage form? That might be one way to combine experiments from multiple computers, which I'm still struggling with.
from sacred.
There is currently no easy way to do this. You can loop through the data stored in your mongo db manually and pass them to a file storage observer, similar to #815 but the other way around.
from sacred.
Alright, I will close this issue. If anyone does come up with a way to combine sacred runs from multiple computers I would be very interested, even in my first usage of sacred it's been necessary to run tests on multiple computers because the tests take a long time to run. My only thought at the moment is to go through the existing database on one of the computers and alter all the ids to be something like (13 -> 1013, 24 -> 1024) to prevent ID clashes, then do the database zip/unzip mentioned above.
from sacred.
Okay, in order to zip sacred tests from multiple computers I needed to make sure none of the IDs overlapped. In order to deal with overlaps I went to computer B and changed the IDs in the mongo database like so:
$ mongosh
> # Use the relevant db name
> use mmseg
> # Repeat for all necessary IDs
> runX=db.runs.findOne({_id:X});
> runX._id=100X;
> db.runs.insertOne(runX);
> db.runs.deleteOne({_id:X});
> db.metrics.updateMany({run_id:X}, {$set:{"run_id":100X}});
Then I zipped the database on computer B, moved it to computer A, restored the database, and was left with all of the results on computer A.
from sacred.
Related Issues (20)
- Error when importing FileStorageObserver HOT 1
- It is not compatible with Python3.10 HOT 2
- Is there any developer community like Slack?
- MD5 hash for gridfs is deprecated
- AssertionError while running a notebook through ipython HOT 1
- Non-loadable classes in config files are silently ignored
- Fail to run the starter example HOT 3
- Fail to access the third party library mentioned in the readme HOT 2
- Progress bar + file observer = tee timeout error
- gather_sources_and_dependencies fails in notebooks with ipykernel 6.21.0 HOT 2
- Does Sacred support automatic data versioning? HOT 1
- Adding period to name argument of Experiment modifies function names. HOT 2
- ValueError: Reference at 'refs/heads/master' does not exist HOT 4
- How to pass arbitrary dict like kwargs in config without warnings HOT 4
- how to make the config.json file saved correctly ? HOT 4
- Exception originated from within Sacred. KeyError: 'Invalid key "DogmaticDict.__setitem__". Config-keys cannot contain "." or start with "$"' HOT 3
- Access sub-ingredient's config HOT 12
- Experiment.add_artifact with bytes, documentation vs code HOT 2
- Silenced errors in Observers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sacred.