-
Notifications
You must be signed in to change notification settings - Fork 377
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
feat: Train: Adding code snippets #2591
Conversation
Hi @leiyre, Looks great already, I added some content snippets for everything I can think of currently. Would it be possible to render the title as the name for the tab, within the UI? Currently, the tabs are pre-determined but IMO it could be better to show all files from 'docs/_source/_common/snippets/training' for each corresponding task. Additionally, I created this issue, perhaps it is already an option to add something simple for programmatic exporting in |
docs/_source/_common/snippets/training/token-classification/transformers.md
Outdated
Show resolved
Hide resolved
return libraries; | ||
}, | ||
}, | ||
}; |
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.
performance: don't compute variables which don't need reactivity. This component have a lot of computeds. Maybe some or all can be put in static variables => see EditionUserInfo created hook. (if some value are not well reactive, you could use a conditional rendering at the level parent with a v-if)
let libraries = null; | ||
try { | ||
libraries = require.context( | ||
`../../../../docs/_source/_common/snippets/training`, |
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.
it's better to use absolute and not relative import
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.
it's outside of the project so I tried to create an alias with webpack for the path, but didn't work
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.
Maybe we can define symlink to link and share the same folder in several places
@davidberenstein1957 @leiyre Is there any requirement to have these code snippets in the docs section? Will be shown there also?
If only code snippets are used in the frontend part, I would like to keep them as part of the UI static resources,
if not, we can even have a symbolic link inside the frontend folder and work as if they were there.
frontend/components/commons/header/help-info/HelpInfoContent.vue
Outdated
Show resolved
Hide resolved
allow-close | ||
@close-modal="showTrainModal(false)" | ||
> | ||
<DatasetTrainComponent :datasetTask="dataset.task" /> |
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.
see the comment about replacing some or all computed props by static variable => could be interesting to add a v-if on DatasetTrainComponent
5364c79
to
858004a
Compare
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.
@davidberenstein1957 Could you try to verify if the parameters in the update_config
are correct?
docs/_source/_common/snippets/training/text-classification/setfit.md
Outdated
Show resolved
Hide resolved
docs/_source/_common/snippets/training/text-classification/setfit.md
Outdated
Show resolved
Hide resolved
docs/_source/_common/snippets/training/text-classification/transformers.md
Outdated
Show resolved
Hide resolved
docs/_source/_common/snippets/training/token-classification/_sparknlp.md
Outdated
Show resolved
Hide resolved
docs/_source/_common/snippets/training/token-classification/spacy.md
Outdated
Show resolved
Hide resolved
docs/_source/_common/snippets/training/token-classification/transformers.md
Outdated
Show resolved
Hide resolved
…fit.md Co-authored-by: Tom Aarsen <[email protected]>
…fit.md Co-authored-by: Tom Aarsen <[email protected]>
Co-authored-by: Tom Aarsen <[email protected]>
…nsformers.md Co-authored-by: Tom Aarsen <[email protected]>
…ansformers.md Co-authored-by: Tom Aarsen <[email protected]>
…parknlp.md Co-authored-by: Tom Aarsen <[email protected]>
…acy.md Co-authored-by: Tom Aarsen <[email protected]>
Description
This PR includes an access in the UI, from the header of the dataset, to view the training snippets in a modal window, and to allow copying them.
Closes #2475
Closes #2391
Type of change
How Has This Been Tested
Checklist