-
Notifications
You must be signed in to change notification settings - Fork 54
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
[WIP] Create simpleHRT-example.json #80
Conversation
This is a first attempt at writing an AI BOM
@rgopikrishnan91 I made a PR to your branch here rgopikrishnan91#1 to fix few JSON errors. |
For licensing information, I guess it will look more or less like this: {
"type": "Relationship",
"spdxId": "urn:",
"relationshipType": "hasConcludedLicense",
"from": "...",
"to": "CC-BY-4.0",
"creationInfo": "_:creationinfo",
},
{
"type": "Relationship",
"spdxId": "urn:",
"relationshipType": "hasDeclaredLicense",
"from": "...",
"to": "CC-BY-4.0",
"creationInfo": "_:creationinfo",
}
What I'm not sure is the |
My problem is I am not sure how to define custom licenses and I think the
dataset here needs a custom license
…On Fri, May 24, 2024, 5:57 a.m. Arthit Suriyawongkul < ***@***.***> wrote:
For licensing information, I guess it will look more or less like this:
{
"type": "Relationship",
"spdxId": "urn:",
"relationshipType": "concludedLicense",
"from": "...",
"to": "CC-BY-4.0",
"creationInfo": "_:creationinfo",
},
{
"type": "Relationship",
"spdxId": "urn:",
"relationshipType": "declaredLicense",
"from": "...",
"to": "CC-BY-4.0",
"creationInfo": "_:creationinfo",
}
from should be the id of the element that has the licenses
What I'm not sure is the to that should we use the SPDX short name of the
license or should it be some kind of IRI?
—
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXOY6I6DXA4KY5HGORST7LZD4FJXAVCNFSM6AAAAABHUM5QF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRZGEZDEMBRGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Right. Maybe this one is going to be a complex example. |
I found that the dictionary entries is quite cumbersome for a big dictionary. Based on the work of Gopi's, I found that we have to have it like this... "ai_hyperparameter": [
{
"type": "DictionaryEntry",
"key": "cnn_kernel_vals",
"value": "[5, 5, 3, 3, 3]"
},
{
"type": "DictionaryEntry",
"key": "cnn_nfeature_vals",
"value": "[1, 32, 64, 128, 128, 256]"
}
] Hopefully we will soon not have to do this by hand.... |
Btw, good news, this example is now passed the validation by spdx3ToGraph (see rgopikrishnan91#1 ) However, due to a very long string (few of them are values in dictionary entries), because of the constraint of JSON string, PlantUML is unable to draw the diagram properly (the diagram got cropped). |
For custom license, I think it will probably look like this: {
"type": "expandedlicensing_CustomLicense",
"spdxId": "https://spdx.org/spdxdocs/CustomLicense-c63547c2-62e0-48ec-b98d-ff1b917d67db",
"creationInfo": "_:creationinfo",
"simplelicensing_licenseText": "This database may be used for non-commercial research purpose only. If you publish material based on this database, we request you to include a reference to paper. U. Marti and H. Bunke. The IAM-database: An English Sentence Database for Off-line Handwriting Recognition. Int. Journal on Document Analysis and Recognition, Volume 5, pages 39 - 46, 2002.",
"expandedlicensing_isFsfLibre": false,
"expandedlicensing_isOsiApproved": false
},
{
"type": "Relationship",
"spdxId": "https://spdx.org/spdxdocs/Relationship/declaredLicense-2c9563dc-baa1-4385-be02-ad671976a8aa",
"creationInfo": "_:creationinfo",
"relationshipType": "hasDeclaredLicense",
"from": "https://my-first-aibom.com/IAMdataset",
"to": "https://spdx.org/spdxdocs/CustomLicense-c63547c2-62e0-48ec-b98d-ff1b917d67db"
},
{
"type": "Relationship",
"spdxId": "https://spdx.org/spdxdocs/Relationship/concludedLicense-3bcfa4ce-6a65-46e8-bed1-18985211bb9e",
"creationInfo": "_:creationinfo",
"relationshipType": "hasConcludedLicense",
"from": "https://my-first-aibom.com/IAMdataset",
"to": "https://spdx.org/spdxdocs/CustomLicense-c63547c2-62e0-48ec-b98d-ff1b917d67db"
}, The above snippet uses CustomLicense class but I think we can also use SimpleLicensingText class as well if we only want to have the license text. I have added this to the PR to the Gopi's fork. |
Now pass all the validations (JSON Schema and SHACL) Available for review at |
AFAIK you cannot split strings into different lines in JSON, so lines 1016-1039 produce a syntax error and they have to be converted to two lines. |
For the licensing part, all licensing information is expressed via For example, recording the conclusion that your dataset is under the {
"spdxId": "https://my-first-aibom.com/rel-1",
"type": "Relationship",
"relationshipType": "hasConcludedLicense",
"from": "https://my-first-aibom.com/IAMdataset",
"to": "https://spdx.org/licenses/MIT",
"creationInfo": "_:creationinfo"
} If the license is not in the SPDX License List, you have to create a new {
"spdxId": "https://my-first-aibom.com/rel-2",
"type": "Relationship",
"relationshipType": "hasConcludedLicense",
"from": "https://my-first-aibom.com/IAMdataset",
"to": "https://my-first-aibom.com/LicenseRef-MyStrangeLicense",
"creationInfo": "_:creationinfo"
},
{
"spdxId": "https://my-first-aibom.com/LicenseRef-MyStrangeLicense",
"type": "expandedlicensing_CustomLicense",
"name": "LicenseRef-MyStrangeLicense",
"simplelicensing_licenseText": "Anyone can use this dataset without any obligation.",
"creationInfo": "_:creationinfo"
}, |
I have tried to point the For example, this relationship: {
"type": "Relationship",
"spdxId": "https://spdx.org/spdxdocs/Relationship/declaredLicense-e5536c5e-c8b5-4d24-947f-674c27c0b6c1",
"creationInfo": "_:creationinfo",
"relationshipType": "hasDeclaredLicense",
"from": "https://spdx.org/spdxdocs/DatasetPackage1-035470d9-3ede-4952-91c8-c2abb943c90b",
"to": [
"https://spdx.org/licenses/CC-BY-4.0"
]
} Will get this error from pyshacl:
(I agree that we should be able to have the license IRI directly if it is in the SPDX license list. I think that should be an expected behavior.) |
Yes, the validator needs to know about every item in the SPDX License List. Unfortunately, we do not yet generate such definitions for SPDXv3. We do generate for the SPDXv2 RDF, as you can see in https://github.com/spdx/license-list-data/blob/main/jsonld/CC-BY-4.0.jsonld. I've created an issue at the List Publisher about it. Keep in mind, that even if we had this data, it would not be straightforward to use, since which data you should be using depends on the value of the |
Thank you @zvr that is very clear and very useful. |
As a workaround to complete the validation, my approach is to declare an |
Signed-off-by: Gopi Krishnan Rajbahadur (rgopikrishnan91) <[email protected]>
@bact @kestewart @zvr The example has now been modified to include all the comments and suggestions. Thank you both Art and Zvr for the help! Key additions:
Please approve if everything looks good. Thanks once again! |
Thank you. Following the structure of examples of Software Profile, we may also like to rename the file/folder to something like: (btw, not sure about the extension now, as we may need to update the naming convention for extension? See: spdx/spdx-spec#987 (comment) / But we can change that later by another PR.) |
@kestewart Can you please merge this if you are happy with it too? |
btw, we have both "simpleHRT" and "simpleHTR" here. |
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.
All changes in comments have been made, and example is approved
Hey, I am not sure where you mean we have both version. Could you please point out so that I can fix it? |
…implehtr-example.json I believe the name of the software is SimpleHTR https://github.com/githubharald/SimpleHTR The filename was previously. "SimpleHRT" (R and T swap).
Signed-off-by: Arthit Suriyawongkul <[email protected]>
I have put the PR to your repo here: rgopikrishnan91#3 |
SimpleHRT -> SimpleHTR; Put in example01 folder
Looks like Kate merged this one. |
This is a first attempt at writing an AI BOM. Need help with
This AI BOM is for the application available here https://github.com/githubharald/SimpleHTR/tree/master
@kestewart