2019-06-10 17:00:28 +00:00
# FAQ
**Can I store more information on the models? For example, can I store enumeration of classes?**
2019-06-10 17:51:38 +00:00
2019-06-10 17:00:28 +00:00
YES!
Use the SDK `set_model_label_enumeration` method:
2019-06-10 17:51:38 +00:00
2019-06-10 17:00:28 +00:00
```python
Task.current_task().set_model_label_enumeration( {‘ label’ : int(0), } )
```
**Can I store the model configuration file as well?**
2019-06-10 17:51:38 +00:00
2019-06-10 17:00:28 +00:00
YES!
Use the SDK `set_model_design` method:
```python
Task.current_task().set_model_design( ‘ a very long text of the configuration file content’ )
```
**I want to add more graphs, not just with Tensorboard. Is this supported?**
YES!
2019-06-10 17:51:38 +00:00
Use an SDK [Logger ](https://github.com/allegroai/trains/blob/master/trains/logger.py ) object. An instance can be always be retrieved with `Task.current_task().get_logger()` :
2019-06-10 17:00:28 +00:00
```python
logger = Task.current_task().get_logger()
logger.report_scalar("loss", "classification", iteration=42, value=1.337)
```
TRAINS supports scalars, plots, 2d/3d scatter diagrams, histograms, surface diagrams, confusion matrices, images, and text logging.
2019-06-10 17:51:38 +00:00
An example can be found [here ](https://github.com/allegroai/trains/blob/master/examples/manual_reporting.py ).
2019-06-10 17:00:28 +00:00
**I noticed that all of my experiments appear as “Training”. Are there other options?**
2019-06-10 17:51:38 +00:00
YES!
2019-06-10 17:00:28 +00:00
When creating experiments and calling `Task.init` , you can pass an experiment type.
The currently supported types are `Task.TaskTypes.training` and `Task.TaskTypes.testing` :
```python
task = Task.init(project_name, task_name, Task.TaskTypes.testing)
```
2019-06-10 17:51:38 +00:00
If you feel we should add a few more, let us know in the [issues ](https://github.com/allegroai/trains/issues ) section.
2019-06-10 17:00:28 +00:00
**I noticed I keep getting a message “warning: uncommitted code”. What does it mean?**
2019-06-10 17:51:38 +00:00
TRAINS not only detects your current repository and git commit,
2019-06-10 17:00:28 +00:00
but it also warns you if you are using uncommitted code. TRAINS does this
because uncommitted code means it will be difficult to reproduce this experiment.
**Is there something you can do about uncommitted code running?**
2019-06-10 17:51:38 +00:00
YES!
2019-06-10 17:00:28 +00:00
2019-06-10 17:51:38 +00:00
TRAINS currently stores the git diff together with the project.
The Web-App will soon present the git diff as well. This is coming very soon!
2019-06-10 17:00:28 +00:00
**I read that there is a feature for centralized model storage. How do I use it?**
Pass the `output_uri` parameter to `Task.init` , for example:
```python
Task.init(project_name, task_name, output_uri=’ /mnt/shared/folder’ )
```
All of the stored snapshots are copied into a subfolder whose name contains the task ID, for example:
2019-06-10 17:51:38 +00:00
2019-06-10 17:00:28 +00:00
`/mnt/shared/folder/task_6ea4f0b56d994320a713aeaf13a86d9d/models/`
Other options include:
```python
Task.init(project_name, task_name, output_uri=’ s3://bucket/folder’ )
```
```python
Task.init(project_name, task_name, output_uri=’ gs://bucket/folder’ )
```
2019-06-10 17:51:38 +00:00
These require configuring the cloud storage credentials in `~/trains.conf` (see an [example ](https://github.com/allegroai/trains/blob/master/docs/trains.conf )).
2019-06-10 17:00:28 +00:00
**I am training multiple models at the same time, but I only see one of them. What happened?**
2019-06-10 17:51:38 +00:00
This will be fixed in a future version. Currently, TRAINS does support multiple models
2019-06-10 17:00:28 +00:00
from the same task/experiment so you can find all the models in the project Models tab.
In the Task view, we only present the last one.
**Can I log input and output models manually?**
YES!
2019-06-10 17:51:38 +00:00
See [InputModel ](https://github.com/allegroai/trains/blob/master/trains/model.py#L319 ) and [OutputModel ](https://github.com/allegroai/trains/blob/master/trains/model.py#L539 ).
2019-06-10 17:00:28 +00:00
For example:
```python
input_model = InputModel.import_model(link_to_initial_model_file)
Task.current_task().connect(input_model)
2019-06-10 17:51:38 +00:00
OutputModel(Task.current_task()).update_weights(link_to_new_model_file_here)
2019-06-10 17:00:28 +00:00
```
**I am using Jupyter Notebook. Is this supported?**
2019-06-10 17:51:38 +00:00
YES!
2019-06-10 17:00:28 +00:00
Jupyter Notebook is supported.
**I do not use ArgParser for hyper-parameters. Do you have a solution?**
2019-06-10 17:51:38 +00:00
YES!
2019-06-10 17:00:28 +00:00
TRAINS supports using a Python dictionary for hyper-parameter logging.
```python
parameters_dict = Task.current_task().connect(parameters_dict)
```
From this point onward, not only are the dictionary key/value pairs stored, but also any change to the dictionary is automatically stored.
**Git is not well supported in Jupyter. We just gave up on properly committing our code. Do you have a solution?**
2019-06-10 17:51:38 +00:00
YES!
2019-06-10 17:00:28 +00:00
2019-06-10 17:51:38 +00:00
Check our [trains-jupyter-plugin ](https://github.com/allegroai/trains-jupyter-plugin ). It is a Jupyter plugin that allows you to commit your notebook directly from Jupyter. It also saves the Python version of the code and creates an updated `requirements.txt` so you know which packages you were using.
2019-06-10 17:00:28 +00:00
**Can I use TRAINS with scikit-learn?**
2019-06-10 17:51:38 +00:00
YES!
2019-06-10 17:00:28 +00:00
2019-06-10 17:51:38 +00:00
scikit-learn is supported. Everything you do is logged, with the caveat that models are not logged automatically.
2019-06-10 17:00:28 +00:00
Models are not logged automatically because, in most cases, scikit-learn is simply pickling the object to files so there is no underlying frame to connect to.
**I am working with PyCharm and remotely debugging a machine, but the git repo is not detected. Do you have a solution?**
2019-06-10 17:51:38 +00:00
YES!
2019-06-10 17:00:28 +00:00
2019-06-10 17:51:38 +00:00
This is such a common occurrence that we created a PyCharm plugin that allows for a remote debugger to grab your local repository / commit ID. See our [trains-pycharm-plugin ](https://github.com/allegroai/trains-pycharm-plugin ) repository for instructions and [latest release ](https://github.com/allegroai/trains-pycharm-plugin/releases ).
2019-06-10 17:00:28 +00:00
**How do I know a new version came out?**
Unfortunately, TRAINS currently does not support auto-update checks. We hope to add this soon.
**Sometimes I see experiments as running while they are not. What is it?**
2019-06-10 17:51:38 +00:00
When the Python process exits in an orderly fashion, TRAINS closes the experiment.
2019-06-10 17:00:28 +00:00
If a process crashes, then sometimes the stop signal is missed. You can safely right click on the experiment in the Web-App and stop it.
**In the experiment log tab, I’ m missing the first log lines. Where are they?**
2019-06-10 17:51:38 +00:00
2019-06-10 17:00:28 +00:00
Unfortunately, due to speed/optimization issues, we opted to display only the last several hundreds. The full log can be downloaded from the Web-App.