We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
cp -r test test_copy
import uuid db = superduper('mongomock://test', artifact_store='filesystem://./artifacts') dt = DataType('my-file', encodable='file') db.apply(dt) my_id = str(uuid.uuid4()) db.execute(my_collection.insert_one(Document({'id': my_id, 'x': dt('./test_copy')})))
Trying this code gives:
>>> db.execute(my_collection.find_one({'id': my_id})).unpack(db) {'id': '2b14133a-f275-461e-b0a2-d6f0eadb8b9b', 'x': './artifacts/4dc048d4dbf67bed983a1b7a82822347645cc240', '_fold': 'train', '_id': ObjectId('661b9c229a2e44f23aa16422')}
However the data is missing:
$ ls ./artifacts/4dc048d4dbf67bed983a1b7a82822347645cc240 ls: ./artifacts/fc4a398bf717b6adf2dd5a07376a107c43bb0de0: No such file or directory
The text was updated successfully, but these errors were encountered:
When the file type is inserted as data, the saving logic is skipped. I will fix it
def insert( self, insert: Insert, refresh: bool = True, datatypes: t.Sequence[DataType] = () ) -> InsertResult: """ Insert data. :param insert: insert query object """ for e in datatypes: self.add(e) # TODO add this logic to a base Insert class artifacts = [] for r in insert.documents: r['_fold'] = 'train' if random.random() < s.CFG.fold_probability: r['_fold'] = 'valid' artifacts.extend(list(r.get_leaves('artifact').values())) for a in artifacts: if a.x is not None and a.file_id is None: a.save(self.artifact_store) inserted_ids = insert.execute(self)
Sorry, something went wrong.
jieguangzhou
Successfully merging a pull request may close this issue.
cp -r test test_copy
Trying this code gives:
However the data is missing:
The text was updated successfully, but these errors were encountered: