# rnsr-geo-ml-dvc Apprentissage du RNSR avec répartition géographique - essai avec DVC. Voir les travaux précédents: <https://gitbucket.inist.fr/parmentf/rnsr-ml>. ## DVC ### Initialisation La documentation de l'extension DVC de VSCode dit que pour initialiser le dépôt il faut taper `dvc exp init -i`, mais ça ne marche pas avec ma version de DVC (qui est apparemment plus récente que ce à quoi s'attend l'extension). ```bash $ dvc init Initialized DVC repository. You can now commit the changes to git. +---------------------------------------------------------------------+ | | | DVC has enabled anonymous aggregate usage analytics. | | Read the analytics documentation (and how to opt-out) here: | | <https://dvc.org/doc/user-guide/analytics> | | | +---------------------------------------------------------------------+ What's next? ------------ - Check out the documentation: <https://dvc.org/doc> - Get help and share ideas: <https://dvc.org/chat> - Star us on GitHub: <https://github.com/iterative/dvc> ``` Cette commande a créé: - `.dvcignore` - `.dvc` - `.gitignore` - `config` Alors que l'installation de l'extension VSCode a ajouté: - `.vscode` - `settings.json` Pour créer un remote, je tape `dvc remote add -d local /home/parmentf/data/dvc`. Il faut juste que le répertoire existe (et soit vide ou déjà consacré à ça). ### Ajout de fichier ```bash $ dvc add data/netscity-ville-aire-uniq.tsv 100% Adding...|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|1/1 [00:00, 20.28file/s] To track the changes with git, run: git add data/netscity-ville-aire-uniq.tsv.dvc data/.gitignore To enable auto staging, run: dvc config core.autostage true ``` Donc, si on veut se simplifier la vie sur les ajouts suivants: ```bash dvc config core.autostage true ```