Skip to content

Problem with serialising Manifest objects #547

Answered by portuu3
w1kke asked this question in Q&A
Discussion options

You must be logged in to vote

First of all to use basemodels you have to install basemodels sdk (deprecated sdk):
pip install human-protocol-basemodels

In this case this is how your code should look.

from basemodels.manifest import Manifest


model = {
    'job_mode': 'batch',
    'request_type': 'image_label_area_select',
    'unsafe_content': False,
    'task_bid_price': 1,
    'job_total_tasks': 1,
    'oracle_stake': 0.05,
    'recording_oracle_addr': '0xa2B83e5153B44E707CbC66CA6dBF840D570fB1Ba',
    'reputation_oracle_addr': '0xd29fb762D0DeBebdB7e96fC685143f7F02100434',
    'reputation_agent_addr': '0xd29fb762D0DeBebdB7e96fC685143f7F02100434' 
}
manifest = Manifest.construct(model)
print(manifest.json())

I don't…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@w1kke
Comment options

@portuu3
Comment options

Answer selected by w1kke
Comment options

You must be logged in to vote
1 reply
@portuu3
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants