-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mongo action store #8147
Merged
Merged
mongo action store #8147
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 tasks
`MongoActionStore` now is a `KeyValueActionStore`, which has a backing store as `MongoBackingStore` Implemented basic functionalities such as connecting to mongo client, `_set`, `_exists` Co-authored-by: Shubham Gupta <[email protected]>
…`MongoBackingStore`
… `copy` and `update` left
…ng the backend container Co-authored-by: Shubham Gupta <[email protected]>
… initializing container node
…when the key does not exist (same with `SQLiteBackingStore._get`)
Test:
import syft as sy
import pandas as pd
from syft import autocache
domain_client = sy.login(url='http://localhost:8081', email="[email protected]", password="changethis")
country = sy.DataSubject(name="Country", aliases=["country_code"])
canada = sy.DataSubject(name="Canada", aliases=["country_code:ca"])
germany = sy.DataSubject(name="Germany", aliases=["country_code:de"])
country.add_member(canada)
country.add_member(germany)
response = domain_client.data_subject_registry.add_data_subject(country)
data_subjects = domain_client.data_subject_registry.get_all()
canada_dataset_url = "https://github.com/OpenMined/datasets/blob/main/trade_flow/ca%20-%20feb%202021.csv?raw=True"
df = pd.read_csv(autocache(canada_dataset_url))
# private data samples
ca_data = df[0:10]
ca_data
# Mock data samples
mock_ca_data = df[10:20]
mock_ca_data
dataset = sy.Dataset(name="Canada Trade Value")
dataset.set_description("Canada Trade Data")
dataset.add_citation("Person, place or thing")
dataset.add_url("https://github.com/OpenMined/datasets/tree/main/trade_flow")
dataset.add_contributor(name="Andrew Trask",
email="[email protected]",
note="Andrew runs this domain and prepared the dataset metadata.")
dataset.add_contributor(name="Madhava Jay",
email="[email protected]",
note="Madhava tweaked the description to add the URL because Andrew forgot.")
ctf = sy.Asset(name="canada_trade_flow")
ctf.set_description("Canada trade flow represents export & import of different commodities to other countries")
ctf.add_contributor(name="Andrew Trask",
email="[email protected]",
note="Andrew runs this domain and prepared the asset.")
ctf.set_obj(ca_data)
ctf.set_shape(ca_data.shape)
ctf.add_data_subject(canada)
ctf.no_mock()
dataset.add_asset(ctf)
ctf.set_mock(mock_ca_data, mock_is_real=False)
domain_client.upload_dataset(dataset) |
…ests in `action_store_test.py`
Co-authored-by: khoaguin <[email protected]>
Co-authored-by: Shubham Gupta <[email protected]>
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Co-authored-by: Shubham Gupta <[email protected]>
- removed tutorials tests from stack.test.notebook
- removed 'not 06' skip opendp tests for macos
…tore - fix DEFAULT_CHUNK_SIZE for seaweed
shubham3121
approved these changes
Oct 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @khoaguin !!! 🎉 🔥
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.