Skip to content

Commit 1f26d87

Browse files
committed
added requirements in manifest.json
1 parent dd8117a commit 1f26d87

5 files changed

Lines changed: 154 additions & 64 deletions

File tree

Documentation/manifest.md

Lines changed: 25 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -81,70 +81,36 @@ The model owner can define any custom fields in the manifest file as per their r
8181

8282
---
8383

84-
## Example Manifest
84+
### Requirements.txt Field
85+
86+
The `requirements.txt` field in the manifest is used to specify the dependencies for the model services. It is a JSON object where the keys are the roles and the values are the IPFS CIDs of the `requirements.txt` file.
8587

8688
```json
87-
{
88-
"name": "mnist-digits",
89-
"version": "1.0.0",
90-
"description": "MNIST model to detect digits",
91-
"author": "Umer Majeed (infinite Zero)",
92-
"technical details": "",
93-
"Genesis_Model_CID": "bafybeiabvfkm46yerhp6ramctwdiqixzs472hekj2tj34x2q4hrhu777va",
94-
"DINTaskCoordinator_Contract": "0x1e315573CE1b0A7c0De6d55f5A4858c98454b133",
95-
"DINTaskAuditor_Contract": "0x31D9FB450A313BDAe3aC0e512bCDfEab7297851a",
96-
"dp_mode": "disabled",
97-
"getGenesisModelIpfs": {
98-
"type": "custom",
99-
"path": "services/modelowner.py",
100-
"ipfs": "bafybeid7uipkcagk453qwogpnlasp3posijcztz26m77ki6comylibr6ym",
101-
"stakeholders": ["modelowner"]
102-
},
103-
"getscoreforGM": {
104-
"type": "custom",
105-
"path": "services/modelowner.py",
106-
"ipfs": "bafybeid7uipkcagk453qwogpnlasp3posijcztz26m77ki6comylibr6ym",
107-
"stakeholders": ["modelowner"]
108-
},
109-
"ModelArchitecture": {
110-
"type": "custom",
111-
"path": "services/model.py",
112-
"ipfs": "bafybeieoovd7dofejqvc6i5nxcpz5r4ux7o7oakpo2h3gxv4657otpxfpi",
113-
"stakeholders": ["modelowner", "auditors", "aggregators", "clients"]
114-
},
115-
"train_client_model_and_upload_to_ipfs": {
116-
"type": "custom",
117-
"path": "services/client.py",
118-
"ipfs": "bafybeic5jekza5sxec2voknontekxfmz6snlhew3eb2nsyb6sb6qx6mhfe",
119-
"stakeholders": ["clients"]
120-
},
121-
"create_audit_testDataCIDs": {
122-
"type": "custom",
123-
"path": "services/modelowner.py",
124-
"ipfs": "bafybeid7uipkcagk453qwogpnlasp3posijcztz26m77ki6comylibr6ym",
125-
"stakeholders": ["modelowner"]
126-
},
127-
"Score_model_by_auditor": {
128-
"type": "custom",
129-
"path": "services/auditor.py",
130-
"ipfs": "bafybeiga62lesy3aehs6ghuaen7nioxli5yzuwqqw3s4cbxs5okaixy6sy",
131-
"stakeholders": ["auditors"]
132-
},
133-
"get_aggregated_cid_t1": {
134-
"type": "custom",
135-
"path": "services/aggregator.py",
136-
"ipfs": "bafybeialydfrws6jozf64maz65h772ms6ukc364gjjwslr2jfhvk7r7j2a",
137-
"stakeholders": ["aggregators"]
138-
},
139-
"get_aggregated_cid_t2": {
140-
"type": "custom",
141-
"path": "services/aggregator.py",
142-
"ipfs": "bafybeialydfrws6jozf64maz65h772ms6ukc364gjjwslr2jfhvk7r7j2a",
143-
"stakeholders": ["aggregators"]
144-
}
89+
"requirements.txt": {
90+
"clients": "<client_requirements_ipfs_hash>",
91+
"auditors": "<auditor_requirements_ipfs_hash>",
92+
"aggregators": "<aggregator_requirements_ipfs_hash>",
93+
"modelowner": "<modelowner_requirements_ipfs_hash>"
14594
}
14695
```
14796

97+
The stakeholders should move to the project root directory and download their respective requirements.txt file using the following command:
98+
99+
```bash
100+
dincli ipfs download -c <requirements.txt_ipfs_hash> -f requirements.txt
101+
```
102+
103+
and then install the requirements.txt file using the following command:
104+
105+
```bash
106+
pip3 install -r requirements.txt
107+
```
108+
109+
## Example Manifest
110+
111+
Please find the example/template manifest file at [cache_model_0/manifest.json](../cache_model_0/manifest.json)
112+
113+
148114
---
149115

150116
## Updating the Manifest

cache_model_0/manifest.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,11 @@
5858
},
5959
"guides": {
6060
"clients": "bafybeifk2hasvhwgjydfunvjzgxpoqhwadswet4xer54hv5ro5gvfqxna4"
61+
},
62+
"requirements.txt": {
63+
"clients": "bafybeifolbr4ti734zwbgtu6alimwfl22y4sxsopprd2727rukvac6halm",
64+
"auditors": "bafybeifolbr4ti734zwbgtu6alimwfl22y4sxsopprd2727rukvac6halm",
65+
"aggregators": "bafybeifolbr4ti734zwbgtu6alimwfl22y4sxsopprd2727rukvac6halm",
66+
"modelowner": "bafybeifolbr4ti734zwbgtu6alimwfl22y4sxsopprd2727rukvac6halm"
6167
}
6268
}

cache_model_0/requirements.txt

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
aiohappyeyeballs==2.6.1
2+
aiohttp==3.13.3
3+
aiosignal==1.4.0
4+
annotated-types==0.7.0
5+
anyio==4.9.0
6+
attrs==25.4.0
7+
base58==2.1.1
8+
bip_utils==2.10.0
9+
bitarray==3.8.0
10+
blake3==1.0.8
11+
build==1.4.0
12+
cbor2==5.8.0
13+
certifi==2026.1.4
14+
cffi==2.0.0
15+
charset-normalizer==3.4.4
16+
ckzg==2.1.5
17+
click==8.1.8
18+
coincurve==21.0.0
19+
crcmod==1.7
20+
cryptography==46.0.4
21+
cytoolz==1.1.0
22+
ecdsa==0.19.1
23+
ed25519-blake2b==1.4.1
24+
eth-account==0.13.7
25+
eth-hash==0.7.1
26+
eth-keyfile==0.8.1
27+
eth-keys==0.7.0
28+
eth-rlp==2.2.0
29+
eth-typing==5.2.1
30+
eth-utils==5.3.1
31+
eth_abi==5.2.0
32+
fastapi==0.115.12
33+
filelock==3.18.0
34+
frozenlist==1.8.0
35+
fsspec==2025.3.2
36+
h11==0.16.0
37+
hexbytes==1.3.1
38+
httpcore==1.0.9
39+
httpx==0.28.1
40+
idna==3.11
41+
iniconfig==2.3.0
42+
isort==7.0.0
43+
Jinja2==3.1.6
44+
joblib==1.4.2
45+
markdown-it-py==4.0.0
46+
MarkupSafe==3.0.2
47+
mdurl==0.1.2
48+
mmh3==5.2.1
49+
mock==5.2.0
50+
morphys==1.0
51+
mpmath==1.3.0
52+
multidict==6.7.1
53+
networkx==3.4.2
54+
numpy==2.2.5
55+
nvidia-cublas-cu12==12.4.5.8
56+
nvidia-cuda-cupti-cu12==12.4.127
57+
nvidia-cuda-nvrtc-cu12==12.4.127
58+
nvidia-cuda-runtime-cu12==12.4.127
59+
nvidia-cudnn-cu12==9.1.0.70
60+
nvidia-cufft-cu12==11.2.1.3
61+
nvidia-curand-cu12==10.3.5.147
62+
nvidia-cusolver-cu12==11.6.1.9
63+
nvidia-cusparse-cu12==12.3.1.170
64+
nvidia-cusparselt-cu12==0.6.2
65+
nvidia-nccl-cu12==2.21.5
66+
nvidia-nvjitlink-cu12==12.4.127
67+
nvidia-nvtx-cu12==12.4.127
68+
packaging==26.0
69+
pandas==2.2.3
70+
parsimonious==0.10.0
71+
pillow==11.2.1
72+
platformdirs==4.5.0
73+
pluggy==1.6.0
74+
propcache==0.4.1
75+
py-cid==0.5.0
76+
py-multibase==2.0.0
77+
py-multicodec==1.0.0
78+
py-multihash==3.0.0
79+
py-sr25519-bindings==0.2.3
80+
pycparser==3.0
81+
pycryptodome==3.23.0
82+
pydantic==2.12.5
83+
pydantic_core==2.41.5
84+
Pygments==2.19.2
85+
PyNaCl==1.6.2
86+
pyproject_hooks==1.2.0
87+
pytest==9.0.2
88+
python-baseconv==1.2.2
89+
python-dateutil==2.9.0.post0
90+
python-dotenv==1.0.1
91+
pytz==2025.2
92+
pyunormalize==17.0.0
93+
regex==2026.1.15
94+
requests==2.32.5
95+
rich==14.2.0
96+
rlp==4.1.0
97+
ruff==0.15.1
98+
scikit-learn==1.6.1
99+
scipy==1.15.2
100+
setuptools==79.0.0
101+
shellingham==1.5.4
102+
six==1.17.0
103+
sniffio==1.3.1
104+
starlette==0.46.2
105+
sympy==1.13.1
106+
threadpoolctl==3.6.0
107+
toolz==1.1.0
108+
torch==2.6.0
109+
torchvision==0.21.0
110+
triton==3.2.0
111+
typer==0.20.0
112+
types-requests==2.32.4.20260107
113+
typing-inspection==0.4.2
114+
typing_extensions==4.15.0
115+
tzdata==2025.2
116+
urllib3==2.6.3
117+
uvicorn==0.34.2
118+
varint==1.0.2
119+
web3==7.10.0
120+
websockets==15.0.1
121+
yarl==1.22.0

dincli/cli/modelowner.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
from dincli.cli.modelownerd.lms import lms_app
88
from dincli.cli.modelownerd.lms_evaluation import lms_evaluation_app
99
from dincli.cli.modelownerd.model import model_app
10-
from dincli.cli.modelownerd.setup import (add_slasher,
11-
deposit_reward_in_dintask_auditor)
10+
from dincli.cli.modelownerd.setup import (add_slasher)
1211
from dincli.cli.modelownerd.slash import slash_app
1312

1413
app = typer.Typer(help="Commands for Model Owners in DIN.")
@@ -21,8 +20,6 @@
2120
app.add_typer(lms_evaluation_app, name="lms-evaluation")
2221
app.add_typer(aggregation_app, name="aggregation")
2322
app.add_typer(slash_app, name="slash")
24-
25-
app.command("deposit-reward-in-dintask-auditor")(deposit_reward_in_dintask_auditor)
2623
app.command("add-slasher")(add_slasher)
2724

2825
if __name__ == "__main__":

dincli/cli/modelownerd/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def create_genesis(
4040
target_manifest = os.path.join(task_dir, "manifest.json")
4141

4242
if not os.path.exists(target_manifest):
43-
default_manifest_CID = "bafybeibbhrefnamky7vmgcrhfx4ptxb3bdemh5dtnvwfkpualoganvnuve"
43+
default_manifest_CID = "bafybeihmnbzg27dbdny2qg2gn4kkhig3i7b2ep7vitw7maqpbrbj7k7aue"
4444
console.print(f"[bold red]Manifest not found at {target_manifest}[/bold red]")
4545
console.print(f"[bold yellow]Using default manifest from IPFS CID: {default_manifest_CID}[/bold yellow]")
4646
retrieve_from_ipfs(default_manifest_CID, target_manifest)

0 commit comments

Comments
 (0)