Comments (8)
Hey @SGevorg,
let's use the existing image classification w/ PyTorch template as an example here. As far as I can see, using Aim would just mean adding
aim.set_params({"lr": lr, "batch_size": batch_size, "num_epochs": num_epochs}, name="hparams")
around line 85 and adding
aim.track(metrics["loss"], name="loss", subset=name, epoch=epoch)
aim.track(metrics["accuracy"], name="accuracy", subset=name, epoch=epoch)
around line 220 (+ adding import and pip install of course).
Questions:
- anything missing/wrong or anything else you'd like to have added?
- is the preferred name for the hyperparmeters "hparams" or "params"? (you use both in the docs)
- should the
track
method just use subset to differentiate between train/val/test or should the metrics also be named train_loss/val_loss/test_loss etc?
from traingenerator.
Hi @jrieke ,
I've added Aim to PyTorch image classification template and opened a PR. Can you have a look at it? Thanks a lot!
from traingenerator.
@jrieke thanks for the instructions.
Adding @gorarakelyan here too to help with the code.
re train/val/test
they are provided as arguments to track - any additional argument converted into a context (key-value pairs). In this case you woul just call aim.track(metrics["loss"], name="loss", epoch=epoch, subset="train")
and subsequent ones for test, val too.
from traingenerator.
Hi @jrieke ,
All correct, thanks for your effort!
- I suggest using name
hparams
to be more specific - as @SGevorg mentioned, the phase should be passed as an argument to
track
function, which I see has been perfectly done here:
aim.track(metrics["loss"], name="loss", -> subset=name <- , epoch=epoch)
- nothing more to add as for now
Would be happy to help in case of more questions. Do you want me to open a PR?
This is an awesome project!
from traingenerator.
Hi @gorarakelyan,
yes, feel free to open a PR if you have time, otherwise, I'll do it later (not that much work anyway) and will send it to you for testing. Make sure to add Aim as an option in the sidebar here. You can also update the scikit-learn template if you like.
Best, Johannes
from traingenerator.
Great, thanks for the instructions, @jrieke. I will work on the PR and ping you once it is ready.
from traingenerator.
@gorarakelyan Sorry for the slight delay. I only changed 2 small things on your fork (hope that was OK; I added aim to the pip install
line at the top of the generated code + moved the aim import a bit further down) and merged. It's now live on the website! 🥳
Thanks again for the contribution ❤️ Feel free to also add it to the scikit-learn template if you like.
Btw I noticed 2 minor issues with aim when running on my machine:
-
This warning
/Users/jrieke/opt/anaconda3/lib/python3.7/site-packages/aimrecords/artifact_storage/storage.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working. from collections import Iterator`
-
When I delete the
.aim
folder before closingaim_session
or finishing the script (which is what happens when I run pytest because I create a temporary dir for each test run, which gets deleted before the tests finish), I get this error:Something went wrong in _close. The process will continue to execute. _close: [Errno 2] No such file or directory: '/private/var/folders/1j/szl2n8g55053cfpnpdr_bpfc0000gn/T/tmp65jegpiw/.aim/default/8a8bbb00-5a00-11eb-8eac-8c8590b82ad8/objects/.aimrecords_storage/loss/current_bucket.bin'`
Nothing major but thought I'll mention it in case you want to look into it :)
from traingenerator.
Awesome! 🎉
Thanks a lot for the review and for reporting issues.
from traingenerator.
Related Issues (10)
- New Template:Text Classification in TF HOT 1
- New Template: Semantic Segmentation; Generative Adversarial Networks; Image Caption; Style Transfer; HOT 2
- Add mlflow tracking HOT 1
- New Feature: Semantic Segmentation HOT 3
- Websocket connection failing HOT 6
- New template: Text Classification in scikit-learn [WIP] HOT 2
- Feature : Image Classification model with arbitrary number of classes HOT 4
- New template: Image classification with Keras/Tensorflow HOT 1
- tabular regression and classification HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traingenerator.